Debugging Maven integration tests

TIL that if you pass -Dmaven.failsafe.debug when you run your Maven integration tests via the Failsafe plugin, Maven will start your test up listening on port 5005, waiting for you to hook your debugger in. For jdb you would say:

jdb -attach localhost:5005

And you’re good to go. Super convenient.

Advertisements

Leave a Reply

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

WordPress.com Logo

You are commenting using your WordPress.com 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 )

Google+ photo

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

Connecting to %s