标签:service url idt ring info dep ase 用例 package
<dependencies>
<dependency>
<groupId>junit</groupId>
<artifactId>junit</artifactId>
<version>4.12</version>
<scope>test</scope>
</dependency>
</dependencies>
<plugin>
<groupId>org.evosuite.plugins</groupId>
<artifactId>evosuite-maven-plugin</artifactId>
<version>1.0.6</version>
</plugin>
evosuite 的仓库
<pluginRepositories>
<pluginRepository>
<id>EvoSuite</id>
<name>EvoSuite Repository</name>
<url>http://www.evosuite.org/m2</url>
</pluginRepository>
</pluginRepositories>
<dependency>
<groupId>org.evosuite</groupId>
<artifactId>evosuite-standalone-runtime</artifactId>
<version>1.0.6</version>
<scope>test</scope>
</dependency>
4.开始生成
<plugins> <plugin> <groupId>org.apache.maven.plugins</groupId> <artifactId>maven-surefire-report-plugin</artifactId> <version>3.0.0-M3</version> </plugin> <plugin> <groupId>org.jacoco</groupId> <artifactId>jacoco-maven-plugin</artifactId> <version>0.8.0</version> <configuration> <excludes>//排出不需要收集覆盖率的 <exclude>**/*ClazzSearchController.class</exclude> <exclude>**/*Application.class</exclude> <exclude>com/xxx/xxxx/api/config/**/*</exclude> </excludes> </configuration> <executions> <!-- <execution>--> <!-- <id>prepare-agent</id>--> <!-- <goals>--> <!-- <goal>prepare-agent</goal>--> <!-- </goals>--> <!-- </execution>--> <!-- <execution>--> <!-- <id>report</id>--> <!-- <phase>prepare-package</phase>--> <!-- <goals>--> <!-- <goal>report</goal>--> <!-- </goals>--> <!-- </execution>--> <!-- <execution>--> <!-- <id>post-unit-test</id>--> <!-- <phase>test</phase>--> <!-- <goals>--> <!-- <goal>report</goal>--> <!-- </goals>--> <!-- <configuration>--> <!-- <dataFile>target/jacoco.exec</dataFile>--> <!-- <outputDirectory>target/jacoco-ut</outputDirectory>--> <!-- </configuration>--> <!-- </execution>--> <execution> <id>prepare-agent</id> <goals> <goal>prepare-agent</goal> </goals> </execution> <execution> <id>generate-code-coverage-report</id> <phase>test</phase> <goals> <goal>report</goal> </goals> </execution> </executions> </plugin> </plugins>
3.查看测试报告
标签:service url idt ring info dep ase 用例 package
原文地址:https://www.cnblogs.com/Onlywjy/p/12046476.html