Controlled Testing - (mocking outputs and result codes)
It would be great to allow us to mock/simulate behavior for ANY connector in my Logic App using Test Twins.... more details in the attachment.
Each Logic App twin will represent my Unit Test specific to the scenario I’m looking to test.
Inside each of these twins, There would be a toggle on the connector(s) I wish to mock; if you don’t toggle any of the activities essentially it’s the exact same Logic App.
Result Code is HttpResultStatusCode (400,404, etc.)
Mock Output is JSON
I can create the Twin by having a button similar to the Clone button that exists today (can be called “Create Test Twin”).
The important thing is that these twins should always be synced with the base Logic App (Twin pairing & sync: this is critical to ensure you are testing the latest version of your Logic App)
So I would have the same base url but can invoke the specific Twin by adding some rest property (either in the url or header)
As you see below:
Imagine the Original has 3 activities
My twins will choose which activities to mock (override the outputs and results code); this now allows the developers to run real Unit Tests after deploying the Logic Apps!
Jason Steele commented
I think this is a good suggestion, but perhaps the solution is rather specific. There is another suggestion which is similar but more generic: https://feedback.azure.com/forums/287593-logic-apps/suggestions/18550309-connector-alternative-bindings-to-support-dev-ci