java.io.FileNotFoundException: src\test\resources\testFile.xml (The system cannot find the path specified)The problem may be that by default, IntelliJ sets the working directory to be the project root. If you are working on a maven project or something else with a complicated project structure, then you probably want it to look instead at the module root.
This is easy enough to configure. Simply go to:
Edit Configurations -> Defaults -> JUnit -> Working Directory
Set this value to $MODULE_DIR$ and you are done!
Also remember to delete any existing JUnit configurations so that it will pick up the default you have just set.
3 comments:
YOU ARE THE BEST!
What to do when having the same problem in Eclipse?
just what I was looking since yesterday.. thanks for sharing!
Post a Comment