LogicAppUnit is a testing framework that simplifies the creation of automated unit tests for Standard Logic Apps running in a local development environment, or in a build server as part of a DevOps pipeline. Standard Logic Apps do not include an out-of-the-box testing capability and this framework has been designed to fill this gap. The framework is based on the Logic Apps Sample Test Framework that was developed by Henry Liu, and includes additional functionality to make it easier to author and run tests and validate (assert) the results.
The framework does not support the testing of:
The testing framework has been designed to make it easier to perform isolated unit testing of a workflow. The framework does this by modifying a copy of the workflow definition to remove the dependencies on external services and APIs, without affecting the functionality or behaviour of the workflow. This means that workflows can be easily tested in a developer's local environment, and by a DevOps pipeline running on a build server, where there is no access to Azure services or any other workflow dependencies.
This code repository includes four projects:
Name | Description |
---|---|
LogicAppUnit | The testing framework. |
LogicAppUnit.Samples.LogicApps.Tests | Test project that demonstrates the features of the testing framework. |
LogicAppUnit.Samples.LogicApps | Workflows that are tested by the sample test project. |
LogicAppUnit.Samples.Functions | Local .NET Framework functions that are called by workflows. |
Download the LogicAppUnit testing framework package from nuget: https://www.nuget.org/packages/LogicAppUnit/
The framework has been tested with these environments:
If you like or are using this project please give it a star. Thanks.
The best way to understand how the framework works and how to write tests using it is to read the wiki and look at the example tests in the LogicAppUnit.Samples.LogicApps.Tests project.
This is a list of possible future improvements and changes for the framework. Please create a new issue if there are other features that you would like to see.
Verifiable()
feature to the fluent API so that a test case can assert that a test execution did send a request to the mock HTTP server that was successfully matched. This would work in a simialar way to the Verifiable()
feature in the moq unit testing framework.