remote debugging of robot framework integration test with maven

Our integration tests are built using robot framework.  We have our keywords implemented in java and we use Robot Framework Maven plugin to run them during integration-test phase.

Once in a while, especially when developing keywords, I need to debug the java code which implements these keywords.

I found the trick on this page.

This is what you need to do:

  • On the command line
 export MAVEN_OPTS="-agentlib:jdwp=transport=dt_socket,address=8000,server=y,suspend=y" 

If you put suspend=y the maven jvm will wait for the debugger to connect

 mvn package  

(or mvn integration-test or whatever)

The output is

Listening for transport dt_socket at address: 8000

  • In Eclipse go to Debug Configurations -> Remote Java Application and create a new Configuration on the port 8000.

You’re done. Don’t forget to place  your breakpoints.

This entry was posted in robot framework, testing and tagged , , , , , . Bookmark the permalink.

Leave a Reply

Fill in your details below or click an icon to log in: Logo

You are commenting using your account. Log Out /  Change )

Google+ photo

You are commenting using your Google+ account. Log Out /  Change )

Twitter picture

You are commenting using your Twitter account. Log Out /  Change )

Facebook photo

You are commenting using your Facebook account. Log Out /  Change )


Connecting to %s