Debugging Thucydides/Jbehave tests using a custom browser and jUnit (i.e. Google Chrome)

Here is a simple class allowing you to run your Java tests in Debug mode using jUnit  and a custom browser (i.e. Chrome):

2014-11-28 14-20-43 Скриншот экрана

import net.thucydides.core.ThucydidesSystemProperty;

import net.thucydides.jbehave.ThucydidesJUnitStories;

public class DebuggingChromeTestSuite extends ThucydidesJUnitStories {

                public DebuggingChromeTestSuite() {

                                System.setProperty(“webdriver.chrome.driver”, “C:\\Automation\\drivers\\chromedriver.exe”);

                                runThucydides().withDriver(“chrome”);

                                runThucydides().withProperty(ThucydidesSystemProperty.THUCYDIDES_USE_UNIQUE_BROWSER).setTo(true);

                                findStoriesCalled(“YourStoryName.story”);

                }

}