feat: run cucumber scenario as go subtest #1244
Merged
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Description
This PR is aimed to make cucumber based tests better integrated with the go test framework so each scenario is executed as if it were a standard subtest.
As example, by running the test with
go test -p 1 -ldflags -s -v ./internal/connector/test/integration/...
, the final test summary would be like:Because we have proper subtests, we can also specify what test to run, as example, by adding
-run "TestFeatures/connector_api"
to the test command, we will have the following report:This works also when running in GoLand, as example, with the following set-up:
Only the
Gary_can_discover_the_API_endpoints
step, part of the connector-api feature, will be executedNotes:
make test/integration/connectors
works as well but has a slightly different outputChecklist (Definition of Done)
All acceptance criteria specified in JIRA have been completedDocumentation added for the featureRequired metrics/dashboards/alerts have been added (or PR created).Required Standard Operating Procedure (SOP) is added.JIRA has been created for changes required on the client side