Skip to content
New issue

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

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

Already on GitHub? Sign in to your account

feat: add basic gherkin test suite for tracking feature (WIP) #285

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

Conversation

warber
Copy link

@warber warber commented Dec 9, 2024

This PR

Adds basic gherkin test suite to test behaviour of the tracking feature.
For now only the handling of the optional tracking event name is covered.

@warber warber force-pushed the feat/gherkin-tracking branch from 531660a to 82cb824 Compare December 9, 2024 11:29
@warber warber marked this pull request as ready for review December 9, 2024 11:30
@warber warber requested a review from toddbaert as a code owner December 9, 2024 11:30
@warber warber force-pushed the feat/gherkin-tracking branch from 82cb824 to cb850eb Compare December 9, 2024 11:32
@warber warber force-pushed the feat/gherkin-tracking branch from cb850eb to 5af836f Compare December 9, 2024 11:33
| "" |
| "NULL" |

Scenario Outline: Provider's track functionality is called
Copy link
Member

Choose a reason for hiding this comment

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

The track API is rich not just an event_name - hence this gherkin file should also test the other cases properly, with information enrichment (if there is some) - https://openfeature.dev/specification/sections/tracking#conditional-requirement-6111 and this would actually be already a test verifying this specification.

We can also reuse the step from the flags (https://github.com/open-feature/spec/blob/main/specification/assets/gherkin/evaluation.feature#L53)

When context contains keys "fn", "ln", "age", "customer" with values "Sulisław", "Świętopełk", 29, "false"

Copy link
Member

Choose a reason for hiding this comment

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

maybe we are also able to write a scenario for https://openfeature.dev/specification/sections/tracking#requirement-614

@warber warber marked this pull request as draft December 9, 2024 12:07
@warber warber changed the title feat: add basic gherkin test suite for tracking feature feat: add basic gherkin test suite for tracking feature (WIP) Dec 9, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants