How to loop through results of individual test cases and recover testCase details
Hello everyone,
This will be my first post in the comunity and I've got to warn you, it's gonna be very oldscool
So here it goes. I recently "inherited an old SoapUI project which I am currently running in ReadyAPI and which need to modify.
I have a report generating script which is called from the teardown script of the other test cases via the following code:
testRunner.testCase.testSuite.project.testSuites["Library"].testCases["Reporting_Utility"].
testSteps["GenerateCSVReport"].run(testRunner, context);
On the other side, the report generate script is iterating through the test step results like so:
for(testCaseResult in runner.results())
{
def testSuite = testRunner.testCase.testSuite.name;
def testCase = testCaseResult.testCase.name //testRunner.testCase.name;
def testStep = stepResult.getTestStep();
def testStepName = testStep.name
reportFile.append('"' + testSuite + '",');
reportFile.append('"' + testCase + '",');
reportFile.append('"' + testStepName + '",');
reportFile.append('"' + status + '",' + "\n");
}
How can I loop through the results at test case level instead of the test step level?
I only need the overall fail/pass of each testcase.name + testsuite + status
Any help would be greatly appreciated