No tests run in maven project with karate module

我只是一个虾纸丫 提交于 2021-02-05 11:16:10

问题


We have a multi module project with the following structure

  • module 1
  • module 2
  • module e2e
  • parent pom

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

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.

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

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

Thanks a lot.


回答1:


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

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



来源:https://stackoverflow.com/questions/56147048/no-tests-run-in-maven-project-with-karate-module

标签
易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!