[arquillian-issues] [JBoss JIRA] (ARQ-1387) Support code coverage for jar/war deployed by ZipImporter

yangju (JIRA) issues at jboss.org
Mon Mar 3 16:22:37 EST 2014


    [ https://issues.jboss.org/browse/ARQ-1387?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=12949564#comment-12949564 ] 

yangju commented on ARQ-1387:
-----------------------------

pom file is below:
<profile>
			<id>coverage</id>
			<activation>
				<activeByDefault>false</activeByDefault>
				<property>
					<name>arquillian</name>
					<value>integration</value>
				</property>
			</activation>
			<dependencies>
				<dependency>
					<groupId>org.jboss.as</groupId>
					<artifactId>jboss-as-arquillian-container-remote</artifactId>
					<scope>test</scope>
					<exclusions>
						<exclusion>
							<groupId>asm</groupId>
							<artifactId>asm</artifactId>
						</exclusion>
					</exclusions>
				</dependency>
				<dependency>
					<groupId>org.jboss.arquillian.extension</groupId>
					<artifactId>arquillian-jacoco</artifactId>
					<version>${arquillian.jacoco.version}</version>
					<scope>test</scope>
					<exclusions>
						<exclusion>
							<groupId>asm</groupId>
							<artifactId>asm</artifactId>
						</exclusion>
					</exclusions>
				</dependency>
				<dependency>
					<groupId>org.jacoco</groupId>
					<artifactId>org.jacoco.core</artifactId>
					<version>${jacoco.version}</version>
					<exclusions>
						<exclusion>
							<groupId>asm</groupId>
							<artifactId>asm</artifactId>
						</exclusion>
					</exclusions>
				</dependency>
					
			</dependencies>
			<build>
				<plugins>
					<plugin>
						<groupId>org.apache.maven.plugins</groupId>
						<artifactId>maven-surefire-plugin</artifactId>
						<configuration>
							<systemPropertyVariables>
								<arquillian.launch>group-integration</arquillian.launch>
								<arquillian>integration-test</arquillian>
								<arquillian_server_address>${arquillian.server.url}</arquillian_server_address>
								<mongo-host>${mongo.host.url}</mongo-host>
								<redis_host>${redis.host.url}</redis_host>
								<!-- <arquillian_server_address>10.168.14.158</arquillian_server_address> 
									<mongo-host>10.168.15.79</mongo-host> <redis_host>10.168.13.203</redis_host> -->
							</systemPropertyVariables>
							<propertyName>${argLine}</propertyName>
						</configuration>
						<executions>
							<execution>
								<id>unit-test</id>
								<phase>test</phase>
								<goals>
									<goal>test</goal>
								</goals>
								<configuration>
									<skip>${maven.test.skip}</skip>
									<argLine>${argLine}</argLine>
									<excludes>
										<exclude>**/jbossas/**</exclude>
										<exclude>**/selenium/**</exclude>
										<exclude>**/nosql/**</exclude>

										<exclude>**/arquillian/*.*</exclude>
									</excludes>
								</configuration>
							</execution>
						</executions>
					</plugin>

					<plugin>
						<groupId>org.apache.maven.plugins</groupId>
						<artifactId>maven-failsafe-plugin</artifactId>
						<version>2.16</version>
						<configuration>
							<skip>${skipITs}</skip>
							<argLine>${failsafe.argLine}</argLine>
							<includes>
								<include>**/arquillian/**.*</include>
							</includes>
						</configuration>
						<executions>
							<execution>
								<id>default-integration-test</id>
								<phase>integration-test</phase>
								<goals>
									<goal>integration-test</goal>
								</goals>
							</execution>
							<execution>
								<id>verify</id>
								<goals>
									<goal>verify</goal>
								</goals>
							</execution>
						</executions>
					</plugin>

					<plugin>
						<groupId>org.jacoco</groupId>
						<artifactId>jacoco-maven-plugin</artifactId>
						<version>${jacoco.version}</version>
						<executions>
							<execution>
								<id>pre-unit-test</id>
								<goals>
									<goal>prepare-agent</goal>
								</goals>
							</execution>
							<execution>
								<id>post-unit-test</id>
								<phase>test</phase>
								<goals>
									<goal>report</goal>
								</goals>
							</execution>

							<execution>
								<id>pre-integration-test</id>
								<phase>pre-integration-test</phase>
								<goals>
									<goal>prepare-agent-integration</goal>
								</goals>
								<configuration>
									<destFile>${sonar.jacoco.itReportPath}</destFile>
									<propertyName>failsafe.argLine</propertyName>
								</configuration>
							</execution>

							<execution>
								<id>default-report-integration</id>
								<phase>post-integration-test</phase>
								<goals>
									<goal>report-integration</goal>
								</goals>
								<configuration>
									<dataFile>${sonar.jacoco.itReportPath}</dataFile>
								</configuration>
							</execution>
							<execution>
								<id>default-check</id>
								<goals>
									<goal>check</goal>
								</goals>
							</execution>

						</executions>
					</plugin>



				</plugins>
			</build>
		</profile>

                
> Support code coverage for jar/war deployed by ZipImporter
> ---------------------------------------------------------
>
>                 Key: ARQ-1387
>                 URL: https://issues.jboss.org/browse/ARQ-1387
>             Project: Arquillian
>          Issue Type: Feature Request
>      Security Level: Public(Everyone can see) 
>          Components: Extension - Jacoco
>    Affects Versions: jacoco_1.0.0.Alpha5
>         Environment: jdk 1.7, org.jacoco.core.0.6.2.20130203000
>            Reporter: Andy Ma
>            Assignee: Aslak Knutsen
>              Labels: arquillian-jacoco, jacoco
>             Fix For: jacoco_1.0.0.Alpha6
>
>
> If deployed with ZipImporter like: 
> ShrinkWrap.create(ZipImporter.class, name)
>         .importFrom(new File(MODULE_PATH + "/" + name)).as(WebArchive.class);
> the code coverage of imported archive can not be reported.

--
This message is automatically generated by JIRA.
If you think it was sent incorrectly, please contact your JIRA administrators
For more information on JIRA, see: http://www.atlassian.com/software/jira


More information about the arquillian-issues mailing list