cancel
Showing results for 
Search instead for 
Did you mean: 

[RESOLVED] Exporting results as CSV

Frequent Contributor

[RESOLVED] Exporting results as CSV

Hi,
It is possible to export testsuite results as CSV file. How can I get a CSV file/s with all the testsuite results for a project? I need it to be at the level of testcase like the CSV file from the testsuite export.
Could I add an action to the project right-click menu to do this? How would I invoke the export to csv on each testsuite from a Groovy action extension script?
Regards
Peter
6 REPLIES 6

Re: Exporting results as CSV

Hello,

Check report button, instead generating jasper report or JUnit style report choose Data Export and for export format choose cvs, you could do this after you run TestSuite or TestCase.

Let me know does it helps,
robert


Did my reply answer your question? Give Kudos or Accept it as a Solution to help others. ⬇️⬇️⬇️
Frequent Contributor

Re: Exporting results as CSV

On the project>TestSuites tab ,the report button give Create Report dialog, but this does not have option for data export, only the ones o nthe testsuites and testcases have Data Export option

Re: Exporting results as CSV

Hello,

You have to run test suites first. So, click on run button and when they finish try report again, you should have Data Export now.

Let me know does it work for you,
robert


Did my reply answer your question? Give Kudos or Accept it as a Solution to help others. ⬇️⬇️⬇️
Frequent Contributor

Re: Exporting results as CSV

it does not give me the information I need.
I need to have a row for each testcase with at least testcase name and run status(PASS or fail etc)

Re: Exporting results as CSV

Hello,

Hm...try this:


import com.eviware.soapui.model.testsuite.TestStepResult.TestStepStatus

for ( result in runner.results ) {
def tc_name = result.getTestCase().getName()
def status = "OK"
for( stepResult in result.getResults() )
if( stepResult.status != TestStepStatus.OK ) {
status = "FAILED"
break;
}
def time = result.timeTaken
new File('/home/robert/ts_report.txt').append("$tc_name,$status,$time\n")
}




add this groovy script in teardown for test suite and change file name...


Let me know, does this helps,
robert


Did my reply answer your question? Give Kudos or Accept it as a Solution to help others. ⬇️⬇️⬇️
Frequent Contributor

Re: Exporting results as CSV

Yes.
It is useful thanks
New Here?
Join us and watch the welcome video:
Announcements