Skip to content

Commit bdd8807

Browse files
committed
Convert to Maven focused starter project
1 parent 83aabb5 commit bdd8807

File tree

27 files changed

+197
-635
lines changed

27 files changed

+197
-635
lines changed

.github/workflows/build.yml

Lines changed: 0 additions & 37 deletions
This file was deleted.

.github/workflows/test-java.yml

Lines changed: 30 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,30 @@
1+
name: Test Java
2+
3+
permissions: { }
4+
5+
on:
6+
pull_request:
7+
branches:
8+
- main
9+
push:
10+
branches:
11+
- main
12+
- renovate/**
13+
14+
jobs:
15+
build:
16+
strategy:
17+
matrix:
18+
os: [ ubuntu-latest, windows-latest ]
19+
version: [ 17, 21 ]
20+
name: 'Build Java ${{ matrix.version }} - ${{ matrix.os }}'
21+
runs-on: ${{ matrix.os }}
22+
steps:
23+
- uses: actions/checkout@v6
24+
- uses: actions/setup-java@v5
25+
with:
26+
distribution: 'temurin'
27+
java-version: ${{ matrix.version }}
28+
cache: 'maven'
29+
- name: Install dependencies
30+
run: ./mvnw test

.gitignore

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -5,4 +5,8 @@
55
# Eclipse IDE
66
.settings
77
.classpath
8-
.project
8+
.project
9+
10+
# Maven
11+
target/
12+
*.versionsBackup
File renamed without changes.

README.md

Lines changed: 5 additions & 26 deletions
Original file line numberDiff line numberDiff line change
@@ -1,11 +1,8 @@
1-
# Cucumber-Java Skeleton
1+
# Cucumber JVM - Starter: Java with Maven
22

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!
96

107
To write assertions the project comes with [AssertJ](https://assertj.github.io/doc/#assertj-core-assertions-guide)
118
included.
@@ -25,26 +22,14 @@ Subversion:
2522
Or [download a zip](https://github.com/cucumber/cucumber-java-skeleton/archive/main.zip) file.
2623

2724
## Run the tests
28-
### Use Maven
2925

3026
Open a command window and run:
3127

32-
cd maven
3328
./mvnw test
3429

3530
This runs Cucumber features using Cucumber's JUnit Platform Engine. The `Suite`
3631
annotation on the `RunCucumberTest` class tells JUnit to kick off Cucumber.
3732

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-
4833
## Configuration
4934

5035
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`.
8065
@IncludeTags("Zucchini")
8166
```
8267

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
8469
[JUnit5 Tag Expression](https://junit.org/junit5/docs/current/user-guide/#running-tests-tag-expressions).
8570
Note: When using JUnit, the `@` is not part of the tag.
8671

@@ -95,16 +80,10 @@ with JUnit selectors. As a work around the `cucumber.features` property can be
9580
used. Because this property will cause Cucumber to ignore any other selectors
9681
from JUnit it is prudent to only execute the Cucumber engine.
9782

98-
#### With Maven
99-
10083
To select the scenario on line 3 of the `belly.feature` file use:
10184

10285
```
10386
./mvnw test -Dsurefire.includeJUnit5Engines=cucumber -Dcucumber.features=src/test/resources/io/cucumber/skeleton/belly.feature:3
10487
```
10588

10689
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. ;))

gradle/.gitignore

Lines changed: 0 additions & 2 deletions
This file was deleted.

gradle/build.gradle.kts

Lines changed: 0 additions & 26 deletions
This file was deleted.
-44.6 KB
Binary file not shown.

0 commit comments

Comments
 (0)