没有使用空手道模块在Maven项目中运行测试 [英] No tests run in maven project with karate module

查看:58
本文介绍了没有使用空手道模块在Maven项目中运行测试的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我们有一个具有以下结构的多模块项目

We have a multi module project with the following structure

  • 模块1
  • 第2单元
  • 模块e2e
  • 父母pom

模块e2e包含我们的空手道功能(进入src/test/java/features文件夹)

The module e2e contains our karate features (into the src/test/java/features folder)

我们无法弄清楚如何使用"mvn测试"来运行空手道测试. 它总是运行0个测试,而是有一些功能文件.

We couldn't figure out how to run the karate tests using the "mvn test". It always runs 0 tests, instead there are some feature files.

我们尝试从项目的根目录以及e2e模块内部运行"mvn测试"

We have tried running "mvn test" from the root of the project, as well as from inside the e2e module

我们还有其他的Maven项目(不是多模块),它可以按预期工作. 是否需要进行一些配置操作?

We have other maven projects (not multi module) and it works as expected. Does it necessary to make some configuration action to do it?

非常感谢.

推荐答案

mvn test只是在寻找JUnit测试,就是这么简单.检查您的JUnit类名称是否以Test结尾-是否已对建议的目录结构进行了maven调整:

mvn test behind the scenes just looks for JUnit tests, it is that simple. Check that your JUnit class names end with Test - and that the maven tweak for the recommended directory structure is in place: https://github.com/intuit/karate/issues/724

否则,除非您遵循此过程,否则任何人都很难为您提供帮助: https://github.com/intuit/karate/wiki/How-to-Submit-an-Issue

Otherwise unless you follow this process, it is difficult for anyone to help you: https://github.com/intuit/karate/wiki/How-to-Submit-an-Issue

这篇关于没有使用空手道模块在Maven项目中运行测试的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆