【发布时间】:2014-06-23 17:49:35
【问题描述】:
所以我有一个大型项目,我们现在正试图将测试集成到整个项目中(我知道)。但是当我运行一个
mvn clean install
在测试插件上,我收到消息
All Tests Passed!
但它显然没有运行测试,因为我的一个测试被写入失败。我的插件项目的结构是:
->src/${filepath} */ My tests are here
->src/${filepath}/folderA
->src/${filepath}/folder
etc...
我有一个升级的主 pom 文件,用于编译所有依赖项(成功)。我的测试插件中的结构是否错误?
<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/maven-v4_0_0.xsd">
<modelVersion>4.0.0</modelVersion>
<version>1.0.0.qualifier</version>
<artifactId>com.exeeng.test</artifactId>
<packaging>eclipse-test-plugin</packaging>
<name>${name}</name>
<parent>
<version>${parent-version}</version>
<groupId>${parent-grou}</groupId>
<artifactId>parent</artifactId>
</parent>
<properties>
<tycho-version>0.19.0</tycho-version>
</properties>
<build>
<plugins>
<plugin>
<groupId>org.eclipse.tycho</groupId>
<artifactId>tycho-maven-plugin</artifactId>
<version>${tycho-version}</version>
<extensions>true</extensions>
</plugin>
<plugin>
<groupId>org.eclipse.tycho</groupId>
<artifactId>tycho-surefire-plugin</artifactId>
</plugin>
<plugin>
<groupId>org.eclipse.tycho</groupId>
<artifactId>target-platform-configuration</artifactId>
<version>${tycho-version}</version>
</plugin>
<plugin>
<groupId>org.codehaus.tycho</groupId>
<artifactId>maven-osgi-packaging-plugin</artifactId>
</plugin>
</plugins>
【问题讨论】:
-
在@Vwin 提到的要点之上,确保您的测试类名称为being with
Testor end withTest,否则您将需要自定义配置。 -
您在谈论 Eclipse 插件?你用的是第谷吗?如果您向我们展示您的测试 pom,将会很有用。
-
这是我的测试 POM,测试都以 Test 结尾,所以应该可以正常工作。