java - Resource files not found when running JUnit test -
I am having trouble running my trial test, it fails because this project is not capable of receiving resources is.
My test starts a server that loads all the necessary resources using a URLClassLoader Otherwise there is no problem with resources while running my project. This problem occurs only when I try to run my JUnit test.
I have tried to add file path as argument in my runtime configuration for this kind of test, example:
-CP .: / path / To / the / config / file but it does not matter.
Please help!
Project structure:
The default maven test path is src / test / java , so if you test that If you are not in the directory, you must define the tag & lt; TestSourceDirectory & gt; inside & lt; Build & gt; Your test path in . You must also include the pom.xml with maven-surefire-plugin .
Comments
Post a Comment