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: README.md
+5-26Lines changed: 5 additions & 26 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -1,11 +1,8 @@
1
-
# Cucumber-Java Skeleton
1
+
# Cucumber JVM - Starter: Java with Maven
2
2
3
-
This is the simplest possible setup for Cucumber using Java. There is nothing
4
-
fancy like a webapp or browser testing. All this does is to show you how to
5
-
set up and run Cucumber!
6
-
7
-
There is a single feature file with one scenario. The scenario has three steps,
8
-
two of them pending. See if you can make them all pass!
3
+
This is the simplest possible setup for Cucumber-JVM using Java with Maven.
4
+
There is nothing fancy like a webapp or browser testing. All this does is to
5
+
show you how to set up and run Cucumber!
9
6
10
7
To write assertions the project comes with [AssertJ](https://assertj.github.io/doc/#assertj-core-assertions-guide)
11
8
included.
@@ -25,26 +22,14 @@ Subversion:
25
22
Or [download a zip](https://github.com/cucumber/cucumber-java-skeleton/archive/main.zip) file.
26
23
27
24
## Run the tests
28
-
### Use Maven
29
25
30
26
Open a command window and run:
31
27
32
-
cd maven
33
28
./mvnw test
34
29
35
30
This runs Cucumber features using Cucumber's JUnit Platform Engine. The `Suite`
36
31
annotation on the `RunCucumberTest` class tells JUnit to kick off Cucumber.
37
32
38
-
### Use Gradle
39
-
40
-
Open a command window and run:
41
-
42
-
cd gradle
43
-
./gradlew test --rerun-tasks --info
44
-
45
-
This runs Cucumber features using Cucumber's JUnit Platform Engine. The `Suite`
46
-
annotation on the `RunCucumberTest` class tells JUnit to kick off Cucumber.
47
-
48
33
## Configuration
49
34
50
35
The [Cucumber JUnit Platform Engine](https://github.com/cucumber/cucumber-jvm/tree/main/cucumber-junit-platform-engine) uses configuration parameters to know what features to run,
@@ -80,7 +65,7 @@ Then add an annotation to `RunCucumberTest`.
80
65
@IncludeTags("Zucchini")
81
66
```
82
67
83
-
When using Maven, tags can be selected from the CLI using the `groups` and `excludedGroups` parameters. These take a
68
+
Tags can be selected from the CLI using the `groups` and `excludedGroups` parameters. These take a
84
69
[JUnit5 Tag Expression](https://junit.org/junit5/docs/current/user-guide/#running-tests-tag-expressions).
85
70
Note: When using JUnit, the `@` is not part of the tag.
86
71
@@ -95,16 +80,10 @@ with JUnit selectors. As a work around the `cucumber.features` property can be
95
80
used. Because this property will cause Cucumber to ignore any other selectors
96
81
from JUnit it is prudent to only execute the Cucumber engine.
97
82
98
-
#### With Maven
99
-
100
83
To select the scenario on line 3 of the `belly.feature` file use:
101
84
102
85
```
103
86
./mvnw test -Dsurefire.includeJUnit5Engines=cucumber -Dcucumber.features=src/test/resources/io/cucumber/skeleton/belly.feature:3
104
87
```
105
88
106
89
Note: Add `-Dcucumber.plugin=pretty` to get a more detailed output during test execution.
107
-
108
-
#### With Gradle
109
-
110
-
TODO: (I don't know how to do this. Feel free to send a pull request. ;))
0 commit comments