Skip to content

Commit b7d857a

Browse files
committed
Merge remote-tracking branch 'origin/main' into message-based-progress-and-rerun
2 parents fde0150 + 953adf5 commit b7d857a

File tree

98 files changed

+1060
-917
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

98 files changed

+1060
-917
lines changed

.github/workflows/release-github.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -12,7 +12,7 @@ jobs:
1212
permissions:
1313
contents: write
1414
steps:
15-
- uses: actions/checkout@v4
15+
- uses: actions/checkout@v5
1616
- uses: cucumber/[email protected]
1717
with:
1818
github-token: ${{ secrets.GITHUB_TOKEN }}

.github/workflows/release-java.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -10,7 +10,7 @@ jobs:
1010
runs-on: ubuntu-latest
1111
environment: Release
1212
steps:
13-
- uses: actions/checkout@v4
13+
- uses: actions/checkout@v5
1414
- uses: actions/setup-java@v4
1515
with:
1616
distribution: 'zulu'

.github/workflows/test-java.yml

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -23,7 +23,7 @@ jobs:
2323
name: 'Build Java ${{ matrix.version }} - ${{ matrix.os }}'
2424
runs-on: ${{ matrix.os }}
2525
steps:
26-
- uses: actions/checkout@v4
26+
- uses: actions/checkout@v5
2727
- uses: actions/setup-java@v4
2828
with:
2929
distribution: 'zulu'
@@ -38,7 +38,7 @@ jobs:
3838
name: 'Javadoc'
3939
runs-on: ubuntu-latest
4040
steps:
41-
- uses: actions/checkout@v4
41+
- uses: actions/checkout@v5
4242
- uses: actions/setup-java@v4
4343
with:
4444
distribution: 'zulu'
@@ -53,7 +53,7 @@ jobs:
5353
name: 'Semver'
5454
runs-on: ubuntu-latest
5555
steps:
56-
- uses: actions/checkout@v4
56+
- uses: actions/checkout@v5
5757
- uses: actions/setup-java@v4
5858
with:
5959
distribution: 'zulu'

.github/workflows/test-testdata.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -21,7 +21,7 @@ jobs:
2121

2222
steps:
2323

24-
- uses: actions/checkout@v4
24+
- uses: actions/checkout@v5
2525

2626
- uses: actions/setup-node@v4
2727
with:

CHANGELOG.md

Lines changed: 12 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -10,6 +10,15 @@ The format is based on [Keep a Changelog](https://keepachangelog.com/en/1.0.0/)
1010
and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0.html).
1111

1212
## [Unreleased]
13+
### Fixed
14+
- [Core] Format time in JUnit XML report as `xs:float` ([junit-xml-formatter/#83](https://github.com/cucumber/junit-xml-formatter/pull/83) M.P. Korstanje)
15+
- [Core] Replace concurrent hashmap with regular hashmap ([query/#89](https://github.com/cucumber/query/pull/89) M.P. Korstanje)
16+
17+
## [7.27.0] - 2025-07-27
18+
### Changed
19+
- [Core] Show both steps and hooks in progress formatter ([#3029](https://github.com/cucumber/cucumber-jvm/pull/3029) M.P. Korstanje)
20+
- [Core] Use a more consistent definition of whitespace ([gherkin/#442](https://github.com/cucumber/gherkin/pull/442) M.P. Korstanje)
21+
- [Core] Improve Gherkin parser performance ([gherkin/#436](https://github.com/cucumber/gherkin/pull/436) Julien Kronegg, M.P. Korstanje)
1322

1423
## [7.26.0] - 2025-07-14
1524
### Added
@@ -18,7 +27,7 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0
1827
### Fixed
1928
- [JUnit Platform Engine] Don't use Java 9+ APIs ([#3025](https://github.com/cucumber/cucumber-jvm/pull/3025) M.P. Korstanje)
2029
- [JUnit Platform Engine] Implement toString on custom DiscoverySelectors
21-
[Core] Fix incomplete id for scenarios under rules in json output ([#3026](https://github.com/cucumber/cucumber-jvm/pull/3026) M.P. Korstanje)
30+
- [Core] Fix incomplete id for scenarios under rules in json output ([#3026](https://github.com/cucumber/cucumber-jvm/pull/3026) M.P. Korstanje)
2231

2332
## [7.25.0] - 2025-07-10
2433
### Changed
@@ -447,7 +456,8 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0
447456
- [Weld] Removed `cucumber-weld` in favour of `cucumber-jakarta-cdi` or `cucumber-cdi2`. ([#2276](https://github.com/cucumber/cucumber-jvm/issues/2276) M.P. Korstanje)
448457
- [Needle] Removed `cucumber-needled` in favour of `cucumber-jakarta-cdi` or `cucumber-cdi2`. ([#2276](https://github.com/cucumber/cucumber-jvm/issues/2276) M.P. Korstanje)
449458

450-
[Unreleased]: https://github.com/cucumber/cucumber-jvm/compare/v7.26.0...HEAD
459+
[Unreleased]: https://github.com/cucumber/cucumber-jvm/compare/v7.27.0...HEAD
460+
[7.27.0]: https://github.com/cucumber/cucumber-jvm/compare/v7.26.0...v7.27.0
451461
[7.26.0]: https://github.com/cucumber/cucumber-jvm/compare/v7.25.0...v7.26.0
452462
[7.25.0]: https://github.com/cucumber/cucumber-jvm/compare/v7.24.0...v7.25.0
453463
[7.24.0]: https://github.com/cucumber/cucumber-jvm/compare/v7.23.0...v7.24.0

compatibility/pom.xml

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,7 @@
44
<parent>
55
<artifactId>cucumber-jvm</artifactId>
66
<groupId>io.cucumber</groupId>
7-
<version>7.26.1-SNAPSHOT</version>
7+
<version>7.27.1-SNAPSHOT</version>
88
</parent>
99
<modelVersion>4.0.0</modelVersion>
1010

@@ -13,8 +13,8 @@
1313

1414
<properties>
1515
<hamcrest.version>3.0</hamcrest.version>
16-
<jackson.version>2.19.1</jackson.version>
17-
<junit-jupiter.version>5.13.3</junit-jupiter.version>
16+
<jackson.version>2.19.2</jackson.version>
17+
<junit-jupiter.version>5.13.4</junit-jupiter.version>
1818
<project.Automatic-Module-Name>io.cucumber.compatibility</project.Automatic-Module-Name>
1919
</properties>
2020

compatibility/src/test/java/io/cucumber/compatibility/CompatibilityTest.java

Lines changed: 7 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -43,14 +43,17 @@ void produces_expected_output_for(TestCase testCase) throws IOException {
4343
Runtime.builder()
4444
.withRuntimeOptions(new RuntimeOptionsBuilder()
4545
.addGlue(testCase.getGlue())
46-
.addFeature(testCase.getFeature())
47-
.build())
46+
.addFeature(testCase.getFeatures()).build())
4847
.withAdditionalPlugins(
4948
new MessageFormatter(newOutputStream(outputNdjson)))
5049
.build()
5150
.run();
52-
} catch (Exception ignored) {
53-
51+
} catch (Exception e) {
52+
// exception: Scenario with unknown parameter types fails by
53+
// throwing an exceptions
54+
if (!"unknown-parameter-type".equals(testCase.getId())) {
55+
throw e;
56+
}
5457
}
5558

5659
// exception: Cucumber JVM does not support named hooks

compatibility/src/test/java/io/cucumber/compatibility/TestCase.java

Lines changed: 6 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -19,11 +19,9 @@ final class TestCase {
1919
private static final String FEATURES_DIRECTORY = "src/test/resources/features";
2020
private static final String FEATURES_PACKAGE = "io.cucumber.compatibility";
2121

22-
private final String packageName;
2322
private final String id;
2423

25-
private TestCase(String packageName, String id) {
26-
this.packageName = packageName;
24+
private TestCase(String id) {
2725
this.id = id;
2826
}
2927

@@ -33,8 +31,7 @@ static List<TestCase> testCases() throws IOException {
3331
try (DirectoryStream<Path> stream = Files.newDirectoryStream(dir)) {
3432
for (Path path : stream) {
3533
if (path.toFile().isDirectory()) {
36-
String id = path.getFileName().toString();
37-
testCases.add(new TestCase(id.replace("-", ""), id));
34+
testCases.add(new TestCase(path.getFileName().toString()));
3835
}
3936
}
4037
}
@@ -47,15 +44,15 @@ String getId() {
4744
}
4845

4946
URI getGlue() {
50-
return GluePath.parse(FEATURES_PACKAGE + "." + packageName);
47+
return GluePath.parse(FEATURES_PACKAGE + "." + id.replace("-", ""));
5148
}
5249

53-
FeatureWithLines getFeature() {
54-
return FeatureWithLines.parse("file:" + FEATURES_DIRECTORY + "/" + id + "/" + id + ".feature");
50+
FeatureWithLines getFeatures() {
51+
return FeatureWithLines.parse("file:" + FEATURES_DIRECTORY + "/" + id);
5552
}
5653

5754
Path getExpectedFile() {
58-
return Paths.get(FEATURES_DIRECTORY + "/" + id + "/" + id + ".feature.ndjson");
55+
return Paths.get(FEATURES_DIRECTORY + "/" + id + "/" + id + ".ndjson");
5956
}
6057

6158
@Override

compatibility/src/test/java/io/cucumber/compatibility/attachments/Attachments.java

Lines changed: 0 additions & 16 deletions
Original file line numberDiff line numberDiff line change
@@ -48,22 +48,6 @@ public void anArrayWithBytesAreAttachedAs(int n, String mediaType) {
4848
scenario.attach(bytes, mediaType, null);
4949
}
5050

51-
@When("a JPEG image is attached")
52-
public void aJPEGImageIsAttached() throws IOException {
53-
Path path = Paths.get("src/test/resources/features/attachments/cucumber.jpeg");
54-
byte[] bytes = Files.readAllBytes(path);
55-
String fileName = path.getFileName().toString();
56-
scenario.attach(bytes, "image/jpeg", fileName);
57-
}
58-
59-
@When("a PNG image is attached")
60-
public void aPNGImageIsAttached() throws IOException {
61-
Path path = Paths.get("src/test/resources/features/attachments/cucumber.png");
62-
byte[] bytes = Files.readAllBytes(path);
63-
String fileName = path.getFileName().toString();
64-
scenario.attach(bytes, "image/png", fileName);
65-
}
66-
6751
@When("a PDF document is attached and renamed")
6852
public void aPDFDocumentIsAttachedAndRenamed() throws IOException {
6953
Path path = Paths.get("src/test/resources/features/attachments/document.pdf");

compatibility/src/test/resources/features/attachments/attachments.feature

Lines changed: 2 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -1,13 +1,12 @@
11
Feature: Attachments
2-
It is sometimes useful to take a screenshot while a scenario runs.
3-
Or capture some logs.
2+
It is sometimes useful to take a screenshot while a scenario runs or capture some logs.
43

54
Cucumber lets you `attach` arbitrary files during execution, and you can
65
specify a content type for the contents.
76

87
Formatters can then render these attachments in reports.
98

10-
Attachments must have a body and a content type
9+
Attachments must have a body and a content type.
1110

1211
Scenario: Strings can be attached with a media type
1312
Beware that some formatters such as @cucumber/react use the media type
@@ -30,12 +29,6 @@ Feature: Attachments
3029
Scenario: Byte arrays are base64-encoded regardless of media type
3130
When an array with 10 bytes is attached as "text/plain"
3231

33-
Scenario: Attaching JPEG images
34-
When a JPEG image is attached
35-
36-
Scenario: Attaching PNG images
37-
When a PNG image is attached
38-
3932
Scenario: Attaching PDFs with a different filename
4033
When a PDF document is attached and renamed
4134

0 commit comments

Comments
 (0)