Skip to content

Commit facb34d

Browse files
authored
Use a message based json formatter (#2888)
Replace the JsonFormatter with the message based implementation from cucumber-json-formatter[1]. This achieves several goals: * Move the internal code base away from the events from the plugin module. * Extract common parts of Cucumber into modules that can be shared. * Allows for more rigorous testing of a poorly defined format 1. https://github.com/cucumber/cucumber-json-formatter
1 parent 92d83b1 commit facb34d

File tree

17 files changed

+195
-2884
lines changed

17 files changed

+195
-2884
lines changed

.revapi/api-changes.json

Lines changed: 5 additions & 15 deletions
Original file line numberDiff line numberDiff line change
@@ -71,22 +71,12 @@
7171
],
7272
"internal": [
7373
{
74-
"extension": "revapi.differences",
75-
"id": "internal-api-issues",
7674
"ignore": true,
77-
"configuration": {
78-
"differences": [
79-
{
80-
"ignore": true,
81-
"code": "java.method.visibilityIncreased",
82-
"old": "method io.cucumber.core.eventbus.UuidGenerator io.cucumber.core.runtime.UuidGeneratorServiceLoader::loadUuidGenerator()",
83-
"new": "method io.cucumber.core.eventbus.UuidGenerator io.cucumber.core.runtime.UuidGeneratorServiceLoader::loadUuidGenerator()",
84-
"oldVisibility": "package",
85-
"newVisibility": "public",
86-
"justification": "Expose internal API to other internal components"
87-
}
88-
]
89-
}
75+
"code": "java.class.nowImplementsInterface",
76+
"old": "class io.cucumber.core.plugin.JsonFormatter",
77+
"new": "class io.cucumber.core.plugin.JsonFormatter",
78+
"interface": "io.cucumber.plugin.ConcurrentEventListener",
79+
"justification": "The JsonFormatter is consumed by Cucumber"
9080
}
9181
],
9282
"testng": [

CHANGELOG.md

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -18,14 +18,16 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0
1818
### Deprecated
1919
- [Core] Deprecate `--i18n` options ([#3053](https://github.com/cucumber/cucumber-jvm/pull/3053) M.P. Korstanje)
2020

21+
### Changed
22+
- [Core] Use a [message based Cucumber JSON Formatter](https://github.com/cucumber/cucumber-json-formatter) ([##2888](https://github.com/cucumber/cucumber-jvm/pull/#2888) M.P. Korstanje)
23+
2124
## [7.27.2] - 2025-08-18
2225
### Fixed
2326
- [Core] Intellij prints summary printed when executing concurrently ([#3049](https://github.com/cucumber/cucumber-jvm/pull/3049) M.P. Korstanje)
2427

2528
### Added
2629
- [Core] Add custom UuidGenerator to Runtime.Builder ([#3039](https://github.com/cucumber/junit-xml-formatter/pull/3039) Christoph Läubrich, M.P. Korstanje)
2730

28-
2931
## [7.27.1] - 2025-08-17
3032
### Fixed
3133
- [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)

cucumber-bom/pom.xml

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -15,6 +15,7 @@
1515
<properties>
1616
<ci-environment.version>10.0.1</ci-environment.version>
1717
<cucumber-expressions.version>18.0.1</cucumber-expressions.version>
18+
<cucumber-json-formatter.version>0.1.1</cucumber-json-formatter.version>
1819
<gherkin.version>34.0.0</gherkin.version>
1920
<html-formatter.version>21.13.0</html-formatter.version>
2021
<junit-xml-formatter.version>0.8.1</junit-xml-formatter.version>
@@ -38,6 +39,11 @@
3839
<artifactId>cucumber-expressions</artifactId>
3940
<version>${cucumber-expressions.version}</version>
4041
</dependency>
42+
<dependency>
43+
<groupId>io.cucumber</groupId>
44+
<artifactId>cucumber-json-formatter</artifactId>
45+
<version>${cucumber-json-formatter.version}</version>
46+
</dependency>
4147
<dependency>
4248
<groupId>io.cucumber</groupId>
4349
<artifactId>gherkin</artifactId>

cucumber-core/pom.xml

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -80,6 +80,10 @@
8080
<groupId>io.cucumber</groupId>
8181
<artifactId>cucumber-expressions</artifactId>
8282
</dependency>
83+
<dependency>
84+
<groupId>io.cucumber</groupId>
85+
<artifactId>cucumber-json-formatter</artifactId>
86+
</dependency>
8387
<dependency>
8488
<groupId>io.cucumber</groupId>
8589
<artifactId>datatable</artifactId>

0 commit comments

Comments
 (0)