Skip to content

Use Gherkin to define TCK for UUID and UUri serialization #252

New issue

Have a question about this project? # for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “#”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? # to your account

Open
wants to merge 1 commit into
base: main
Choose a base branch
from

Conversation

sophokles73
Copy link
Contributor

The up-tck component had been using Gherkin for defining the TCK's
test scenarios. The idea was that these could be used for verifying a
language library's compliance with the specification.

This is a first step in the direction described in
eclipse-uprotocol/up-tck#116.

The TCK's test scenarios have been adapted to cover more cases and, in
particular, also cover failure cases. The corresponding unit tests have
been replaced by Cucumber based tests and the Gherkin files have been
amended with OpenFastTrace specification identifiers and are now also
included when doing the requirements tracing run.

This is mainly a demonstration of how this could work. If we decide to go in this direction, we would first need to move the Gherkin files to up-spec, of course.

Copy link
Contributor

@AnotherDaniel AnotherDaniel left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I like this - looked into cucumber a year ago when beginning to rewrite up-subscription spec, but as usual you beat me to it for actually using the thing.


Scenario Outline:
Developers using a uProtocol language library should be able to verify that a specific
endpoint identifier matches a given pattern as specified by the UUri specification.
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Is it possible to add links (to the spec) here? Probably something to do once we move this over to up-spec...

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Instead of linking directly to the corresponding sections in the spec documents, I would rather rely on the OFT specification items which are used to link to the corresponding requirements defined in the specification documents. Links tend to become invalid over time without anybody noticing. However, if the OFT spec items are changed, we will immediately know when doing the trace run ...

@sophokles73 sophokles73 force-pushed the use_gherkin_to_define_tck branch 5 times, most recently from bc58db0 to 8c8ddb8 Compare April 8, 2025 11:54
@sophokles73
Copy link
Contributor Author

I also had to adapt the check.yaml GitHub workflow to correctly run all tests (unit/doc/integration) and create junit reports for them.

I have also figured out how to include the integration (TCK) tests in the tarpaulin (test coverage) run. That will require a (small) change to the shared workflow definition in the uprotocol/ci-cd repo. We can then replace the checks that we had originally implemented in unit tests with the corresponding TCK tests ...

@sophokles73
Copy link
Contributor Author

@PLeVasseur @stevenhartley WDYT?

@sophokles73 sophokles73 force-pushed the use_gherkin_to_define_tck branch 5 times, most recently from 823b09b to 7cdcfe7 Compare April 8, 2025 16:26
@sophokles73 sophokles73 force-pushed the use_gherkin_to_define_tck branch from 7cdcfe7 to 66cf285 Compare April 16, 2025 13:55
The up-tck component had been using Gherkin for defining the TCK's
test scenarios. The idea was that these could be used for verifying a
language library's compliance with the specification.

This is a first step in the direction described in
eclipse-uprotocol/up-tck#116.

The TCK's test scenarios have been adapted to cover more cases and, in
particular, also cover failure cases. The corresponding unit tests have
been replaced by Cucumber based tests and the Gherkin files have been
amended with OpenFastTrace specification identifiers and are now also
included when doing the requirements tracing run.
@sophokles73 sophokles73 force-pushed the use_gherkin_to_define_tck branch from 66cf285 to 9b22c66 Compare April 16, 2025 14:04
Copy link
Contributor

@PLeVasseur PLeVasseur left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM. Concept makes sense.

I suppose you're going to wait on a new release of up-spec with your upstreamed feature files and revise this PR, right?

@sophokles73
Copy link
Contributor Author

LGTM. Concept makes sense.

I suppose you're going to wait on a new release of up-spec with your upstreamed feature files and revise this PR, right?

indeed

# for free to join this conversation on GitHub. Already have an account? # to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants