Repository navigation
Conversation
Adds tests/PactNet.Compatibility.Tests, which runs the shared pact-compatibility-suite features (git submodule pinned to dd08122) with Reqnroll.xUnit. Feature files are linked from the submodule and code-behind is generated under obj/. - V1 HTTP consumer steps implemented over the public DSL, with NativeInterop only where the DSL cannot express the step - baseline.yaml ratchet: unbaselined failures and baselined passes fail the run; undefined steps count as unsupported; COMPAT_UPDATE_BASELINE=1 rewrites the file - PACT_FFI_LIB overrides the native library via SetDllImportResolver - JUnit output via JunitXml.TestLogger (xUnit json reporter set in compat.runsettings to avoid a logger crash on duplicate titles) Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
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.
Goal
Run the shared pact-compatibility-suite against PactNet, the way pact-go, pact-php, pact-python and pact-reference already do. That way, a pact_ffi upgrade or a DSL change shows up as scenario-level differences instead of surprises in users' tests.
Changes
tests/PactNet.Compatibility.Tests(.NET 10, xUnit) using Reqnroll.dd08122.Pact.V2/V3/V4,WithHttpInteractions) wherever it covers them. Where it doesn't, a smallSupport/layer uses the internal drivers (InternalsVisibleToadded toPactNet).PACT_FFI_LIB=/path/to/libpact_ffi.{so,dylib,dll}(a file, or a directory containing one) runs the suite against a different FFI build than the bundled one.baseline.yamltracks known failures, each with a reason:COMPAT_UPDATE_BASELINE=1rewrites it.compat.runsettingsswitches xUnit to its json reporter, because the default reporter crashes the logger on the suite's duplicate scenario titles.Coverage so far
Only the V1 HTTP consumer steps are implemented: 24 pass, 0 fail, 166 skipped. The same counts come out on pact_ffi 0.5.12, pact-foundation/pact-reference#568 and pact-foundation/pact-reference#584.
These DSL gaps came up while writing the steps. They decide how far the suite can get through the public API:
VerifyAsynconly works inside its callback;Not done
Testing
dotnet test tests/PactNet.Compatibility.Testson macOS arm64 against three pact_ffi builds: 24 pass / 166 skipped each.PACT_FFI_LIBpointing at a missing file fails all 190 scenarios, so the override is what's actually loaded.🤖 Generated with Claude Code