maven集成测试不会运行UnitTest类中指定的所有测试
maven集成测试不会运行UnitTest类中指定的所有测试。UnitClass列出了大约800个测试,但它只运行250个,没有异常发生 需要在pom.xml中进行什么设置,以确保所有测试都能运行maven集成测试不会运行UnitTest类中指定的所有测试,maven,Maven,maven集成测试不会运行UnitTest类中指定的所有测试。UnitClass列出了大约800个测试,但它只运行250个,没有异常发生 需要在pom.xml中进行什么设置,以确保所有测试都能运行 <?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
<?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>
<parent>
<groupId>base</groupId>
<artifactId>master</artifactId>
<version>10.0.0-SNAPSHOT</version>
<relativePath/>
</parent>
<artifactId>tests</artifactId>
<version>10.0.0-SNAPSHOT</version>
<packaging>eclipse-test-plugin</packaging>
<properties>
<skipTests>true</skipTests>
<bundle.test.suite>${project.artifactId}</bundle.test.suite>
<bundle.test.class>Unit</bundle.test.class>
<bundle.test.vmargs.extra/>
</properties>
<profiles>
<profile>
<id>integration-tests</id>
<properties>
<skipTests>false</skipTests>
<bundle.test.class>NEWUNIT</bundle.test.class>
<surefire.timeout>4500</surefire.timeout>
</properties>
</profile>
</profiles>
<build>
<plugins>
<plugin>
<groupId>org.eclipse.tycho</groupId>
<artifactId>tycho-surefire-plugin</artifactId>
<version>${tychoVersion}</version>
<configuration>
<forkMode>always</forkMode>
</configuration>
</plugin>
</plugins>
</build>
</project>
4.0.0
基础
主人
10.0.0-快照
测验
10.0.0-快照
eclipse测试插件
真的
${project.artifactId}
单位
集成测试
假的
新单位
4500
org.eclipse.tycho
第谷surefire插件
${tychoVersion}
总是
看起来Maven只运行与默认模式匹配的测试类,因为没有为tycho surefire插件指定配置参数
用于指定测试中应包括的测试的模式列表(用逗号分隔)。如果未指定并且未指定测试参数,则默认包括**/test*.java**/*test.java**/*test.java**/*TestCase.java
名为example executed和not executed的测试是如何执行的?在我的例子中,maven在一定的限制后停止运行测试,并将构建发布为成功。添加了我正在使用的pom.xml代码。我的单元文件中的所有测试都在末尾附加了“test”。所以它应该运行,它怎么能在中间停止,说构建成功。根据我的假设,它不会在中间停止,它只是不运行一些测试。尝试设置<代码> **/*.java < />代码,看看它是否有区别。您用来运行测试的命令是什么?它是否类似于mvn清洁测试-Pintegration测试?我正在运行mvn-Pintegration测试