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

Surface interaction mismatches to the test running the validation #112

Open
surpher opened this issue Jul 26, 2023 · 0 comments
Open

Surface interaction mismatches to the test running the validation #112

surpher opened this issue Jul 26, 2023 · 0 comments
Labels
enhancement New feature or request help wanted Extra attention is needed v2.x.x Tasks related to setting up next major version of PactSwift

Comments

@surpher
Copy link
Owner

surpher commented Jul 26, 2023

🗣 Context

When setting up a Pact test and running it, lots of times the expected request does not match the request being triggered. When that happens, an informative message at the failing test should be surfaced up to the failing test.
At the moment it only fails with Server error 500 and debug area shows the expected and actual request which is difficult to filter through.

💬 Narrative

When a request does not match the expectation
I want the context and reason for failing to be surfaced to the
So that it's easier for developer to understand why the test failed

📝 Notes

Branch off of https://github.com/surpher/PactSwift/tree/feat/v2.0.0

As a guide surpher/PactSwift v1.x surfaces the issue like so:

Screenshot 2023-05-11 at 12 31 26 pm

✅ Acceptance Criteria

GIVEN a triggered request does not match the expected request defined in builder
WHEN PactSwift throws an error from libpact_ffi
THEN the line in the test is highlighted with XCTestFail and contains:

  • Reason for failure (eg: "Actual request does not match expected interaction")
  • Expected request (eg: POST /v1/endpointName)
  • Actual request (eg: POST /v1/endpointNmae)
@surpher surpher added help wanted Extra attention is needed enhancement New feature or request v2.x.x Tasks related to setting up next major version of PactSwift labels Jul 26, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request help wanted Extra attention is needed v2.x.x Tasks related to setting up next major version of PactSwift
Projects
Development

No branches or pull requests

1 participant