cancel
Showing results for 
Search instead for 
Did you mean: 

Generate a Report after running a Testsuite

SOLVED
Highlighted
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
Community Leader

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,
Remember to give "Kudos" 🙂 ↓↓↓↓↓



Thanks and Regards,
Himanshu Tayal

View solution in original post

3 REPLIES 3
Community Leader

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,
Remember to give "Kudos" 🙂 ↓↓↓↓↓



Thanks and Regards,
Himanshu Tayal

View solution in original post

Highlighted
New Contributor

Thanks for your help on this @HimanshuTayal 

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

 

Thanks

Highlighted
Community Hero

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:
Announcements
Top Kudoed Authors