Ability to terminate a custom Python scenario step with a Warning
We would like to have a custom Python scenario step generate a warning based on custom code logic. Generating a step failure is easy as we can just abort the step (as shown in this link) or just raise an exception in Python code. However there is no option to end the custom Python scenario step in a warning outcome. The use case is to surface some inconsistencies in our data layer APIs, which we access via Python, which need to be reviewed but don't warrant a step failure. We are currently using scenario variables to expose this but this obviously needs the additional use of a Scenario Reporter and requires human intervention (ie they need to see the Reporter). Having the ability to see it in the scenario outcome itself and find out which step threw the warning would make it much more visible and easy to see.
Comments
-
It would be great to be able to automatically trigger a Scenario outcome of Warning upon hitting some subclass of
warning. -
Turribeach Dataiku DSS Core Designer, Neuron, Dataiku DSS Adv Designer, Registered, Neuron 2023, Circle Member Posts: 2,640 NeuronTurns out there is a secret way to do this but it's a bit clunky. Create a Custom Python step and set the "Ignore failure" step box. Then raise() any error in code and the step (and hence the scenario) will end in warning. One catch though, once you set this setting ANY exception is treated as a warning so you can't use this step safely as it won't be able to end in failure. One way around this issue could be to have a dummy warning step at the end of your scenario which checks if a scenario variable has been set (raise_warning = True). If it is set then it raises an exception and ends the scenario in warning.

