Cucumber/gradle example not generating report?

Depressio picture Depressio · Jul 25, 2013 · Viewed 10.8k times · Source

I'm investigating using gradle and cucumber together, and found this lovely example in cucumber's github.

So, I cloned the repository and ran it myself. It failed, as it's configured to do, but I couldn't find the HTML or JSON report that it appears to be configured to output. I say appear because I'm brand new to cucumber, but this class would seem to indicate where it'll put it:

@RunWith(Cucumber.class)
@Cucumber.Options(format = {"pretty", "html:build/cucumber-html-report", "json-pretty:build/cucumber-report.json"})
public class RunCukesTest {

}

However, it's not appearing in the build directory after running gradle cucumber.There's no cucumber-html-report directory, not is there a cucumber-report.json file. I'm running it with Java 7 and Gradle 1.6, if it matters.

Ideas? Is this a known issue with the Cucumber/Gradle integration?

Answer

Shane Hayes picture Shane Hayes · Jan 11, 2014

The class name changed depending on the version of Cucumber you are using. It changed from json-pretty to json.