How to use clover for functional testing

I have different build machine ans test server.

I am instrumenting the class files using mavn-clover plugin.

I have copied the jars to /home/y/libexec/yjava_jetty/lib/ as well as /home/y/libexec/yjava_jetty/webapps/ROOT/WEB-INF/lib/.

I have created the same directory structure on test machine also.

So the cloer.db location is /tmp/mixer_snehaa_build/yos/yahoo/platforms/yos-social/mixer/components/engine/target/clover/clover.db on both build and test machines.

Setting veriable with following args.

yinst set yjava_jetty.java_opts="-Dclover.initstring.path=/tmp/mixer_snehaa_build/yos/yahoo/platforms/yos-social/mixer/components/engine/target/clover/clover.db -Dclover.license.path=/home/y/conf/clover/clover.license -Dclover.flushpolicy=interval -Dclover.flushinterval=5000"

mY jvm is running with following

yjava_jetty_start.sh ARCH = 64bit
yjava_jetty_start.sh JAVA_OPTS = -Dclover.initstring.path=/tmp/mixer_snehaa_build/yos/yahoo/platforms/yos-social/mixer/components/engine/target/clover/clover.db -Dclover.license.path=/home/y/conf/clover/clover.license -Dclover.flushpolicy=interval -Dclover.flushinterval=5000 -Xms128m -Xmx512m -Djava.awt.headless=true -Dsun.net.client.defaultConnectTimeout=5000 -Dsun.net.client.defaultReadTimeout=60000 -Djavax.net.ssl.keyStoreType=JKS -XX:+HeapDumpOnOutOfMemoryError -XX:HeapDumpPath=/home/y/logs/yjava_jetty -Djetty.logs=/home/y/logs/yjava_jetty -Djava.io.tmpdir=/home/y/libexec/yjava_jetty/temp -Djava.library.path=/home/y/lib64 -javaagent:/home/y/lib/jars/yjava_ysecure_agent.jar -Djava.security.auth.login.config=/home/y/libexec/yjava_jetty/conf/byauth_jaas.config -Dlog4j.configuration=file:///home/y/conf/yjava_jetty/log4j.properties -Dyjava_jetty.started_by_daemon=true

No coverage data is generated when i run the tests.

Any help in this regard is very helpful.

1 answer

Your spelling is atrocious, try cleaning up your post for better response.

ANywway iF usINg thEc mvbnDLvove plugin tyoyu dont need saDA 5peciy any libs, just add the apprtopitqae instrument and report steps to your pom.xml. and select "automatic" integration in the buildd plan.

<plugin>
				<groupId>org.mortbay.jetty</groupId>
				<artifactId>maven-jetty-plugin</artifactId>
				<version>6.1.24</version>
				<dependencies>
					<dependency>
						<groupId>org.mortbay.jetty</groupId>
						<artifactId>servlet-api-2.5</artifactId>
						<version>6.1.14</version>
					</dependency>
					<dependency>
						<groupId>commons-dbcp</groupId>
						<artifactId>commons-dbcp</artifactId>
						<version>1.2.1</version>
					</dependency>
					<dependency>
						<groupId>hsqldb</groupId>
						<artifactId>hsqldb</artifactId>
						<version>1.8.0.10</version>
					</dependency>
					<dependency>
						<groupId>com.cenqua.clover</groupId>
						<artifactId>clover</artifactId>
						<version>3.0.2</version>
					</dependency>


				</dependencies>
				<configuration>
					<jettyEnvXml>./src/test/resources/jetty/jetty-env.xml</jettyEnvXml>
					<scanIntervalSeconds>10</scanIntervalSeconds>
					<webAppConfig>
						<contextPath>/${context.root}</contextPath>
						<defaultsDescriptor>${basedir}/src/test/resources/jetty/webdefault.xml</defaultsDescriptor>
					</webAppConfig>
					<useTestClasspath>true</useTestClasspath>
					<stopKey>${project.artifactId}</stopKey>
					<stopPort>${jetty.stop.port}</stopPort>
					<systemProperties>
						<systemProperty>
							<name>jetty.port</name>
							<value>${jetty.port}</value>
						</systemProperty>
					</systemProperties>
				</configuration>
				<executions>
					<execution>
						<id>start-jetty</id>
						<phase>pre-integration-test</phase>
						<goals>
							<goal>run</goal>
						</goals>
						<configuration>
							<scanIntervalSeconds>0</scanIntervalSeconds>
							<daemon>true</daemon>
						</configuration>
					</execution>
					<execution>
						<id>stop-jetty</id>
						<phase>post-integration-test</phase>
						<goals>
							<goal>stop</goal>
						</goals>
					</execution>
				</executions>
			</plugin>

Suggest an answer

Log in or Sign up to answer
Community showcase
Published 3 hours ago in Statuspage

194 years of downtime: looking back on incident data from 2018

Statuspage customers logged more than 194 years of collective incidents in 2018. That’s a whopping 87% increase from the  104 years logged in 2017 , and we aren’t even through December yet....

14 views 0 3
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