feat: add evaluator testkit gherkin features and flag configuration - #344
Conversation
Summary of ChangesHello, I'm Gemini Code Assist1! I'm currently reviewing this pull request and will post my feedback shortly. In the meantime, here's a summary to help you and other reviewers quickly get up to speed! This pull request significantly enhances the Highlights
Changelog
Activity
Using Gemini Code AssistThe full guide for Gemini Code Assist can be found on our documentation page, here are some quick tips. Invoking Gemini You can request assistance from Gemini at any point by creating a comment using either
Customization To customize Gemini Code Assist for GitHub experience, repository maintainers can create a configuration file and/or provide a custom code review style guide (such as PEP-8 for Python) by creating and adding files to a Limitations & Feedback Gemini Code Assist may make mistakes. Please leave feedback on any instances where its feedback is incorrect or counter productive. You can react with 👍 and 👎 on @gemini-code-assist comments. If you're interested in giving your feedback about your experience with Gemini Code Assist for GitHub and other Google products, sign up here. You can also get AI-powered code generation, chat, as well as code reviews directly in the IDE at no cost with the Gemini Code Assist IDE Extension. Footnotes
|
…ranch Points the testkit submodule to the feat/evaluator-testkut branch commit which adds evaluator/gherkin/ and evaluator/flags/ — the source files for the bundled testkit features and flag configuration. See: open-feature/flagd-testbed#344 Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
Adds the Gherkin feature files and flag configuration used by the flagd-api-testkit (tools/flagd-api-testkit in java-sdk-contrib). Feature files (evaluator/gherkin/): - evaluation.feature — basic static resolution (all types) - zero-values.feature — zero/falsy/empty values, static + targeted - no-default-variant.feature — null/undefined defaultVariant edge cases - errors.feature — FLAG_NOT_FOUND, TYPE_MISMATCH - fractional.feature — fractional bucketing - semver.feature — semantic version operators - string.feature — starts_with / ends_with - targeting.feature — targeting key - evaluator-refs.feature — $ref evaluator reuse - metadata.feature — flag metadata Flag configuration (evaluator/flags/): - testkit-flags.json — all flags used by the above features These files are sourced by the testkit via git submodule and packaged into the release JAR so consumers need no submodule of their own. Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com> Signed-off-by: Simon Schrottner <simon.schrottner@dynatrace.com>
…ranch Points the testkit submodule to the feat/evaluator-testkut branch commit which adds evaluator/gherkin/ and evaluator/flags/ — the source files for the bundled testkit features and flag configuration. See: open-feature/flagd-testbed#344 Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com> Signed-off-by: Simon Schrottner <simon.schrottner@dynatrace.com>
5cbda68 to
9999beb
Compare
There was a problem hiding this comment.
Code Review
This pull request introduces a comprehensive testkit for the flagd-api Evaluator interface, including a wide range of Gherkin feature files and a corresponding flag configuration JSON. The test scenarios cover basic evaluation, error handling, various operators, and edge cases, which is excellent for ensuring compliance of implementations. The structure is logical and the test cases are well-defined. I have one suggestion to improve the clarity of the flag configuration for fractional targeting, making it more explicit and easier to understand for consumers of this testkit.
- evaluation.feature, evaluator-refs.feature, string.feature, targeting.feature: remove Background block with single scenario outline (no-background-only-scenario rule); inline 'Given an evaluator' as first step in the Scenario Outline - no-default-variant.feature: move @no-default-variant tag from Scenario Outline to Feature level (no-homogenous-tags rule) Signed-off-by: Simon Schrottner <simon.schrottner@dynatrace.com> Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com> Signed-off-by: Simon Schrottner <simon.schrottner@dynatrace.com>
…-only-scenario) The file has only one Scenario Outline so a Background block is not allowed by the no-background-only-scenario lint rule. Inline 'Given an evaluator' as the first step in the Scenario Outline instead. Signed-off-by: Simon Schrottner <simon.schrottner@dynatrace.com> Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com> Signed-off-by: Simon Schrottner <simon.schrottner@dynatrace.com>
Summary
Adds Gherkin feature files and flag configuration for the
flagd-api-testkit— a compliance testkit for testing implementations of the flagd-apiEvaluatorinterface (see java-sdk-contrib#1742).Files added
evaluator/gherkin/— 10 feature files split by concernevaluation.featurezero-values.featureno-default-variant.featuredefaultVariantedge caseserrors.featureFLAG_NOT_FOUND,TYPE_MISMATCHerror codesfractional.featuresemver.featurestring.featurestarts_with/ends_withstring operatorstargeting.featureevaluator-refs.feature$refshared evaluator reusemetadata.featureevaluator/flags/testkit-flags.jsonCombined flagd flag configuration covering all scenarios above, including
$evaluatorsfor shared targeting rules.How it's used
The
flagd-api-testkitJAR (injava-sdk-contrib) bundles these files via git submodule at build time. Consumers depend only on the JAR — no submodule needed on their side.