AnsweredAssumed Answered

Assertions to alter the flow of test

Question asked by rajeswari.krishnan on Aug 23, 2017
Latest reply on Aug 29, 2017 by rajeswari.krishnan

# monika mehta 

Devtest 8.2 - automation 

 

There are two questions here 

First question 

1. Would want to know the difference between abort the test and fail the test for assertions . If an assertion is true , gave the flow to be aborted , but its still continuing to the next step.

 

Second question 

2. I want to stop the execution flow if current execution status is 400 or 500 series status code . Below scripted assertion is not working . Ps let me know the correct assertion to abort the test 

 

if(testExec.getStateValue("lisa.getWarrantyeligibility.http.responseCode").equals("4/d/d") || (testExec.getStateValue("lisa.getWarrantyeligibility.http.responseCode").equals("5/d/d")))
return true;

 

Its returning false and ts going to next step. 

Outcomes