4

Can you have automated regression/integration tests for Azure Logic Apps?

And if you can, how? ... especially in the context of CI/CD builds and deployments

... and if you can't, why not!!

SteveC
  • 15,808
  • 23
  • 102
  • 173

2 Answers2

3

There isn't any out-of-the-box tooling yet to provide automated testing of Azure Logic Apps. We have a few customers who have followed one of the following patterns. There is also this article that goes into detail on how to create a Logic App deployment template:

  1. After deployment (using a release management tool like Visual Studio Release Management), a series of unit tests are run (writtin in something like C#) to test the Logic App.

Since a logic app could have any kind of trigger (on queue item, on HTTP request), the code usually performs the action and asserts the result.

  1. A logic app in the resource group that can run a series of basic tests in a workflow. This one requires a bit more chewing on, but idea being you have a workflow that makes use of connectors or "calling nested apps" to perform basic validation tests (ensure connections are active, etc.)

It's something we have had discussions on from time-to-time, but would love to know if you have any thoughts on what types of tooling/configuration you'd want to configure for an app (remember that some apps "trigger" on something like a message in a queue or a file in FTP).

jeffhollan
  • 3,139
  • 15
  • 18
  • Thanks Jeff. Initially I was looking for automation of some basic regression/integration tests, so we can at least validate the dev deployment. Better yet something like BizUnit. – SteveC Jan 30 '17 at 09:38
  • automated testing should be a first order priority in any modern stack. in an ideal world, logicapps could be triggered with stubbed out IO (db calls etc)... the alternative is to bootstrap a testing environment with test data set... – webish Jun 10 '19 at 13:56
2


I would like to share one of the approach for LogicApp testing that my team has followed.
First level of validation is the ARM template deployment status (ProvisioningState) which should not have any errors.
After that we have developed test automation using the logic app sdk which does the following

  1. Get auth token.
  2. Execute a specific logic app trigger with a synthetic transaction.
  3. Waits till the execution is completed.
  4. Gets logic app & its action status (succeed, failed or skipped), validates it as per the expected scenario.
  5. Gets the outputs from each action execution, validates them against an expected scenario.
  6. Repeat above steps for all the various cases that logic app might go through.
  7. Hook this all-in CI/CD :)

Deployed an LA, ran a synthetic transaction & validated the results. Hope this helps.

TusharJ
  • 1,213
  • 2
  • 11
  • 18
  • 2
    Do I understand correctly, that these are E2E-alike tests, i.e. they run against the deployed LogicApp instance (therefore, with some cost associated to the test run)? – Igor Soloydenko Nov 22 '17 at 20:02