Wednesday, March 6, 2013

Bookmark and Share

Every once in a while it happens to me that TestNG tests fail to launch in Eclipse when starting in debug mode (run mode works fine). The progress bar freezes at 57% and Eclipse indefinitely hangs.

Some googling brought me to to this bug in the TestNG issue tracker. As it seems, the issue is caused by a conflict between the TestNG version used as (Maven) dependency in the project under test and the TestNG version used by the TestNG Eclipse plug-in. People commented at the issue that it helped for them to create a new Eclipse workspace. As I wanted to avoid that, I had a look into the .metadata folder of my workspace, searching for things which might be the potential cause.

And indeed I stumbled upon the folder WORKSPACE_DIR/.metadata/.plugins/org.testng.eclipse/. After deleting this folder and restarting Eclipse, TestNG tests would launch in debug mode again as expected.