ripplegupta
8 years agoContributor
How to get result of all test steps in groovy test step of last test suite.
Please help here... Thanks in advance.
I have three test suites in one project. Last one contains only one test case which contains a groovy test step. How can I get status(i.e.failed/ok) of all test steps from all test suites in groovy test step of last suite?
Following data I need in groovy test step :
- Result (pass or failed) of each test step in all test suites. (i can traverse through assertion list in case of jdbc or rest request but other steps like data source, groovy script dont have assertions, i can only check their status to know whether its pass or failed.
- Error message if test step is failed.
I tried below code in groovy test step but UNKNOWN is returned.
getTestStepList().each { assert it instanceof WsdlTestStep def result = new WsdlTestStepResult(it) log.info result.status }