我有一个eclipse插件,其中包含使用SWTBot开发的JUnit测试。
我尝试在hadless模式下使用tycho-surefire-plugin对eclipse安装运行测试。这是我的maven会议:
<plugin>
<groupId>org.eclipse.tycho</groupId>
<artifactId>tycho-surefire-plugin</artifactId>
<version>${tycho-version}</version>
<configuration>
<useUIThread>false</useUIThread>
<testRuntime>p2Installed</testRuntime>
<work>${work.dir}</work>
<useUIHarness>true</useUIHarness>
<useUIThread>false</useUIThread>
<argLine>${ui.test.args}</argLine>
<appArgLine>${ui.test.vmargs}</appArgLine>
<application>com.myapplication</application>
</configuration>
</plugin>我使用以下命令运行测试:
mvn verify一切都很好,除了这样一个事实:如果我在我的插件上做一些代码更改,更新版本的代码不会被部署到eclipse安装中。在运行mvn之前,请确认我正在运行mvn install命令。如果我添加一个新的测试类,我会得到
Caused by: org.apache.maven.surefire.util.NestedRuntimeException: Unable to create test class 'com.tests.MyNewClassTest'; nested exception is java.lang.ClassNotFoundException:我有任何我遗漏的配置。如何重新部署测试插件?
发布于 2014-09-25 15:31:36
增量构建,即没有clean的构建,需要构建插件正确地处理上一次执行的目标文件夹中的构建结果。这显然不是tycho-surefire-plugin的情况。
https://stackoverflow.com/questions/26019054
复制相似问题