Problem
Since yesterday, I am unable to launch a proper debug of my tests. Debugger happily jumps over my breakpoints. I validated that the code was actually executed by adding some logs.
What I've tried so far
More info about the project
The executed Java code is in one of the folders declared as test sources (one is "java" for Selenium tests, other is "scala" for Gatling tests).
My Maven command line is pretty straightforward: package clean -Dtest=MyTestClass integration-test.
EDIT: My POM configuration does mention reuseForks and forkCount. I've also tried playing with deprecated forkMode, but with no success.
<plugin>
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-failsafe-plugin</artifactId>
<version>2.20.1</version>
<configuration>
<skip>${skip.selenium.tests}</skip>
<parallel>none</parallel>
<threadCount>1</threadCount>
<reuseForks>false</reuseForks>
<forkCount>0</forkCount>
<disableXmlReport>false</disableXmlReport>
</configuration>
<executions>
<execution>
<id>runSeleniumTests</id>
<phase>integration-test</phase>
<goals>
<goal>integration-test</goal>
</goals>
</execution>
</executions>
</plugin>
What is funny, though: debugger actually stops at breakpoints when I right-click on the project root or on test sources root ("java" folder) and click on "Debug 'All tests'".
Any help... will help.
If you are using surefire plugin it runs your test in another process hence you are not able to debug.
Use forkMode=never in your maven configuration
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With