I have a very similar situation as explained in this thread -
Our Jenkins server has a job to generate a cloverized build and after that another downstream job to run Junit tests.
I copy the instrumented jars onto my test host (For eg: TestHost A).
Configure the startup options for the tomcat to have the correct location by using initstring property.
Then Jenkins runs Selenium Tests and RestApi tests for the application on TestHostA
After the tests have finished, for report generation, I run this command on TestHostA:
C:\clover>java -cp c:\clover\clover-4.0.2.jar com.atlassian.clover.reporters.html.HtmlReporter -i C:\clover_db\clover.db -o C:\clover_db\CloverJul22report
After the report is generated, when I check the Dashboard.html, its coverage numbers look exactly similar to the report for the Junit testcases
Another thing I observed on the command prompt is this error after issuing the report generation command:
ERROR: Failed to render syntax highlights for C:\smbufs1\build_myit\rbuild\bsmap
ps\dev\......The system cannot find the path specified)
This error has been reported I guess before, but I did not find any solution.
So now, my question is, in the report, how do I know that those numbers are from which kind of test - Junit, Selenium, RestAPI. Secondly, why are the report numbers same?
Even after the tests have finished, I see that the .1 files still being generated in the clover_db folder (Is that because the App is still running?)
Clover measures code coverage from every tests which run and accessed application code in any way, in fact it can also measure manual tests, because of how it works. If you want to have separate metrics/reports for separate types of tests run (i.e. JUnit, Integration-Tests, RestAPI Tests) you have to run them in different/separate executions and generate separate reports for single execution time. This can be achieved i.e with configuration of
maven-surefire-plugin. I've wrote about it a little bit more here, please refer to that comment.
About the error you're getting. I can't be sure without stacktrace or logs, but please confirm that Clover has access to the application source codes in a path specified by the log message.
Please contact us in case of any troubles.
Thank you for the response. In my initial email, I forgot to mention to you that "C:\smbufs1\build_myit\rbuild\bsmapps\dev\......" is a non-existent path. The path "...smbufs1\build_myit\rbuild\bsmapps\dev\......" is a shared filer where our clover build gets generated and stored.
Which logs can I refer to? I will check those and attach them here. How can I make sure that Clover has access to application source code locally on the Test Host?
You should be able to configure sources root path using
--sourcepath argument, please refer to the documentation for more information.
If this won't help, please rise an ticket on https://support.atlassian.com/ and attach logs generated by
HtmlReporter command with
I'm John Allspaw, co-founder of Adaptive Capacity Labs, where we help teams use their incidents to learn and improve. We bring research-driven methods and approaches to drive effective inciden...
Connect with like-minded Atlassian users at free events near you!Find a group
Connect with like-minded Atlassian users at free events near you!
Unfortunately there are no AUG chapters near you at the moment.Start an AUG
You're one step closer to meeting fellow Atlassian users at your local meet up. Learn more about AUGs