Skip to content
Closed
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
16 commits
Select commit Hold shift + click to select a range
619ff4d
chore(main): release 3.1.1 (#257)
philips-software-forest-releaser[bot] Nov 21, 2025
0abf7ab
build(deps): bump philips-software/amp-devcontainer-cpp (#259)
dependabot[bot] Nov 21, 2025
71e682f
build(deps): bump actions/checkout from 5.0.1 to 6.0.0 (#261)
dependabot[bot] Nov 21, 2025
9648060
feat: ndjson reporting - Begin adding ndjson report writer and add co…
alextech Oct 2, 2025
46710e4
feat: ndjson reporting - Begin adding ndjson report writer and add co…
alextech Oct 24, 2025
0ede5f9
feat: ndjson reporting - Add SourceInfo class to be able to handle so…
alextech Oct 29, 2025
60fb20d
feat: ndjson reporting - fix creation of reporters so they are not in…
alextech Nov 3, 2025
1c01aeb
feat: ndjson reporting - keep cucumber::messages::feature in the Feat…
alextech Nov 3, 2025
7aecc0c
feat: ndjson reporting - add Ndjson report comparer as a separate exe…
alextech Nov 4, 2025
4d09e9e
feat: ndjson reporting - mark where ndjson comparer will be called from.
alextech Nov 4, 2025
6428fef
feat: ndjson reporting - start implementing expected vs actual compar…
alextech Nov 7, 2025
bb371f0
feat: ndjson reporting - get pickle json from scenario info
alextech Nov 12, 2025
d5b84d2
feat: ndjson reporting - fix test compilation
alextech Nov 23, 2025
890d940
feat: ndjson reporting - meta record requires knowing what version of…
alextech Nov 23, 2025
fc7bc5c
feat: ndjson reporting - gherkin document is not just feature but oth…
alextech Nov 30, 2025
5e0a4c4
feat: ndjson reporting - verify that all event objects are present (n…
alextech Dec 1, 2025
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion .devcontainer/Dockerfile
Original file line number Diff line number Diff line change
@@ -1,3 +1,3 @@
FROM ghcr.io/philips-software/amp-devcontainer-cpp:6.0.1@sha256:0b238dbdd0e39a9704fc5317269f654b8bfd23868bad9491e806ae417d645352
FROM ghcr.io/philips-software/amp-devcontainer-cpp:v6.6.0@sha256:3f65569a719ca9b2d996222bcdce3dfe9797903ba4c3aafff364fa6fe9ca114d

HEALTHCHECK NONE
10 changes: 5 additions & 5 deletions .github/workflows/ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -26,7 +26,7 @@ jobs:
runs-on: [ubuntu-latest]
container: ghcr.io/philips-software/amp-devcontainer-cpp:5.6.2@sha256:a0804f7454d52564f07317f7e09a012261b6d9553dbe8854fcf265dce571cf86 # v5.6.2
steps:
- uses: actions/checkout@93cb6efe18208431cddfb8368fd83d5badbf9bfd # v5.0.1
- uses: actions/checkout@1af3b93b6815bc44a9784bd300feb67ff0d1eeb3 # v6.0.0
- uses: actions/cache@0057852bfaa89a56745cba8c7296529d2fc39830 # v4.3.0
id: cache-winsdk
with:
Expand All @@ -48,7 +48,7 @@ jobs:
name: Linux Host Build
runs-on: [ubuntu-24.04]
steps:
- uses: actions/checkout@93cb6efe18208431cddfb8368fd83d5badbf9bfd # v5.0.1
- uses: actions/checkout@1af3b93b6815bc44a9784bd300feb67ff0d1eeb3 # v6.0.0
- uses: hendrikmuhs/ccache-action@bfa03e1de4d7f7c3e80ad9109feedd05c4f5a716 # v1.2.19
with:
key: ${{ github.job }}
Expand All @@ -72,7 +72,7 @@ jobs:
runs-on: [ubuntu-latest]
container: ghcr.io/philips-software/amp-devcontainer-cpp:5.6.2@sha256:a0804f7454d52564f07317f7e09a012261b6d9553dbe8854fcf265dce571cf86 # v5.6.2
steps:
- uses: actions/checkout@93cb6efe18208431cddfb8368fd83d5badbf9bfd # v5.0.1
- uses: actions/checkout@1af3b93b6815bc44a9784bd300feb67ff0d1eeb3 # v6.0.0
- uses: hendrikmuhs/ccache-action@bfa03e1de4d7f7c3e80ad9109feedd05c4f5a716 # v1.2.19
with:
key: ${{ github.job }}
Expand Down Expand Up @@ -100,7 +100,7 @@ jobs:
pull-requests: write
container: ghcr.io/philips-software/amp-devcontainer-cpp:5.6.2@sha256:a0804f7454d52564f07317f7e09a012261b6d9553dbe8854fcf265dce571cf86 # v5.6.2
steps:
- uses: actions/checkout@93cb6efe18208431cddfb8368fd83d5badbf9bfd # v5.0.1
- uses: actions/checkout@1af3b93b6815bc44a9784bd300feb67ff0d1eeb3 # v6.0.0
- uses: hendrikmuhs/ccache-action@bfa03e1de4d7f7c3e80ad9109feedd05c4f5a716 # v1.2.19
with:
key: ${{ github.job }}
Expand All @@ -124,7 +124,7 @@ jobs:
matrix:
os: [macos-latest, windows-latest]
steps:
- uses: actions/checkout@93cb6efe18208431cddfb8368fd83d5badbf9bfd # v5.0.1
- uses: actions/checkout@1af3b93b6815bc44a9784bd300feb67ff0d1eeb3 # v6.0.0
with:
persist-credentials: false
- uses: hendrikmuhs/ccache-action@bfa03e1de4d7f7c3e80ad9109feedd05c4f5a716 # v1.2.19
Expand Down
2 changes: 1 addition & 1 deletion .github/workflows/linting-formatting.yml
Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,7 @@ jobs:
pull-requests: write
security-events: write
steps:
- uses: actions/checkout@93cb6efe18208431cddfb8368fd83d5badbf9bfd # v5.0.1
- uses: actions/checkout@1af3b93b6815bc44a9784bd300feb67ff0d1eeb3 # v6.0.0
with:
fetch-depth: 0
persist-credentials: false
Expand Down
2 changes: 1 addition & 1 deletion .github/workflows/security.yml
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,7 @@ jobs:
actions: read
contents: read
steps:
- uses: actions/checkout@93cb6efe18208431cddfb8368fd83d5badbf9bfd # v5.0.1
- uses: actions/checkout@1af3b93b6815bc44a9784bd300feb67ff0d1eeb3 # v6.0.0
with:
persist-credentials: false
- name: Analysis
Expand Down
4 changes: 2 additions & 2 deletions .github/workflows/static-analysis.yml
Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,7 @@ jobs:
env:
SONAR_SERVER_URL: "https://sonarcloud.io"
steps:
- uses: actions/checkout@93cb6efe18208431cddfb8368fd83d5badbf9bfd # v5.0.1
- uses: actions/checkout@1af3b93b6815bc44a9784bd300feb67ff0d1eeb3 # v6.0.0
with:
fetch-depth: 0 # Disable shallow clone to enable blame information
persist-credentials: false
Expand Down Expand Up @@ -71,7 +71,7 @@ jobs:
permissions:
security-events: write
steps:
- uses: actions/checkout@93cb6efe18208431cddfb8368fd83d5badbf9bfd # v5.0.1
- uses: actions/checkout@1af3b93b6815bc44a9784bd300feb67ff0d1eeb3 # v6.0.0
with:
persist-credentials: false
- uses: hendrikmuhs/ccache-action@bfa03e1de4d7f7c3e80ad9109feedd05c4f5a716 # v1.2.19
Expand Down
2 changes: 1 addition & 1 deletion .release-please-manifest.json
Original file line number Diff line number Diff line change
@@ -1,3 +1,3 @@
{
".": "3.1.0"
".": "3.1.1"
}
13 changes: 13 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,5 +1,18 @@
# Changelog

## [3.1.1](https://github.com/philips-software/amp-cucumber-cpp-runner/compare/v3.1.0...v3.1.1) (2025-11-21)


### Bug Fixes

* Resolve runtime static initialization order dependencies ([#254](https://github.com/philips-software/amp-cucumber-cpp-runner/issues/254)) ([#258](https://github.com/philips-software/amp-cucumber-cpp-runner/issues/258)) ([a45c85d](https://github.com/philips-software/amp-cucumber-cpp-runner/commit/a45c85d95cfe07d8c87b0ed5107c15982e86fe0d))
* Revert IsEscapeCharacter signed char change ([#253](https://github.com/philips-software/amp-cucumber-cpp-runner/issues/253)) ([52d8a5d](https://github.com/philips-software/amp-cucumber-cpp-runner/commit/52d8a5d51d76535848499a98e4b75fbe4396e665))


### Chores

* Remove unused arguments in example app ([#255](https://github.com/philips-software/amp-cucumber-cpp-runner/issues/255)) ([410b33c](https://github.com/philips-software/amp-cucumber-cpp-runner/commit/410b33c71d98a2fb5f6efe0c2dcf65c76f5d7eb7))

## [3.1.0](https://github.com/philips-software/amp-cucumber-cpp-runner/compare/v3.0.0...v3.1.0) (2025-11-17)


Expand Down
1 change: 1 addition & 0 deletions CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,7 @@ cmake_minimum_required(VERSION 3.24)
list(APPEND CMAKE_MODULE_PATH "${CMAKE_CURRENT_LIST_DIR}/cmake")

project(cucumber-cpp-runner LANGUAGES C CXX VERSION 3.1.0) # x-release-please-version
set(MESSAGES_PROTOCOL_VERSION "26.0.1")

include(ccr_test_helpers)

Expand Down
12 changes: 12 additions & 0 deletions cucumber_cpp/acceptance_test/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -21,5 +21,17 @@ target_link_libraries(cucumber_cpp.acceptance_test.custom PRIVATE
cucumber_cpp.acceptance_test.steps
)

add_executable(cucumber_cpp.acceptance_test.ndjson_assertion ${CCR_EXCLUDE_FROMALL})

target_sources(cucumber_cpp.acceptance_test.ndjson_assertion PRIVATE
MainNdjsonAssertion.cpp
)

target_link_libraries(cucumber_cpp.acceptance_test.ndjson_assertion PRIVATE
cucumber_cpp.acceptance_test.util
CLI11
)

add_subdirectory(hooks)
add_subdirectory(steps)
add_subdirectory(util)
22 changes: 22 additions & 0 deletions cucumber_cpp/acceptance_test/MainNdjsonAssertion.cpp
Original file line number Diff line number Diff line change
@@ -0,0 +1,22 @@
#include "util/NdjsonComparer.h"
#include <CLI/App.hpp>
#include <CLI/CLI.hpp>
#include <CLI/Validators.hpp>
#include <string>

int main(const int argc, char**argv)
{
CLI::App app("Cucumber Ndjson reporter acceptance test assertion");

std::string pathExpected;
std::string pathActual;
app.add_option("-e,--expected", pathExpected, "Path to expected ndjson report to compare against")->required();
app.add_option("-a,--actual", pathActual, "Path to ndjson report to be validated")->required();

CLI11_PARSE(app, argc, argv);

const bool areEquivalent = NdjsonComparer::AreEquivalent(pathExpected, pathActual);

std::cout << (areEquivalent ? "true" : "false");

}
6 changes: 6 additions & 0 deletions cucumber_cpp/acceptance_test/compatibility.bats
Original file line number Diff line number Diff line change
@@ -0,0 +1,6 @@
#!/usr/bin/env bats

@test "Minimal" {
run .build/Host/cucumber_cpp/acceptance_test/Debug/cucumber_cpp.acceptance_test run --feature cucumber_cpp/acceptance_test/compatibility/minimal/ --report ndjson
# TODO link run NdjsonComparer with paths to expected file in the repository and actual file from the result
}
Original file line number Diff line number Diff line change
@@ -0,0 +1,6 @@
Feature: Ambiguous steps
Multiple step definitions that match a pickle step result in an AMBIGUOUS status, since Cucumnber cannot determine
which one to execute.

Scenario: Multiple step definitions for a step
Given a step with multiple definitions
Original file line number Diff line number Diff line change
@@ -0,0 +1,13 @@
{"meta":{"protocolVersion":"29.0.1","implementation":{"name":"fake-cucumber","version":"123.45.6"},"cpu":{"name":"arm64"},"os":{"name":"darwin","version":"24.5.0"},"runtime":{"name":"Node.js","version":"24.4.1"},"ci":{"name":"GitHub Actions","url":"https://github.com/cucumber-ltd/shouty.rb/actions/runs/154666429","buildNumber":"154666429","git":{"revision":"99684bcacf01d95875834d87903dcb072306c9ad","remote":"https://github.com/cucumber-ltd/shouty.rb.git","branch":"main"}}}}
{"source":{"data":"Feature: Ambiguous steps\n Multiple step definitions that match a pickle step result in an AMBIGUOUS status, since Cucumnber cannot determine\n which one to execute.\n\n Scenario: Multiple step definitions for a step\n Given a step with multiple definitions\n","uri":"samples/ambiguous/ambiguous.feature","mediaType":"text/x.cucumber.gherkin+plain"}}
{"gherkinDocument":{"feature":{"tags":[],"location":{"line":1,"column":1},"language":"en","keyword":"Feature","name":"Ambiguous steps","description":" Multiple step definitions that match a pickle step result in an AMBIGUOUS status, since Cucumnber cannot determine\n which one to execute.","children":[{"scenario":{"id":"1","tags":[],"location":{"line":5,"column":3},"keyword":"Scenario","name":"Multiple step definitions for a step","description":"","steps":[{"id":"0","location":{"line":6,"column":5},"keyword":"Given ","keywordType":"Context","text":"a step with multiple definitions"}],"examples":[]}}]},"comments":[],"uri":"samples/ambiguous/ambiguous.feature"}}
{"pickle":{"id":"3","uri":"samples/ambiguous/ambiguous.feature","astNodeIds":["1"],"tags":[],"name":"Multiple step definitions for a step","language":"en","steps":[{"id":"2","text":"a step with multiple definitions","type":"Context","astNodeIds":["0"]}]}}
{"stepDefinition":{"id":"4","pattern":{"type":"REGULAR_EXPRESSION","source":"^a (.*?) with (.*?)$"},"sourceReference":{"uri":"samples/ambiguous/ambiguous.ts","location":{"line":3}}}}
{"stepDefinition":{"id":"5","pattern":{"type":"REGULAR_EXPRESSION","source":"^a step with (.*)$"},"sourceReference":{"uri":"samples/ambiguous/ambiguous.ts","location":{"line":7}}}}
{"testRunStarted":{"id":"6","timestamp":{"seconds":0,"nanos":0}}}
{"testCase":{"id":"7","pickleId":"3","testSteps":[{"id":"8","pickleStepId":"2","stepDefinitionIds":["4","5"],"stepMatchArgumentsLists":[{"stepMatchArguments":[{"group":{"start":2,"value":"step","children":[]}},{"group":{"start":12,"value":"multiple definitions","children":[]}}]},{"stepMatchArguments":[{"group":{"start":12,"value":"multiple definitions","children":[]},"parameterTypeName":""}]}]}],"testRunStartedId":"6"}}
{"testCaseStarted":{"id":"9","testCaseId":"7","timestamp":{"seconds":0,"nanos":1000000},"attempt":0}}
{"testStepStarted":{"testCaseStartedId":"9","testStepId":"8","timestamp":{"seconds":0,"nanos":2000000}}}
{"testStepFinished":{"testCaseStartedId":"9","testStepId":"8","testStepResult":{"status":"AMBIGUOUS","duration":{"seconds":0,"nanos":0}},"timestamp":{"seconds":0,"nanos":3000000}}}
{"testCaseFinished":{"testCaseStartedId":"9","timestamp":{"seconds":0,"nanos":4000000},"willBeRetried":false}}
{"testRunFinished":{"testRunStartedId":"6","timestamp":{"seconds":0,"nanos":5000000},"success":false}}
Original file line number Diff line number Diff line change
@@ -0,0 +1,36 @@
Feature: Attachments
It is sometimes useful to take a screenshot while a scenario runs or capture some logs.

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

Formatters can then render these attachments in reports.

Attachments must have a body and a content type.

Scenario: Strings can be attached with a media type
Beware that some formatters such as @cucumber/react use the media type
to determine how to display an attachment.

When the string "hello" is attached as "application/octet-stream"

Scenario: Log text
When the string "hello" is logged

Scenario: Log ANSI coloured text
When text with ANSI escapes is logged

Scenario: Log JSON
When the following string is attached as "application/json":
```
{"message": "The <b>big</b> question", "foo": "bar"}
```

Scenario: Byte arrays are base64-encoded regardless of media type
When an array with 10 bytes is attached as "text/plain"

Scenario: Attaching PDFs with a different filename
When a PDF document is attached and renamed

Scenario: Attaching URIs
When a link to "https://cucumber.io" is attached
Loading