Reputation: 45
I'm working on a java project using IntelliJ. The project requires the use of some external libraries located in directories outside the project. Most of the code has been written by another author, I am simply expanding the functionality of the current program. The problem comes from one of the test cases for one of the external libraries (which was written by the original author). While these test cases pass successfully when I use -mvn test command in terminal, they fail when run in IntelliJ.
The error/failiure output is as follows
java.lang.Exception: No runnable methods <13 internal calls>
for all 15 tests
I've checked to make sure that the @Before annotation is before any @test annotations tests, and all the required tests have the @Test annotation before them.
Why would JUnit tests fail to run when they run and pass succesfully with the Maven Surefire Plugin?
I am using junit 4.1.
Your help would be greatly appreciated.
Upvotes: 2
Views: 1791
Reputation: 45
Ah problem solved. Quite a while ago actually. In IntelliJ, sometimes you need to set up VM Options with the -Djava.library.path = /(path to your lib files)/
as well as configure Environment variables by creating a variable --> LD_LIBRARY_PATH = /(path to required .so files)/
All tests run fine now.
Upvotes: 2