Submit and vote on feature ideas.

Welcome to the new Parasoft forums! We hope you will enjoy the site and try out some of the new features, like sharing an idea you may have for one of our products or following a category.

Is there a way to have a specific test run if the test being executed fails?

BrianQuantum
BrianQuantum Posts: 23

I have a rest API that I am testing. I would like to run a test that grabs the log files from my server when a test being executed fails, i.e.,
Test 1 - POST command
. Test 1 Fails, GET Logs
ELSE
. Continue

Comments

  • OmarR
    OmarR Posts: 233 admin
    edited August 2017

    Hello,

    I recommend taking a look at the options under Test Flow Logic within your Test Suite:

    1. Select the dependent Test.
    2. Under Test Result Dependency, select the test we will depend on.
    3. Select the condition (Succcess, Failure, Skipped) it needs to meet in order for the dependent test to execute/

    The configurations below are set for Test 2 to depend on Test 1. Test 2 will only execute if Test 1 returns a Failure.