Ability to get Status of Execution
Hello,
Is there a way to get an execution status whether it passed or failed, then run a step. I am envisioning to set up some API calls via a link to set off some processes that will set up notification alerts to the proper employees within our company. I understand there are execution alerts, but I have provisioned these emails to have specific attachments and links. Potentially, I am thinking IF execution FAILED I could have one email sent out for this, and if it is PASSED I would send another one. The only step I would be using for this is "Go To" URL. Just trying to think how I would be able to get this to work if the script fails too.
Thanks,
Zach
Hello Zach,
Please follow the below article for using API callbacks in the execution set. In case you don't want to use APIs, you can use the Email Notifications option and select the Condition and Level.
Please let me know if you need anything else!
https://subject7.atlassian.net/wiki/spaces/SD/pages/1358790657/Execution+Callbacks
Regards,
Subject7 Team
Hi Zach,
For individual runs (without using execution sets), the easiest way would be to use variables.
At the end of your test case, add a step with Set_Var with a variable name and value (for example Status = Pass). If the test reaches this step, then this means your test has passed, otherwise the test will definitely have failed before executing it and the value will not be defined. Afterwards, you can create a step with an API call in your teardown which uses IF condition to check the value of the variable at the end of your test.
On the Information tab of your test case, you can select a Teardown Event from Any, Pass or Fail.
Regards,
Subject7 Team
Please sign in to leave a comment.