Skip to content

Debugging TestNG Test Failures

Kortanul edited this page Apr 15, 2019 · 1 revision

Tests can be run directly through the IDE (IntelliJ, Eclipse, etc). Sometimes, though, test failures only appear when running tests through Maven and aren't reproducible when executed via the IDE.

In cases like this, it's useful to be able to debug tests exactly as they are run by Maven.

Use a command like the following:

mvnDebug test -DforkCount=0 -Dignore-artifact-sigs

Then use a "Remote Debug" profile that connects to localhost on the port indicated (usually port 8000).

Clone this wiki locally