Hi guys,
can somebody help me how to debug Thucydides + JBehave using Maven?
So, what I'm doing:
1. In the terminal I go to pom.xml folder
2. I run this command:
export MAVEN_OPTS="-Xdebug -Xrunjdwp:transport=dt_socket,server=y,suspend=y,address=8787 -Xnoagent -Djava.compiler=NONE"3. Then I run this one:
mvn clean install -Dwebdriver.driver=firefox -Dwebdriver.base.url=http://testsite.com -Dmetafilter="+suite suiteName -skip" -Dthucydides.take.screenshots=FOR_FAILURES -Dthucydides.activate.firebugs=true4. Then I see the message:
Listening for transport dt_socket at address: 8787So at this moment tests are hanging and waiting for debugger.
5. In IntelliJ IDEA I've added the remote debug configuration, pointing to the localhost and port 8787
6. I add proper breakpoints and I select this Remote Debug configuration in the IntelliJ IDEA and click Debug button
7. In IntelliJ IDEA I see the message:
Connected to the target VM, address: 'localhost:8787', transport: 'socket'8. In terminal the tests continue execution but they don't stop on any breakpoint. And they finish successfully.
9. In the end I see in IntelliJ IDEA message:
Connected to the target VM, address: 'localhost:8787', transport: 'socket'I've know there is way to click in the IntelliJ IDEA on the AcceptanceTestSuite and then run Debug, but then you will execute all JBehave stories. In my case when I run tests through maven I'm also transferring additional parameters, so I'm able to run exact Jbehave story via Meta tag.