Skip to main content

Posts

Showing posts with the label junit

JUnit issue with Eclipse and Maven

In this post I am trying to resolve one issue of JUnit with Eclipse and Maven. Sometimes while using JUnit with Eclipse and Maven we have to face certain issues. And one of them is whenever we try to run the independent test case it will run fine and will not give any type of error. But when we run to try to compile the whole project, the same test will not compile at all. This is an annoying issue if someone does not know about the functionality of how Eclipse works with JUnit and Maven. JUnit in Action Since there is such no exception seen in file, but project compilation fails due to same file it is very frustrated for developer to figure out the issue. I am facing this issue and found a solution by googling around many forums. Problem : You have created a JUnit test case in the project and it is running fine, but fails to compile the whole project when try to build using Maven. Solution : Check that the test case you have created exist in the src/test/java folder and no...