cancel
Showing results for 
Search instead for 
Did you mean: 

Generate a Report after running a Testsuite

SOLVED
New Contributor

Generate a Report after running a Testsuite

I have set up a Testsuite with 17 testcases. Rather than going into each case to see the output, i would like to print the Output (responses) into 1 file. 

 

Is there a way to do this, and if so, how? Im using SoapUI version 5.4.0 Free Version

 

Thanks in advance

1 ACCEPTED SOLUTION

Accepted Solutions
Highlighted
Community Leader

Re: Generate a Report after running a Testsuite

Hi @Mehman87 ,

 

Yes it can be achieved by writting custom groovy code. Let me know if you need help on this.


Click "Accept as Solution" if my answer has helped, and remember to give "kudos" Smiley Happy

Thanks and Regards,
Himanshu Tayal
3 REPLIES 3
Highlighted
Community Leader

Re: Generate a Report after running a Testsuite

Hi @Mehman87 ,

 

Yes it can be achieved by writting custom groovy code. Let me know if you need help on this.


Click "Accept as Solution" if my answer has helped, and remember to give "kudos" Smiley Happy

Thanks and Regards,
Himanshu Tayal
New Contributor

Re: Generate a Report after running a Testsuite

Thanks for your help on this @HimanshuTayal 

Are you able to send me an example of the code required please?

 

Thanks

Community Hero

Re: Generate a Report after running a Testsuite

Start with something basic like this in the TestSuite Teardown Script. Expand it as required:

 

import com.eviware.soapui.impl.support.http.HttpRequestTestStep

File out = new File("/temp/blah.txt")

testSuite.testCaseList.each {
	
    it.testStepList.findAll { it instanceof HttpRequestTestStep }.each { 

        out << "${it.testCase.name} -- ${it.name}" + "\n"
	out << it.httpRequest.requestContent + "\n\n"
	out << it.httpRequest.response.contentAsString + "\n\n"

    }
         
}
New Here?
Join us and watch the welcome video:
Join the exciting event
SeptemberHubBub
Top Kudoed Authors
Join the September Hub-bub to show off, learn and win