Dependency on Previous API Tests

Options
bharatbarz
bharatbarz Posts: 44 ✭

In Our API Test Suite, Test 1 submits a mainframe job and this will give back Job ID, Job Name and Return Code. I am storing that in JSON databank. Based on the Return Code value of Test 1 (If 0), I need to execute Test 2. Please help me how to set this up.

Answers

  • benken_parasoft
    benken_parasoft Posts: 1,392 ✭✭✭
    edited October 2022
    Options

    See Test-Specific Logic Options where you can define a "Variable Condition". This allows you to configure a test to execute conditionally based on the value of a variable. You would need to first define the variable on the "Test Variables" tab and make sure your JSON Data Bank is configured to write to that variable instead of a custom column name.

  • bharatbarz
    bharatbarz Posts: 44 ✭
    Options

    Hi Benken, I did write the return code to a variable in Test 1 and I am checking the RC = "CC 0000" to execute Test 2. Suppose if RC != "CC 0000", then Test 2 is not executing as expected. But i would like to show that this Test 2 has been skipped. How to do set it up ?

  • bharatbarz
    bharatbarz Posts: 44 ✭
    Options

    Hi Benken, Ignore my post. I got the answer.. Thanks a lot for your guidance.