LukeMathWalker / LukeMathWalker/wiremock-rs
More helpful failed verifications panic messages
Nobody has claimed this yet.
- Dominant language
- Rust
- Stars
- 799
- Forks
- 91
- PR merge metrics
- No merged PRs in 30d
Description
Hello,
I think having clearer failed verification messages would make debugging multiple chained .and(matcher) calls easier. For example:
Mock::given(header_exists("X-Postmark-Server-Token"))
.and(header("Content-Type", "application/json"))
.and(path("/email"))
.and(method("POST"))
.and(SendEmailBodyMatcher)
Fails with:
thread 'email_client::tests::send_email_sends_the_expected_request' panicked at 'Verifications failed:
- Mock #0.
Expected range of matching incoming requests: == 1
Number of matched incoming requests: 0
As opposed to specifying which matcher in particular failed.
Contributor guide
No contributing guide indexed for this repository
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
Research direction
The issue names no files, tests, or entry points. Reproduce the chained matcher example and locate the verification failure message generation; done means the panic identifies which matcher failed rather than only reporting the aggregate request count.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- rust
- Domain
- testing-qa
- Issue type
- Feature
- Difficulty
- 3/5
- Estimated time
- 1-2 days
- Activity status
- Stale
- Clarity
- Mostly clear
- Newbie friendliness
- 35/100