ashkht
8 years agoContributor
How to get TestStep Status as Passed/Failed using groovy
Hello, I am trying out a way which can give me TestStep Status as Failed/Passed using groovy so that based on this status i can update Pass/fail against test case in excel from where it is data d...
- 7 years ago
You can get the status of individual assertions from the Assertion Test Step with the following script in the Groovy Test Step:
def testStep = testRunner.testCase.getTestStepByName("Assertion") //change to your name def list = testStep.getAssertionEntryList() for( assertion in list) { //log.info(assertion.getProperties()) log.info("Assertion: " + assertion) log.info("Assertion: " + assertion.status) }