q987654 发表于 2018-1-6 23:05:18

jenkins + jacoco 单元测试覆盖率

<?xml version="1.0" encoding="UTF-8"?>  
<project xmlns="http://maven.apache.org/POM/4.0.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
  xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd">
  <modelVersion>4.0.0</modelVersion>
  

  <groupId>fc</groupId>
  <artifactId>test_junit</artifactId>
  <version>1.0-SNAPSHOT</version>
  

  <dependencies>
  <dependency>
  <groupId>junit</groupId>
  <artifactId>junit</artifactId>
  <version>4.12</version>
  <scope>test</scope>
  </dependency>
  <!-- https://mvnrepository.com/artifact/org.jacoco/jacoco-maven-plugin -->
  <dependency>
  <groupId>org.jacoco</groupId>
  <artifactId>jacoco-maven-plugin</artifactId>
  <version>0.7.8</version>
  </dependency>
  

  </dependencies>
  

  <build>
  <plugins>
  <plugin>
  <groupId>org.apache.maven.plugins</groupId>
  <artifactId>maven-pmd-plugin</artifactId>
  <version>3.7</version>
  <configuration>
  <skipEmptyReport>false</skipEmptyReport>
  </configuration>
  <executions>
  <execution>
  <phase>verify</phase>
  <goals>
  <goal>check</goal>
  </goals>
  </execution>
  </executions>
  </plugin>
  <plugin>
  <groupId>org.jacoco</groupId>
  <artifactId>jacoco-maven-plugin</artifactId>
  <version>0.7.8</version>
  <executions>
  <execution>
  <goals>
  <goal>prepare-agent</goal>
  <goal>report</goal>
  </goals>
  </execution>
  </executions>
  </plugin>
  

  </plugins>
  </build>
  

  
</project>
页: [1]
查看完整版本: jenkins + jacoco 单元测试覆盖率