A
A
Alexander Vasilenko2017-01-26 19:46:04
Java
Alexander Vasilenko, 2017-01-26 19:46:04

In my project, after importing maven dependencies or after clean command, maven refuses to see tests. Why is that?

I write tests using Cucumber+Java
Project structure
7d7941b77cca47e5907493c566431bcb.png
In general, the essence is this. I have Allure screwed on, with its wonderful reports. We launch it with the following commands:
mvn clean test
mvn sit
mvn jetty:run
So, everything fails at the initial stage, with the Maven clean command. Details.

[INFO] --- maven-compiler-plugin:3.1:testCompile (default-testCompile) @ b2b-web-test ---
[INFO] No sources to compile

These are the lines that appear when we test after cleaning. If you run the tests separately, using the IDE (and I use IDEA), and then just mvn test, and everything else to generate a report, then everything is fine - the report is formed, and pleases the eye. But clean leads to the fact that Maven does not seem to see the tests.
There is another feature, when I import changes to pom.xml, then IDEA stops seeing the src/test folder, JUnit refuses to run tests until I mark the test folder as a test folder.
Comrades! Lord! Friends!!! Colleagues... There is no urine, I don’t understand what to do! Will the hand and mouth of reason shed light on the darkness of this hopelessness?

Answer the question

In order to leave comments, you need to log in

1 answer(s)
D
Dmitry, 2017-01-29
@SanchelliosProg

Adjust the directory structure to match: https://maven.apache.org/guides/introduction/intro...

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question