Forum Discussion

ashah1's avatar
ashah1
New Contributor
4 years ago
Solved

Assert results after parallel execution is done at suite level

I have 5 tests in 1 suite. All the tests are the same except few minor differences. I run the suite in parallel. Now 1 out of 5 (don't know which one of the 5 tests) tests should give response code of 200 and rest 4 response code of 480. 

How do i assert this after the parallel execution of the suite?

 

Assertion logic:

Iterate through the response of specific test step in each of 5 test cases.

Increase respective counters of 200 and 480 status codes

assert count of 200 == 1

assert count of 480 == 4

 

I tried putting the assertion logic it is tear down script however ReadyAPI hangs when assertion fails. I believe putting assertions in teardown script is known issue. 

 

How and where do i put my assertions?

  • I added another test case in the suite as disabled which just has the groovy script step for assertion and used the tear down script to just run the new test case. That work around works. Thanks

1 Reply

  • ashah1's avatar
    ashah1
    New Contributor

    I added another test case in the suite as disabled which just has the groovy script step for assertion and used the tear down script to just run the new test case. That work around works. Thanks