When running a JUnit test case in IntelliJ it opens up the Make console and shows complication errors in an unrelated class.
Can I run the test case ignoring these errors?
Is there a way to make it not compile the entire project when running the test cases but only those class files required by the test case?
Select the 'Main' class in the project view, go-to Run --> Edit Configurations --> Before Launch and in Before Launch click + and select Build, no error check or click '-' take-out(delete) any setting in there --> Click Ok.
Invalidate Caches/Restart. Delete user config. Create a new project (trying to see if my current project files somehow all got messed up, but the problems persist even with new projects) Uninstall + Reinstall.
To exclude let's say "integration-test", you just need to specify as tags: ! integration-test , and IntelliJ will run all your JUnit5 tests except the ones tagged with integration-test . Take a look at this answer for details (including screenshot).
Yes you can.
You can disable the Make before Run.
(The following is written for IntelliJ 14, different versions might have slightly different layouts, but as far as I can remember these options have been the same for a while)
For a single test
For all tests:
If you want to remove this by default for all new test configurations (which might not be a terribly good idea, since then you got to allways build manually when running tests)
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With