This is a sample showing how to use Pester and PowerShell to integration test a logic app.
The sample uses a very simple logic app that gets a weather report using the MSN Weather connector. The main purpose of the repository is to demonstrator how to use Pester and PowerShell to perform integration tests on Logic Apps.
For more detail about the principles in this sample, see this article: http://martink.me/articles/integration-testing-logic-apps
The test is setup to work with this logic app.
You can deploy this on your own Azure subscription using the template in /Logic App Template. For detail on how to do that, see Deploy Azure Resource Manager templates for Azure Logic Apps.
This test is designed to use Pester V5. To get an overview of Pester, see these resources:
To run the test
- Clone this repository
- Deploy the /Logic App Template. For detail on how to do that, see Deploy Azure Resource Manager templates for Azure Logic Apps.
- Make a copy of /ps/sample.env named
.env
and fill in the values to match your deployed Logic App. Ensure this is in the same folder as your.ps1
files. - Open a PowerShell console and navigate to the folder containing
/PS/LogicApp.tests.ps1
- Run this commmand
Invoke-Pester -Output Detailed LogicApp.tests.ps1
- If sucessfull, 6 tests should have passed