Skip to content

Fix endpoint coverage count for unexpected responses (#307) - #308

Merged
ThomasTNO merged 3 commits into
TNO-S3:mainfrom
Rou404:endpoint-coverage-increment
May 18, 2026
Merged

ThomasTNO merged 3 commits into
TNO-S3:mainfrom
Rou404:endpoint-coverage-increment

Conversation

@Rou404

@Rou404 Rou404 commented May 13, 2026

Copy link
Copy Markdown
Contributor

Fix endpoint coverage count for unexpected responses (#307)

  • Fix endpoint coverage denominator for unexpected responses

Endpoint coverage used the zero-based map index as the tracked length when an unexpected method/path/status tuple was inserted.

This made the denominator one too small, allowing invalid coverage ratios such as 5/4 (125%).

The tracked length now uses index + 1, so newly inserted unexpected response entries are included in the total endpoint count.

Fixes #307

@ThomasTNO

Copy link
Copy Markdown
Member

@LapTapk feel free to check whether this would solve your issue

@LapTapk

LapTapk commented May 13, 2026

Copy link
Copy Markdown

@LapTapk feel free to check whether this would solve your issue

Thanks a lot for the fix in #309.

I looked at the changes, and they do satisfy my issue. I had made the same fix in my local version, and it did indeed fix the constant ~12% coverage problem for me.

Thank you.

@Jelle-Nauta Jelle-Nauta left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Good catch, thanks!

@ThomasTNO
ThomasTNO enabled auto-merge (squash) May 18, 2026 07:54
@ThomasTNO
ThomasTNO disabled auto-merge May 18, 2026 08:30
@ThomasTNO
ThomasTNO merged commit 67f1031 into TNO-S3:main May 18, 2026
7 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Endpoint coverage can report over 100%

4 participants