Hi,
I want attach a code coverage tool against code that can be executed on remote systems which can provide metrics on a regular basis, either at build time or weekly. Also it should be automated within Jenkins jobs either triggered at build time, deploy time or at some regular interval.
Please advice whether we are capable of measuring the code coverage of the remote Application in this case using Clover.
Hi Marek,
I have followed the same steps what you have described in previous post. In my case I have multi module ant project. In each project I have added following in the build.xml file:
<!-- Clover Setup -->
<property name="clover.jar" location="../javalibs/clover-4.0.4.jar"/>
<property name="coverage.results.dir" location="D:\installed\Atlasian\clover\mergeddb"/>
<property name="coverage.flush.interval" value="1000"/>
<taskdef resource="cloverlib.xml" classpath="${clover.jar}"/>
<property name="coverage.db" value="${coverage.results.dir}/coverage.db"/>
<target name="with.clover" >
<clover-setup initstring="${coverage.db}" flushpolicy="interval" flushinterval="500" />
</target>
<!-- Clover Setup -->
I am compiling all the projects using following ant command:
ant clean with.clover jar
It is creating coverage.db file in specified location.
Then I am starting my jboss application server with following command
run.bat -Dclover.initstring.basedir=D:\installed\Atlasian\clover\mergeddb
Then I am executing my unit test cases. JBOSS lib folders contains clover jar file.
I want to generate colver recorder files without shutting down the jboss server. But recorder files getting generated only when I am shutting down the jboss application server.
Please help!!
Hi Rocky,
Shortly speaking what you have to do is:
Cheers
Marek
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Hi Rocky,
can be executed on remote systems
Could you please specify what do you mean by "executed on remote systems". I'm asking, because Clover supports measuring code coverage of distributed applications, but I'd like to ensure that we have the same understanding of the "remote" term.
can provide metrics on a regular basis, either at build time or weekly
Clover must run during a build in order to measure code coverage and to generate reports. You can later access these reports at any time. Some customers also integrate Clover with Sonar.
it should be automated within Jenkins jobs either triggered at build time, deploy time or at some regular interval.
It's up to you how you'd like to configure Jenkins jobs.
Cheers
Marek
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Hi Marek,
Thanks for reply. We want to measure code coverage of web service that is running on remote server. So we need a code coverage tool that can run on remote system and provide us with metrics.
Also please give me the information on how to setup the whole installation process.
Thanks!!
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Hi Rocky, there's no single page for this, I'm afraid. I'd like to suggest to read the following articles: * https://confluence.atlassian.com/display/CLOVER/Using+Clover+for+web+applications - how to measure code coverage in web applications in general * https://confluence.atlassian.com/display/CLOVER/Using+Clover+in+various+environment+configurations - there are many deployment options, you may look for one which fits best your needs * https://confluence.atlassian.com/display/CLOVERKB - in case you got stuck at some point
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.