I am getting a problem though. Once I rename any folders in “src/test/java/AskTest.java”, test doesn’t get run. I mean, if I name “src/tests/java/AskTest.java”, it won’t run. Then I rename “src/test/asdf/AskTest.java”, it won’t run either.
So is it critical to have exact wording for “test” and “java” folder? How come?
The folder structure is critical. The reason is that I use Maven to build and execute the project.
Maven is about convention over configuration. The convention is that all source code should live in the directory src. The production code should live in main and test code should live in test. Any Java code should live in java. If you organize you Java code in packages, then will the Java directory be the package root and you need to add the proper directories in the Java directory to reflect your packages.