【发布时间】:2014-06-16 21:49:02
【问题描述】:
我正在尝试将一些 bdd 放入我的 eclipse 插件项目中,但无法弄清楚如何在 maven build fase 期间运行我的集成测试。为了编写我的测试,我使用了 SWTBot 框架。
我已经完成了特征生成,并设置了我的测试。如何设置我的 pom 来运行我的集成测试?
【问题讨论】:
标签: maven tycho cucumber-jvm swtbot
我正在尝试将一些 bdd 放入我的 eclipse 插件项目中,但无法弄清楚如何在 maven build fase 期间运行我的集成测试。为了编写我的测试,我使用了 SWTBot 框架。
我已经完成了特征生成,并设置了我的测试。如何设置我的 pom 来运行我的集成测试?
【问题讨论】:
标签: maven tycho cucumber-jvm swtbot
我使用以下配置并运行mvn clean verify。如果您不想并行运行测试,请删除 parallel、perCoreThreadCount 和 threadCountClasses 标记。
确保更新正则表达式以匹配您的测试命名约定<include>**/Run*.java</include>
<plugin>
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-surefire-plugin</artifactId>
<version>2.16</version>
<executions>
<execution>
<id>acceptance-test</id>
<phase>integration-test</phase>
<goals>
<goal>test</goal>
</goals>
<configuration>
<outputEncoding>UTF-8</outputEncoding>
<parallel>classes</parallel>
<perCoreThreadCount>true</perCoreThreadCount>
<threadCountClasses>10</threadCountClasses>
<argLine>-Xmx1024m</argLine>
<argLine>-XX:MaxPermSize=256m</argLine>
<includes>
<include>**/Run*.java</include>
</includes>
</configuration>
</execution>
</executions>
</plugin>
【讨论】: