Today, in continuation with my earlier post on Generate JUnit Style HTML reports let us see how to generate soapUI HTML reports dynamically.
JUnitReport Task will merge the XML files generated by JUnit task and will apply a style sheet to generate HTML results. The stylesheets applied would be either junit-frames or junit-noframes.
The frames format uses a stylesheet which is generating output only by redirecting. In this case the test result file name would be index.html.
The noframes format does not use redirecting and generates one single file called junit-noframes.html.
I have been using noframes format to generate soapUI HTML reports. On generating the HTML report each time, it will be overwriting the existing junit-noframes.html report. If I am not wrong, we don’t have any other option yet in JUnitReport to change the default report name but no worries..luckily we have a work around in our plate that would help us to achieve complete automation.
Well, let me explain it...
In the build.xml file add the following timestamp property.
Then add a move task just below your junitreport task to rename the generated junit-noframes.html file dynamically to your desired file name along with the timestamp as shown below:
This should take out the test result naming dependency and should help you in generating test results dynamically.
Do let me know if this article proved to be useful by dropping in a line below and do keep visiting Software Testers Forum for solutions. Happy Testing..!!
Technorati Tags: Generate,HTML,continuation,JUnit,Style,JUnitReport,Task,sheet,output,index,option,automation,dependency,article,Software,Testers,Forum,solutions,soapUI,noframes,timestamp
JUnitReport Task will merge the XML files generated by JUnit task and will apply a style sheet to generate HTML results. The stylesheets applied would be either junit-frames or junit-noframes.
The frames format uses a stylesheet which is generating output only by redirecting. In this case the test result file name would be index.html.
The noframes format does not use redirecting and generates one single file called junit-noframes.html.
I have been using noframes format to generate soapUI HTML reports. On generating the HTML report each time, it will be overwriting the existing junit-noframes.html report. If I am not wrong, we don’t have any other option yet in JUnitReport to change the default report name but no worries..luckily we have a work around in our plate that would help us to achieve complete automation.
Well, let me explain it...
In the build.xml file add the following timestamp property.
Then add a move task just below your junitreport task to rename the generated junit-noframes.html file dynamically to your desired file name along with the timestamp as shown below:
This should take out the test result naming dependency and should help you in generating test results dynamically.
Do let me know if this article proved to be useful by dropping in a line below and do keep visiting Software Testers Forum for solutions. Happy Testing..!!
Technorati Tags: Generate,HTML,continuation,JUnit,Style,JUnitReport,Task,sheet,output,index,option,automation,dependency,article,Software,Testers,Forum,solutions,soapUI,noframes,timestamp
Generate dynamic JUnit reports in soapUI
Reviewed by Suntaragali The Smart Techie
on
October 14, 2013
Rating:
Yes...it worked...thanks a tonn!!!
ReplyDeleteThanks for this, I used this to help a user on StackOverflow, I gave you credit ;), see http://stackoverflow.com/questions/32324307/customized-html-report-name-in-junitreport-task
ReplyDeleteIs there any way to print testSteps in junit reports?
ReplyDeleteAmit - For now I don't see any possibilties.. will have to try. As a workaround,instead of having multiple tests steps in one test case, try putting each test step in its own test case. In that way you should be able to see the test steps in the generated HTML report.
DeleteHi Suntaragali,
ReplyDeleteThanks for sharing this and it's very useful for us.
I have one question here.
Is there any way to capture response of the API and include the same in report?
I see its happening if its failure??. can we do it for 200 OK status too.?
Please help if possible.
GB WhatsApp APK Download Latest Version 2024 Anti Ban You Can Use GB Whatsapp OFFICIAL With Extra Features Without Any Temporary Ban issue.
ReplyDeleteGB Whatsapp APK
Download GBWhatsApp Download APK Latest Version 2024 Anti Ban You Can Use without Any Temporary Ban issue Enjoy Latest GB Whatsapp OFFICIAL With Extra Features.
ReplyDeleteGB Whatsapp APK