【问题标题】:How to integrate cucumber-jvm with maven build如何将 cucumber-jvm 与 maven 构建集成
【发布时间】:2014-06-16 21:49:02
【问题描述】:

我正在尝试将一些 bdd 放入我的 eclipse 插件项目中,但无法弄清楚如何在 maven build fase 期间运行我的集成测试。为了编写我的测试,我使用了 SWTBot 框架。

我已经完成了特征生成,并设置了我的测试。如何设置我的 pom 来运行我的集成测试?

【问题讨论】:

    标签: maven tycho cucumber-jvm swtbot


    【解决方案1】:

    我使用以下配置并运行mvn clean verify。如果您不想并行运行测试,请删除 parallelperCoreThreadCountthreadCountClasses 标记。 确保更新正则表达式以匹配您的测试命名约定<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>
    

    【讨论】:

      猜你喜欢
      • 1970-01-01
      • 2020-12-10
      • 2014-04-12
      • 1970-01-01
      • 1970-01-01
      • 1970-01-01
      • 1970-01-01
      • 1970-01-01
      • 2019-03-25
      相关资源
      最近更新 更多