Can we introduce wait period between two tests in a test suite ?

Options
bharatbarz
bharatbarz Posts: 44 ✭

We have a test suite with multiple tests. Test 1 calls an API which submits a job in mainframes and doesn't wait till the job gets completed and will give a success condition once the job is submitted. Test 2 reads a file that is created by the submitted job. Sometimes the job might take some time and as Test 2 runs immediately after Test 1, it fails stating file not available. So is it possible that we can introduce some WAIT period between these 2 tests ?

Best Answer

  • Matt Love
    Matt Love Posts: 107 admin
    Answer ✓
    Options

    I recommend moving Test 2 to a sub-suite and then edit the Test Suite > Execution Options > Test Flow Logic to add a wait time before Test 2 executes. For robustness you can also set the sub-suite to loop until all tests pass. For example, your scenario can call an API which submits a job on the mainframe and then checks for the result file every second for up to 10 seconds later.

Answers