Nuxeo Core Developer Guide

How to Debug a Test Run with Maven

Updated: October 22, 2018 Page Information Edit on GitHub

Due to different class loading rules and test order, test results 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.

Using Eclipse to debug tests run with Maven

To debug the MySuperClassTest class:

  1. Start the Maven test for this class only, in debug mode:

    mvn -Dtest=MySuperClassTest -Dmaven.surefire.debug test
    
    

    The test will wait for Eclipse to connect.

  2. Open the Debug Configuration in 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 information is available on the maven-surefire-plugin page.

 

2 months ago manonlumeau NXDOC-1650 fix about integrating changes, add mention on multiple attempts
4 years ago Solen Guitter 25
5 years ago Julien Carsique 24
5 years ago Julien Carsique 23
8 years ago Stéfane Fermigier 21
8 years ago Stéfane Fermigier 22 | Migrated to Confluence 4.0
8 years ago Stéfane Fermigier 20
8 years ago Stéfane Fermigier 19
8 years ago Stéfane Fermigier 18
8 years ago Stéfane Fermigier 17
8 years ago Stéfane Fermigier 16
8 years ago Stéfane Fermigier 15
8 years ago Stéfane Fermigier 14
8 years ago Stéfane Fermigier 13
8 years ago Stéfane Fermigier 12
8 years ago Stéfane Fermigier 11
8 years ago Stéfane Fermigier 10
8 years ago Stéfane Fermigier 9
8 years ago Stéfane Fermigier 8
8 years ago Stéfane Fermigier 7
8 years ago Stéfane Fermigier 6
8 years ago Stéfane Fermigier 5
8 years ago Stéfane Fermigier 4
8 years ago Stéfane Fermigier 3
8 years ago Stéfane Fermigier 2
8 years ago Stéfane Fermigier 1
History: Created by Stéfane Fermigier

We'd love to hear your thoughts!

All fields required