2013-07-09 61 views
0

是否可以配置在使用mvn聲納時如何調用surefire插件:聲納後編譯。Sonar Maven Plugin如何編排測試?

在我的Maven項目我有多個測試執行,例如

<plugin> 
       <groupId>org.apache.maven.plugins</groupId> 
       <artifactId>maven-surefire-plugin</artifactId> 
       <version>2.12.3</version> 
       <executions> 
        <execution> 
         <id>default-test</id> 
         <phase>test</phase> 
         <configuration> 
          <excludes> 
           <exclude>**/*IntegrationTest.java</exclude> 
          </excludes> 
          <parallel>methods</parallel> 
          <useUnlimitedThreads>true</useUnlimitedThreads> 
          <argLine>${jacoco.agent.argLine}</argLine> 
         </configuration> 
        </execution> 
        <execution> 
         <id>default-integration-test</id> 
         <phase>integration-test</phase> 
         <goals> 
          <goal>test</goal> 
         </goals> 
         <configuration> 
          <includes> 
           <include>**/*IntegrationTest.java</include> 
          </includes> 
          <parallel>classes</parallel> 
          <argLine>${jacoco.agent.argLineIntegration}</argLine> 
         </configuration> 
        </execution> 
       </executions> 
      </plugin> 

請特別注意,集成測試需要進行一些預處理(AspectJ的編譯例子)。

有什麼辦法可以告訴聲吶做到這一點嗎?或者確實有可能事先生成報告並告訴聲納使用它們嗎?

回答

相關問題