Maven Debugger in IntelliJ for Automated tests

Maven Debugger in IntelliJ for Automated tests

We often run our tests using Maven command line arguments, but while debugging people usually follows IDE debug options instead of maven debug options. The maven command with clean option clears all generated class files and it doesn’t have any cache as in IDE execution so I usually prefer executions using maven command line. Given below are steps to help you debug a test script using maven command line.

1.?????? Open IntelliJ IDE, go to Menu > Run> ?Edit configurations

2. Click on “+” sign to add a new configuration

3. Select Remote JVM Debug

4. Give some meaningful name and edit the port to 8000 or any port number which you prefer

5. Click “Apply” button followed by “OK” button.

6. Add break point in the test case which you desire to debug

7. Open terminal and enter the command mvnDebug clean test -Dgroups=<groupName>

8. Add breakpoints and then Click debug symbol in IDE to start the execution in debug mode from Maven



要查看或添加评论,请登录

Dinu Vijayan的更多文章

社区洞察

其他会员也浏览了