smartTest
13 years agoContributor
[Resolved] Saving all TestStep's results into files
Hiya
I found the above on your Tips & Tricks page but can't quite get it to work, not very good a scripting unfortunately. The code I have set in Events under TestRunListener.afterStep is:
filePath = 'c:/SoapUi Reports/'
fos = new FileOutputStream( filePath + testStepResult.testStep.label + '.txt', true )
pw = new PrintWriter( fos )
testStepResult.writeTo( pw )
pw.close()
fos.close()
Its creating files for reach test step, but isn't populating it with anything, yet the Tips & Tricks say it should "...save the result (request data, response data, response time, etc.) of every executed TestStep in a Project."
Can you let me know how I can update the script to provide this detail.
Thanks
Diana

I found the above on your Tips & Tricks page but can't quite get it to work, not very good a scripting unfortunately. The code I have set in Events under TestRunListener.afterStep is:
filePath = 'c:/SoapUi Reports/'
fos = new FileOutputStream( filePath + testStepResult.testStep.label + '.txt', true )
pw = new PrintWriter( fos )
testStepResult.writeTo( pw )
pw.close()
fos.close()
Its creating files for reach test step, but isn't populating it with anything, yet the Tips & Tricks say it should "...save the result (request data, response data, response time, etc.) of every executed TestStep in a Project."
Can you let me know how I can update the script to provide this detail.
Thanks
Diana

