ReadyAPI Platform and Tools

Reply
Highlighted
Occasional Contributor

Write SoapUI Pro testsuite output to a database?

I am constructing a dashboard for our systems and would like to know how to send testsuite output to a database (MSSQL).  I configured the database connection in SoapUI Pro and can ping the database from the server that ReadyAPI runs on.  

 

Is there a way to send testsuite results directly to a database?  

Staff

Re: Write SoapUI Pro testsuite output to a database?

Thank you for posting to our Community Forum.

 

Here is a script that you can insert in the "Teardown Script" field of each TestSuite which writes the results to a file:

 

fos = new FileOutputStream('C:/temp/test-log.txt', true )

pw = new PrintWriter( fos )


pw.write(testSuite.name + ": "+runner.status.toString())

pw.close()
fos.close()

Since you need to write this into a DB, you can replace the file-writing code with JDBC code to write into a specified DB. Unfortunately I do not have a sample of that but this should help you.

 

Let me know if you have any questions/concerns.

Steven
SmartBear Staff
Associate Support Engineer



Take part in a new Community program - 12 Days of Software Quality
New Contributor

Re: Write SoapUI Pro testsuite output to a database?

I have same requirement to log SecurePro test result in own dashboard (report portal.io)
Where we need to store test results in junit result xml file.

Is there any way to store test results in junit xml format.
Occasional Contributor

Re: Write SoapUI Pro testsuite output to a database?

Thank you for this help!  Using this in the TestSuite TearDown script, the results is writes is "Finished".  It does not

give Pass/Fail status.  I'm trying to write to a database we use for a system dashboard and would like to show the pass/fail results.  Is there a way to do that?

Occasional Contributor

Re: Write SoapUI Pro testsuite output to a database?

Once again thank you for the help!  We actually would like to ask anyone who reads this if they could provide the script we need to write to a database instead of the file.

Join us to win gifts
Daily Articles: 1, 2, 3, 4, 5, 6, 7

Program Rules
Do you do REST?