Saving Test Results to File
I have been saving test results to a file using an event: TestRunListener.afterStep with the following source.
def filePath = 'c:/output/'
def fileOutputStream = new FileOutputStream(filePath + testStepResult.testStep.label + '.txt', true)
def printWriter = new PrintWriter(fileOutputStream)
This works great! One question I have though. Is it possible to write out all the same data but leave any password or username information out of the output? All other data is great...
I want to do it similary to your scipt. I am at Ready!API and no programmer.
My task is to run about 100 testcases in one testsuite with each of them has up to 15 teststeps. So I want to have the results seperatet by the TestCase names. But using your script, I only have the Requests of the teststeps - not any result. And also I cannot get the TestCase name as n part of the TestStepName.
Afterwards I have to compare the files with the results of older application versions. So my filesystem should look like:
Is there anybody who can help me to get this automaitcly?
Please check my plugin which does few of the job you have asked,
Download the Plugin JAR from the release tab - Direct download link
Here are few descriptions about the plugin,
1) Supports SoapUI OS/ SoapUI Pro/ Ready! AP! - SoapUI NG
2) Right click at Project/ TestSuite/ TestCase/ TestStep level and export results
3) Automatically export results when run from Project/ TestSuite/ TestCase levels (except TestStep level)
Please feel free to fork and improve!
@Codehauss: Please use the plugin as specified in the above comment. I have complete howto documentation over the github page.
Thanks Samy, just install your plugin, works like a charm.
love it, just curious to ask about that plugins:
- is it possible to change path of the output file?
- currently only create folder per test suite, is it possible create folder per test case?
thanks Samy for wonderfull plugin 🙂
@codehauss: Please use the plugin as specified in the above comment. I have complete howto documentation over the github page.
I will soon make it fully configurable one and I like the suggestion to (TestCase level folder)! Will soon give you an update here!