Create
cancel
Showing results for 
Search instead for 
Did you mean: 
Sign up Log in

How to use clover for functional testing

Sneha Ambalge September 14, 2011

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

1 vote
EddieW
Rising Star
Rising Star
Rising Stars are recognized for providing high-quality answers to other users. Rising Stars receive a certificate of achievement and are on the path to becoming Community Leaders.
September 18, 2011

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
TAGS
AUG Leaders

Atlassian Community Events