You are viewing a plain text version of this content. The canonical link for it is here.
Posted to users@maven.apache.org by gbois <gr...@bnpparibas.com> on 2006/11/21 17:16:57 UTC

Instrument code for integration test with Cobertura and Cargo

Hi,

I use Maven 2 with Cargo and Corbertura (for the moment).

I want a dashboard on code coverage for my intergration test (my integration
test is selenium test).
I have bind my integration test to the test phase.

My code is
<plugin>
	<groupId>org.codehaus.cargo</groupId>
        <artifactId>cargo-maven2-plugin</artifactId>
	<version>0.3-SNAPSHOT</version>
		<executions>
				<execution>
						<id>start-container</id>
						<phase>process-test-sources</phase>
						<goals>
							<goal>start</goal>
							<goal>deploy</goal>
						</goals>
						<configuration>
							<deployer>
								<deployables>
									<deployable>
										<groupId>myproj</groupId>
										<artifactId>myproj_ear</artifactId>
										<type>ear</type>
										<pingURL>http://localhost:8080/</pingURL>
										<pingTimeout>540000</pingTimeout>
									</deployable>
								</deployables>
							</deployer>
							<wait>false</wait>
							<container>
								<containerId>jboss4x</containerId>
								<home>C:\tools\jboss-4.0.2</home>
								<timeout>180000</timeout>
							</container>							
						</configuration>
					</execution>
					<execution>
						<id>stop-container</id>						
						<phase>test</phase>						
						<goals>
							<goal>stop</goal>
						</goals>
					</execution>
				</executions>
			</plugin>


mvn test works and with mvn site fails

When cobertura instruments the code, second execution of the tests because
the cargo start fail.
Because, the first step of Cobertura doesn't stop it.
I suppose Cobertura uses his own life cycle.

Have you got an idea to solve my problem?

Thanks a lot.

Grégory BOISSINOT
BP2S PARIS
-- 
View this message in context: http://www.nabble.com/Instrument-code-for-integration-test-with-Cobertura-and-Cargo-tf2679754s177.html#a7474157
Sent from the Maven - Users mailing list archive at Nabble.com.


---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscribe@maven.apache.org
For additional commands, e-mail: users-help@maven.apache.org


Re: Instrument code for integration test with Cobertura and Cargo

Posted by gbois <gr...@bnpparibas.com>.
I rewrite my question.

I want a code coverage for my integration test 
(the integration test with selenium instruments the war module).
I have a it (integration test) module 
and i want a dashboard on code coverage for my sources on my war module.

How you do that?

Thanks
Grégory


gbois wrote:
> 
> Hi,
> 
> I use Maven 2 with Cargo and Corbertura (for the moment).
> 
> I want a dashboard on code coverage for my intergration test (my
> integration test is selenium test).
> I have bind my integration test to the test phase.
> 
> My code is
> <plugin>
> 	<groupId>org.codehaus.cargo</groupId>
>         <artifactId>cargo-maven2-plugin</artifactId>
> 	<version>0.3-SNAPSHOT</version>
> 		<executions>
> 				<execution>
> 						<id>start-container</id>
> 						<phase>process-test-sources</phase>
> 						<goals>
> 							<goal>start</goal>
> 							<goal>deploy</goal>
> 						</goals>
> 						<configuration>
> 							<deployer>
> 								<deployables>
> 									<deployable>
> 										<groupId>myproj</groupId>
> 										<artifactId>myproj_ear</artifactId>
> 										<type>ear</type>
> 										<pingURL>http://localhost:8080/</pingURL>
> 										<pingTimeout>540000</pingTimeout>
> 									</deployable>
> 								</deployables>
> 							</deployer>
> 							<wait>false</wait>
> 							<container>
> 								<containerId>jboss4x</containerId>
> 								<home>C:\tools\jboss-4.0.2</home>
> 								<timeout>180000</timeout>
> 							</container>							
> 						</configuration>
> 					</execution>
> 					<execution>
> 						<id>stop-container</id>						
> 						<phase>test</phase>						
> 						<goals>
> 							<goal>stop</goal>
> 						</goals>
> 					</execution>
> 				</executions>
> 			</plugin>
> 
> 
> mvn test works and with mvn site fails
> 
> When cobertura instruments the code, second execution of the tests because
> the cargo start fail.
> Because, the first step of Cobertura doesn't stop it.
> I suppose Cobertura uses his own life cycle.
> 
> Have you got an idea to solve my problem?
> 
> Thanks a lot.
> 
> Grégory BOISSINOT
> BP2S PARIS
> 

-- 
View this message in context: http://www.nabble.com/Instrument-code-for-integration-test-with-Cobertura-and-Cargo-tf2679754s177.html#a7474962
Sent from the Maven - Users mailing list archive at Nabble.com.


---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscribe@maven.apache.org
For additional commands, e-mail: users-help@maven.apache.org