Forum Discussion
Radrigo,
I guess you requirement is similar to generating a Project level - JUnit style reporting through SoapUI's inbuilt option as mentioned in the below screen shot, (If it is convinient for you, please make use of this option as it gives more than expected)
To match your requirement, I experimented with below script and couldn't find the expected result with just looping through the runner results , (Sharing in this forum as others might find some clues) :smileyhappy:
for( projectResult in runner.results)
{
log.info "Project name : " + projectResult.getProject().name
log.info "Project status : " + projectResult.getStatus().toString()
for ( testSuiteResult in projectResult.results )
{
log.info "Test suite name : " + testSuiteResult.getTestSuite().name
log.info "Test suite status : " + testSuiteResult.getStatus().toString()
for ( testCaseResult in testSuiteResult.getResults() )
{
log.info "Test case name : " + testCaseResult.getTestCase().name
log.info "Test case status : " + testCaseResult.getStatus().toString()
}
}
}Thanks,
Samy
- chimas11 years agoOccasional Contributor
Thank you Samy
I think this option of Junit style report can solve my problem.
But do you know if I can call the generation of this Junit report inside Project Teardown script?
So in that way I can open this file inside the Teardown and add it to the body of the email, not as attachment.
For my original question I found a solution saving one file with html code on the project path and incrementing the results on each TestSuite - TearDown end on the Project - TearDown I'm opening that file and populating the body of the email with the content of this file.
- kondasamy11 years agoRegular Contributor
You should probably use exportJunitReports method of SoapUITestCaseRunner class. Please try and let us know!
Thanks,
Samy