test: add gherkin e2e suite for evaluation.feature - #127
Draft
mtonko-flx wants to merge 4 commits into
Draft
mtonko-flx wants to merge 4 commits into
mtonko-flx wants to merge 4 commits into
Conversation
|
Important Draft PR not reviewedDraft PRs are not automatically reviewed by default.
To automatically review draft PRs, update your CodeRabbit configuration: reviews:
auto_review:
drafts: trueComment |
mtonko-flx
force-pushed
the
test-gherkin-e2e
branch
from
August 18, 2026 12:27
4ea35e1 to
0b240c7
Compare
mtonko-flx
marked this pull request as draft
August 18, 2026 12:31
mtonko-flx
force-pushed
the
test-gherkin-e2e
branch
4 times, most recently
from
August 19, 2026 14:35
3c0b87a to
143dce7
Compare
mtonko-flx
force-pushed
the
test-gherkin-e2e
branch
from
August 19, 2026 14:54
143dce7 to
38e5671
Compare
mtonko-flx
force-pushed
the
test-gherkin-e2e
branch
from
September 3, 2026 14:52
38e5671 to
91ee6d6
Compare
Signed-off-by: Mark Tonkonoh <mark.tonkonoh@fluxon.com>
Signed-off-by: Mark Tonkonoh <mark.tonkonoh@fluxon.com>
Signed-off-by: Mark Tonkonoh <mark.tonkonoh@fluxon.com>
mtonko-flx
force-pushed
the
test-gherkin-e2e
branch
from
September 4, 2026 08:37
91ee6d6 to
ed60fd7
Compare
Signed-off-by: Mark Tonkonoh <mark.tonkonoh@fluxon.com>
mtonko-flx
force-pushed
the
test-gherkin-e2e
branch
from
September 4, 2026 09:36
ed60fd7 to
a4881bf
Compare
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
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.
Closes #105.
Intent
Appendix A requires end-to-end tests to run against an in-memory provider and be self-contained, using the shared Gherkin suite from Appendix B. This adds
open-feature/specas a submodule and runsevaluation.featureagainstInMemoryProviderthrough the publicOpenFeatureAPIandClientsurface, with no mocks or stubs anywhere in the path.Motivation
Nothing in this repository validated the SDK end to end. The unit tests each verify one component against a double, so a defect in the seam between them (how the client dispatches by flag type, what it does with a provider throw, whether the evaluation context reaches the provider at all) would not have been caught. The shared suite is also how the ecosystem checks that SDKs agree with each other, and this SDK was not running it.
evaluation.featureis what js-sdk and go-sdk run today;evaluation_v2.featureis left for follow-up, because it additionally needstest-flags.jsonparsing, provider-state doubles, and metadata and data-table steps.Changes
Implementation
open-feature/specas a submodule atspec/, pinned by commit with nobranch =key, matching java-sdk and js-sdk.e2e/Swift package, separate from the root package, depending on it by path and on CucumberSwift. CucumberSwift declares no watchOS support and usesXCTAttachment/XCTContextunconditionally, so a root test target would break the watchOS CI job and add CucumberSwift plus CucumberSwiftExpressions to every consumer's dependency graph. The rootPackage.resolvedstill pinsswift-logalone..package(name: "OpenFeature", path: ".."), so package identity does not follow the checkout directory name.scripts/e2e, which initialises the submodule, copiesevaluation.featureinto the test target's gitignoredFeatures/directory, then runsswift testine2e/.swift testcopies a symlinked resource directory as a dangling symlink while Xcode follows it, so a symlink would pass locally and crash in CI. Copying one file also keepsevaluation_v2,hooks,metadataandcontextMergingout of the bundle, which CucumberSwift would otherwise enumerate and fail on..copy, not.process:.processflattens directories, and CucumberSwift resolves features viabundle.url(forResource: "Features", withExtension: nil).bundletoBundle.module, notBundle(for:)as in CucumberSwift's own consumer test, because under SwiftPM the copied resources live in a sibling bundle rather than inside the.xctest.ErrorCodecases inGherkinArguments.errorCode(_:), failing the step on a code the Gherkin names but the SDK does not define. Java gets this fromErrorCode.valueOf; Swift's cases are camelCase, so the map is explicit andErrorCode's public representation stays untouched.^...$in one file. CucumberSwift matches unanchored and case-insensitively and lets the last matching registration win, so an unanchoreda flag with key "..."would silently claima boolean flag with key "...".Given a stable providerbackground step and clear it before every scenario. That step registers a fresh provider with an explicitly emptyinitialContext, which is what makes the suite order-independent: this is a static-context SDK, so the evaluation context is global and the context-aware scenario mutates it.E2ECI job that checks out withsubmodules: recursive.e2e/.buildandspec/from SwiftLint, and extendscripts/swift-formatto covere2e/Tests.CONTRIBUTING.mdhow to run the suite, whyswift testinsidee2e/traps on a fresh clone, why--filtersilently matches zero tests, and how to bump the spec pin.Testing
string-flag's default variant fromgreetingtopartingfails only the three string steps that assert the resolved value.FLAG_NOT_FOUNDto.parseErrorfails only theFlag not foundscenario, so the error-code map is load-bearing rather than decorative.getObjectEvaluation, which rejects non-.structurevariants, all 13 scenarios still pass, becauseobject-flag's variants are both structures. Pointing itstemplatevariant at a scalar fails exactly the two object scenarios, which confirms the suite exercises that guard rather than passing around it.swift test(168 tests) andxcodebuild test -scheme OpenFeatureon the iOS simulator are both green, and the rootPackage.resolvedis unchanged.Breaking Changes
None - test-only, plus a new submodule. A fresh clone that skips submodules is unaffected unless it runs
scripts/e2e, which initialises the submodule itself.