2014-09-02 2 views
0

통합 테스트가 포함 된 모듈 중 하나가 포함 된 다중 모듈 java maven 프로젝트가 있습니다. jacoco-maven-plugin을 사용하여 해당 모듈에서 jacoco-it.exec을 성공적으로 생성했습니다. 그러나 어떤 이유로 html 보고서가 만들어지지 않습니다. 소나는이 보고서를 읽지 않습니다.Jacoco IT 보고서가 생성되었지만 html이 없습니다.

단위 테스트에는 적합하지만 통합 테스트에는 적합하지 않습니다. 여기

내가 pom.xml 파일에 추가 된 것입니다 :

<plugin> 
     <groupId>org.jacoco</groupId> 
     <artifactId>jacoco-maven-plugin</artifactId> 
     <version>0.7.1.201405082137</version> 
     <executions> 
      <execution> 
       <id>default-prepare-agent</id> 
       <goals> 
        <goal>prepare-agent</goal> 
       </goals> 
      </execution> 
      <execution> 
       <id>default-report</id> 
       <phase>prepare-package</phase> 
       <goals> 
        <goal>report</goal> 
       </goals> 
      </execution> 
      <execution> 
       <id>default-check</id> 
       <goals> 
        <goal>check</goal> 
       </goals> 
       <configuration> 
        <rules> 
         <rule implementation="org.jacoco.maven.RuleConfiguration"> 
          <element>BUNDLE</element> 
          <limits> 
           <limit implementation="org.jacoco.report.check.Limit"> 
            <counter>COMPLEXITY</counter> 
            <value>COVEREDRATIO</value> 
            <minimum>0.1</minimum> 
           </limit> 
          </limits> 
         </rule> 
        </rules> 
       </configuration> 
      </execution> 
      <execution> 
       <id>default-prepare-agent-integration</id> 
       <phase>pre-integration-test</phase> 
       <configuration> 
        <destFile>target/jacoco-it.exec</destFile> 
        <propertyName>failsafe.argLine</propertyName> 
       </configuration> 
       <goals> 
        <goal>prepare-agent-integration</goal> 
       </goals> 
      </execution> 
      <execution> 
       <id>default-report-integration</id> 
       <phase>post-integration-test</phase> 
       <goals> 
        <goal>report-integration</goal> 
       </goals> 
      </execution> 
     </executions> 
    </plugin> 
    <plugin> 
     <groupId>org.apache.maven.plugins</groupId> 
     <artifactId>maven-failsafe-plugin</artifactId> 
     <version>2.16</version> 
     <configuration> 
      <argLine>${failsafe.argLine}</argLine> 
     </configuration> 
     <executions> 
      <execution> 
       <id>default-integration-test</id> 
       <goals> 
        <goal>integration-test</goal> 
       </goals> 
      </execution> 
      <execution> 
       <id>verify</id> 
       <goals> 
        <goal>verify</goal> 
       </goals> 
      </execution> 
     </executions> 
    </plugin> 

답변

0

당신이 받는다는 - 안전 장치 - 보고서 - 플러그인을 사용해야 할 것입니다 통합 테스트 HTML 보고서를 얻을 수 있습니다. 하지만 이것은 모든 테스트에 대한 단위 및 통합의 보고서를 보여줍니다.

http://maven.apache.org/surefire/maven-surefire-report-plugin/

관련 문제