Skip to content

ITestRunner.WorkflowTerminationCode can be a string but the framework uses int? #46

Description

@nunoviaes

Hi @mark-abrams ,

First and foremost, thank you for the great framework and all the hard work you and all the contributors have done on it.

During some logic app standard test that my team and I are working on, we were trying to assert the WorkflowTerminationCode in the following two scenarios:

  • When we have Terminate action and we set a message and code, but we use the code as a string (since the workflow designer accepts it) and not as a HTTP status code

Image

  • When the workflow fails and the engine provides back the default termination message 'An action failed. No dependent actions succeeded.'. This engine error sets the code with the value of 'ActionFailed'

Please note that there might be other examples that set the code to string in logic app standard engine, but at the moment we cannot really assert the WorkflowTerminationCode because its set as 'int?'.

The example below shows that we cannot also not assert against what the engine returns when an action fails. The same happens if we use a Terminate action.

Image

During investigation we can see the framework is actually catching an exception as per screenshots below:

Image

Image

The suggestion here is to treat the WorkflowTerminationCode as a string, since the logic app standard engine uses it as a string and the developers can also use it as a string and not set the code in the Terminate action as a HTTP status or an int value.

Hope it helps.

Thanks.

Best Regards,

Metadata

Metadata

Assignees

Labels

No labels
No labels

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions