Welcome to OStack Knowledge Sharing Community for programmer and developer-Open, Learning and Share
Welcome To Ask or Share your Answers For Others

Categories

0 votes
225 views
in Technique[技术] by (71.8m points)

No tests run in maven project with karate module

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.

question from:https://stackoverflow.com/questions/65890766/karate-fails-to-identify-feature-files-if-they-are-in-a-different-folder-structu

与恶龙缠斗过久,自身亦成为恶龙;凝视深渊过久,深渊将回以凝视…
Welcome To Ask or Share your Answers For Others

1 Answer

0 votes
by (71.8m points)

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


与恶龙缠斗过久,自身亦成为恶龙;凝视深渊过久,深渊将回以凝视…
Welcome to OStack Knowledge Sharing Community for programmer and developer-Open, Learning and Share
Click Here to Ask a Question

...