空手道 [功能自动化和性能脚本 运行 同时存在

Karate [Functional Automation and Performance Scripts are running in simultaneously

这里有没有人经历过使用 Karate-Gatling 更新功能自动化项目的 POM 以便能够重新使用功能脚本来提高性能,但是在执行时会触发两个测试?

mvn test "-Dkarate.env=dev" -Dkarate.options="--tags @FunctionalScript classpath:services/project/functional.feature" -Dtest=TestRunner

上面的 mvn 应该 运行 只是功能自动化脚本,但是性能脚本也会在那之后立即被触发。

提前致谢!

这取决于您如何设置 maven 项目。如果您的 gatling 插件设置中有以下代码片段,请将其删除:

  <executions>
      <execution>
          <phase>test</phase>
          <goals>
              <goal>test</goal>
          </goals>
      </execution>
  </executions> 

此处详细解释:https://github.com/intuit/karate/tree/develop/karate-gatling#maven