You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy file name to clipboardExpand all lines: examples/java-helloworld/README.md
+10-2
Original file line number
Diff line number
Diff line change
@@ -30,9 +30,17 @@ kicks off Cucumber.
30
30
The Cucumber runtime parses command line options to know what features to run, where the glue code lives, what formatters to use etc.
31
31
When you use the JUnit runner, these options are generated from the `@Cucumber.Options` annotation on your test.
32
32
33
-
Sometimes it can be useful to override these options without changing the JUnit class. This can be done with the `cucumber.options` system property. If it is specified it will override *all* options. Here is an example:
33
+
Sometimes it can be useful to override these options without changing or recompiling the JUnit class. This can be done with the
34
+
`cucumber.options` system property. Here are a couple of examples:
35
+
36
+
With Maven:
34
37
35
38
```
36
-
mvn test -Dcucumber.options="--format json-pretty --glue classpath:cucumber/examples/java/helloworld src/test/resources"
39
+
mvn -Dcucumber.options="--format junit:target/cucumber-junit-report.xml" test
37
40
```
38
41
42
+
Or with Ant:
43
+
44
+
```
45
+
_JAVA_OPTIONS='-Dcucumber.options="--format json-pretty:target/cucumber-json-report.json"' ant runcukes
0 commit comments