I'm using Cucumber + Gradle in Intellij and can't figure out how to debug using breakpoints. I tried the suggestions posted by other users but none of them work for me. Has anyone figured out an easy way to do this? Below is my build.gradle file.
apply plugin: 'java'
apply plugin: 'idea'
configurations {
cucumberRuntime.extendsFrom testRuntime
}
task cucumber() {
dependsOn assemble, compileTestJava
doLast {
javaexec {
main = "cucumber.api.cli.Main"
classpath = configurations.cucumberRuntime +
sourceSets.main.output + sourceSets.test.output
args = ['--plugin', 'pretty',
'--plugin', 'json:build/reports/cucumber-report.json',
'--plugin', 'html:build/reports/cucumber-report.html',
'--glue', 'stepDefinitions',
'src/test/java']
systemProperty "cucumber.options",
System.getProperty("cucumber.options")
systemProperty "url", System.properties.getProperty("url")
systemProperty "environment",
System.properties.getProperty("environment")
}
}
}