how to know source of coverage from html report

Hello,
I have a very similar situation as explained in this thread - 

https://answers.atlassian.com/questions/19140849

Our Jenkins server has a job to generate a cloverized build and after that another downstream job to run Junit tests.
After that:
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.
Start tomcat
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?)
Thanks,
Sunita

3 answers

0 vote

Hey Sunita, 

 

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.

 

Best regards,

Grzegorz Lewandowski 

Hello Grzegorz,

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? 

0 vote

Hello,

 

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 --debug argument. 

 

Cheers,

Grzegorz Lewandowski

Suggest an answer

Log in or Sign up to answer
Atlassian Community Anniversary

Happy Anniversary, Atlassian Community!

This community is celebrating its one-year anniversary and Atlassian co-founder Mike Cannon-Brookes has all the feels.

Read more
Community showcase
Fadoua M. Boualem
Published Monday in Trello

Using Trello to manage events

As a Jira power user, I was at first doubtful that Trello could benefit my workflow. Jira already uses boards (ones you can customize!), so why would I even need to use Trello?! In this post you will...

476 views 7 8
Read article

Atlassian User Groups

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!

Find my local user group

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

Groups near you