【问题标题】:PIT-Cucumber plugin not finding scenarios in feature filesPIT-Cucumber 插件未在功能文件中找到场景
【发布时间】:2019-10-16 06:41:14
【问题描述】:

尝试在企业项目中进行 PIT Mutation 测试。可以做现有的 JUNit 测试,但我们也有很多 Cucumber 测试需要成为指标的一部分。在maven项目中添加了pit-cucumber插件,但是输出没有找到任何场景。不知道插件的配置中是否有一些我看不到的秘密。

              <plugin>
                <groupId>org.pitest</groupId>
                <artifactId>pitest-maven</artifactId>
                <version>1.4.7</version>
                <configuration>
                    <testPlugin>Cucumber</testPlugin>
                    <targetClasses>
                        <param>org.tiaa.srk.eligibility.*</param>
                    </targetClasses>
                    <targetTests>
                        <param>org.tiaa.srk.eligibility.EligibilityTestRunnerIT</param>
                    </targetTests>
                    <verbose>true</verbose>
                </configuration>
                <dependencies>
                    <dependency>
                        <groupId>com.github.alexvictoor</groupId>
                        <artifactId>pitest-cucumber-plugin</artifactId>
                        <version>0.8</version>
                    </dependency>
                </dependencies>
            </plugin>

我得到这个输出:

INFO : 向 minion 发送 0 个测试类

【问题讨论】:

    标签: cucumber-java mutation pitest


    【解决方案1】:

    确保您使用的是带有 Pitest-cucumber-plugin 0.8 的 Cucumber 版本 4.20 jar 其他一切看起来都不错。您可能不需要指定 targetClasses 和 targetTests。

    【讨论】:

      猜你喜欢
      • 1970-01-01
      • 1970-01-01
      • 1970-01-01
      • 1970-01-01
      • 1970-01-01
      • 1970-01-01
      • 1970-01-01
      • 2020-03-11
      • 2019-08-14
      相关资源
      最近更新 更多