I am getting error when running clover-report, like:
[clover-report] Failed to render syntax highlights for /home/ta230208/TeamCity_Agent_Space/sdvsue800/TeamCity-Agents/ta230208/work/47becb009e2f5761/Commons/src/java/com/teradata/datamovement/model/DDLComparable.java [clover-report] java.io.FileNotFoundException: /home/ta230208/TeamCity_Agent_Space/sdvsue800/TeamCity-Agents/ta230208/work/47becb009e2f5761/Commons/src/java/com/teradata/datamovement/model/DDLComparable.java (No such file or directory)java.io.FileNotFoundException: /home/ta230208/TeamCity_Agent_Space/sdvsue800/TeamCity-Agents/ta230208/work/47becb009e2f5761/Commons/src/java/com/teradata/datamovement/model/DDLComparable.java (No such file or directory) [clover-report] at java.io.FileInputStream.open(Native Method) [clover-report] at java.io.FileInputStream.<init>(FileInputStream.java:120) [clover-report] at java.io.FileReader.<init>(FileReader.java:55) [clover-report] at com.cenqua.clover.registry.FileInfo.getSourceReader(FileInfo.java:442) [clover-report] at com.cenqua.clover.reporters.html.source.SourceRenderHelper.getChecksummingReader(SourceRenderHelper.java:413) [clover-report] at com.cenqua.clover.reporters.html.source.SourceRenderHelper.render(SourceRenderHelper.java:389) [clover-report] at com.cenqua.clover.reporters.html.source.SourceRenderHelper.gatherSrcRenderInfo(SourceRenderHelper.java:154) [clover-report] at com.cenqua.clover.reporters.html.source.SourceRenderHelper.insertLineInfosForFile(SourceRenderHelper.java:83) [clover-report] at com.cenqua.clover.reporters.html.RenderFileAction.insertLineInfos(RenderFileAction.java:284) [clover-report] at com.cenqua.clover.reporters.html.RenderFileAction.render(RenderFileAction.java:131) [clover-report] at com.cenqua.clover.reporters.html.RenderFileAction.call(RenderFileAction.java:115) [clover-report] at com.cenqua.clover.util.CloverExecutors$LoggingCallable.call(CloverExecutors.java:86) [clover-report] at clover.retrotranslator.edu.emory.mathcs.backport.java.util.concurrent.FutureTask.run(FutureTask.java:178) [clover-report] at clover.retrotranslator.edu.emory.mathcs.backport.java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1061) [clover-report] at clover.retrotranslator.edu.emory.mathcs.backport.java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:575) [clover-report] at java.lang.Thread.run(Thread.java:662) [clover-report] /home/ta230208/TeamCity_Agent_Space/sdvsue800/TeamCity-Agents/ta230208/work/47becb009e2f5761/Commons/src/java/com/teradata/datamovement/model/DDLComparable.java (No such file or directory)
Right now getting only 4% for a test but as told by developer it should be above 30%. My build server is different than test server [...]?
If coverage is lower that expected then it must be something wrong in your environment/build setup. There are many possibilities how to configure Clover for builds on mutiple machines. See:
Questions worth answering:
Actually my product has three components, one can be said as client and other two are servers. They all communicate through a message queue (MQ). Now the issue is I am getting coverage for only client code, I am not able to see any coverage for servers code and that's why my coverage is very low. I have instrumented code for all three components and a coverage.db file.
Can you please let me know how can I get coverage info of those codes as well?
I suggest a following lecture:
Shortly speaking, you have to ensure that:
* Clover database (clover.db) is available from your application server - either use an absolute path for initstring (assuming that build server and test server is the same machine) or provide a -Dclover.inistring JVM option for server's JVM
* Clover runtime JAR (clover.jar) is available in classpath - the easiest way is to put it into <server_dir>/lib directory, so that Clover becomes available for all applications deployed on a server
I suggest checking server's logs whether they contain any Clover-related messages - they shall be present in case of problems mentioned above. You can also run an application server with -Dclover.logging.level=debug to get even more details.
It's not mandatory to include sources in the HTML report. Lack of sources does not decrease code coverage either.
You can use <clover-report> with srcLevel=false to skip source page rendering:
<clover-report> <current outfile="clover_html"> <format type="html" srcLevel="false"/> </current> </clover-report>
You can also use <clover-report> with <sourcepath> option to point to a different location of sources:
<clover-report> <current outfile="clover_html"> <format type="html"/> <sourcepath> <pathelement path="/some/other/location"/> </sourcepath> </current> </clover-report>
Not really ... The clover.license is required for code instrumentation and for report generation. License key is not required to run instrumented application and record coverage files.
Excerpt from https://www.atlassian.com/licensing/clover:
A Clover machine is defined as a single physical computer that Clover is used on to instrument source code or generate coverage reports [...]
G’day everyone! Super exciting news coming from the Marketplace. We have now fully rolled out the ability for end-users to submit app requests to admins directly from within the product! No longer ...
Connect with like-minded Atlassian users at free events near you!Find an event
Connect with like-minded Atlassian users at free events near you!
Unfortunately there are no Community Events near you at the moment.Host an event
You're one step closer to meeting fellow Atlassian users at your local event. Learn more about Community Events