cancel
Showing results for 
Search instead for 
Did you mean: 

Junit Style Report using SoapUI Open Source

go2khurram
Contributor

Junit Style Report using SoapUI Open Source

Can anybody help that how can we created Junit style report using the free version of soapUI?

 

Thanks in advance.

Tags (2)
7 REPLIES 7
rupert_anderson
Valued Contributor

Re: Junit Style Report using SoapUI Open Source

Hi,

 

Via the UI this can be done by right-click (e.g. on project) Lauch TestRunner, you can then select the JUnit report style under the Reports tab:

 

lauch test runner.png

 

This effectively runs the testrunner script (found in the bin/ folder of SoapUI), the -j option is added on the testrunner.sh/bat if you want to generate JUnit reports via the command line instead e.g. 

 

./testrunner.sh -f"./reports" -j project.xml

You can also produce JUnit reports using Maven and other script types.

 

Is this what you're looking for?

 

Cheers,

Rupert

Author of SoapUI Cookbook
go2khurram
Contributor

Re: Junit Style Report using SoapUI Open Source

Rupert, Thanks for the prompt reply. Actually I had tried both options , I mean through test runners as well as command prompt. I have checked both options "Export Junit Results" and "Export Junit Result with test properties".

 

It doses created all the resquest and response files for individual test cases , but did not created any report. Is any thing I am missing or do I have to install any thing alomg with the SoapUI?

nmrao
Community Hero

Re: Junit Style Report using SoapUI Open Source

I believe that creates an xml file of junit style. If you want to have an html report, you may use ant and the junit report file above as input so that it will generate html report. I believe, is this what you looking for?
You can check here for more details
http://stackoverflow.com/questions/12952019/html-report-for-junit-by-ant


Regards,
Rao.
go2khurram
Contributor

Re: Junit Style Report using SoapUI Open Source

Thanks Rao,

 

Yes it does create the an xml file but what I was expecting an html report.

 

Regards,

rupert_anderson
Valued Contributor

Re: Junit Style Report using SoapUI Open Source

Hi,

 

Yeah, it does create an XML JUnit style report, which CI tools like Jenkins etc can read.

 

I just ran:

 

./testrunner.sh -sGetInvoiceTestSuite -r -a -j -J -f/Users/test/reports "/Users/test/soapui projects/SOAPDBMock-Reporting-soapui-project.xml"

And I got the following output in the console:

....
6:22:10,849 INFO [log] <TestSuite name="GetInvoiceTestSuite"> <TestCases> <TestCase name="GetInvoiceTestCaseFail" status="FINISHED"> <TestSteps> <TestStep name="getInvoice2" status="OK"> <Messages/> </TestStep> </TestSteps> </TestCase> <TestCase name="GetInvoiceTestCasePass" status="FINISHED"> <TestSteps> <TestStep name="getInvoice1" status="OK"> <Messages/> </TestStep> <TestStep name="getInvoice3" status="OK"> <Messages/> </TestStep> </TestSteps> </TestCase> </TestCases> </TestSuite> 16:22:10,856 INFO [SoapUITestCaseRunner] TestSuite [GetInvoiceTestSuite] finished with status [FINISHED] in 657ms SoapUI 5.2.1 TestCaseRunner Summary ----------------------------- Time Taken: 1352ms Total TestSuites: 1 Total TestCases: 2 (0 failed) Total TestSteps: 3 Total Request Assertions: 6 Total Failed Assertions: 0 Total Exported Results: 3

And the folowing files created in the /Users/test/reports folder:

 

GetInvoiceTestSuite-GetInvoiceTestCaseFail-getInvoice2-0-OK.txt

GetInvoiceTestSuite-GetInvoiceTestCasePass-getInvoice1-0-OK.txt

GetInvoiceTestSuite-GetInvoiceTestCasePass-getInvoice3-0-OK.txt

TEST-GetInvoiceTestSuite.xml (The JUnit one)

 

Cheers,

Rupert

 

Author of SoapUI Cookbook
rupert_anderson
Valued Contributor

Re: Junit Style Report using SoapUI Open Source

Ok, for an HTML report I tend to use another tools e.g. Jenkins.

 

SoapUI Pro/Ready API can do HTML reports, but the open source SoapUI can out-of-the-box.

 

Cheers,

Rup 

Author of SoapUI Cookbook
nmrao
Community Hero

Re: Junit Style Report using SoapUI Open Source

Can this be considered answer accepted then?


Regards,
Rao.
New Here?
Join us and watch the welcome video:
Announcements
Top Kudoed Authors