Skip to end of metadata
Go to start of metadata

Due to different class loading rules and tests ordering, results from test might change if you run them inside Eclipse or with Maven. Note however that such cases raise an issue in the way the tests are written and should encourage to rewrite them.

Using Eclipse to debug tests run with Maven is easy. Say you want to debug the MySuperClassTest class:

  • start the Maven test just for this class in debug mode:

    the test will wait for Eclipse to connect.

  • open the Debug Configuration of Eclipse and set up a remote application on port 5005. Run the configuration, the test will resume. You can use break points and all the usual features of Eclipse debugging.

More goodies and information are available on the maven-surefire-plugin page.

  • No labels