LogicAppUnit / TestingFramework

Unit testing framework for Azure Logic Apps (Standard)
MIT License
26 stars 13 forks source link
azure integration-testing logic-apps logicappunit unit-testing

LogicAppUnit Testing Framework

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.

Key Features

Projects

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.

Packages

Download the LogicAppUnit testing framework package from nuget: https://www.nuget.org/packages/LogicAppUnit/

NuGet Version Badge NuGet Download Badge

Compatibility

The framework has been tested with these environments:

Give a Star :star:

If you like or are using this project please give it a star. Thanks.

Main Contributors

Documentation

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.

Future Improvements and Changes

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.