I am reading the test data from excel sheet and iterating the record.
On every iteration I am asserting the response in restassured.
Here is the code:
if (rbac == true && isallowed == var)
System.out.println("Test case is pass because rbac status and allowed status are matched");
else if (rbac == false && isallowed == false) {
assertEquals(403, response.statusCode());
System.out.println("Test case is pass because rbac status and allowed status are matched (false)");
}
else if (rbac == false && isallowed == true)
Assert.fail("Test case fail because rbac status is false but allowed status is true.");
else
Assert.fail("Test case fail");
Now I want
- Pass and failure test cases record will get logged in report.
- Test will continue if any record during test case will get failed until last record.