Search code examples
javamaven-2netbeansnetbeans-6.9surefire

Debugging maven tests with netbeans?


I'm trying to debug maven tests in NetBeans 6.9.1. Does anyone know how to go about doing this? The reason I ask is because if I run my tests using Maven, they all pass. However, if I debug my tests using NetBeans (right click test class -> Debug Test File) my tests fail because I have Surefire set up to handle my tests, and NetBeans seems to use its own test runner. I noticed that Surefire has a debug option, but how would you go about using that with NetBeans, i.e. have it stop on your breakpoints in NetBeans?

Thanks for any help.


Solution

  • I am not very sure about that:

    But you may try it with...

    pom.xml


    <project>
     ...
     <!-- <scope>test</scope> --> <!-- Jus comment out this line and try it -->
     ...
    

    -Saligh