Skip to content
Advertisement

SpringJUnit4ClassRunner class not found

i am trying to create a unit test using SpringJUnit4ClassRunner but everytime i execute the test it says it cannot find SpringJUnit4ClassRunner using mvn install.

JavaScript

here is my code

JavaScript

Here is my POM file:

JavaScript

i am using springSource tool suit IDE to develop this spring mvc app and on the IDE it highlights SpringJUnit4ClassRunner as a error saying it cant be resolved despite me including all the necessary dependencies on my pom file.

Thanks

Advertisement

Answer

I downloaded your code and got it working locally, as long as I included the relevant import statements:

JavaScript

Perhaps you’re missing an import somewhere.

User contributions licensed under: CC BY-SA
3 People found this is helpful
Advertisement