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

Mark junit test cases as skipped if no pickle step results available #597

Open
wants to merge 1 commit into
base: main
Choose a base branch
from

Conversation

mrsheepuk
Copy link
Contributor

πŸ€” What's changed?

This allows the junit reporter not to panic if the StopOnFirstFailure flag is used. It marks any subsequent test cases as 'skipped' (seemed like the best choice).

I kept the change as small as possible by recovering from the panics, instead of introducing a suite of "non-must' equivalents on the Storage struct. While that would have been far cleaner as code (recovering from panics feels decidedly icky), this solves the issue with relatively little impact to anything else. But if y'all think adding non-must equivalents onto the Storage struct is a better call, happy to make that change.

⚑️ What's your motivation?

Fixes #387

🏷️ What kind of change is this?

  • πŸ› Bug fix (non-breaking change which fixes a defect)

πŸ“‹ Checklist:

Copy link

codecov bot commented Apr 29, 2024

Codecov Report

Attention: Patch coverage is 75.00000% with 9 lines in your changes are missing coverage. Please review.

Project coverage is 83.27%. Comparing base (153db4e) to head (e82afb8).
Report is 6 commits behind head on main.

Files Patch % Lines
internal/formatters/fmt_junit.go 75.00% 4 Missing and 5 partials ⚠️
Additional details and impacted files
@@            Coverage Diff             @@
##             main     #597      +/-   ##
==========================================
+ Coverage   83.21%   83.27%   +0.06%     
==========================================
  Files          28       29       +1     
  Lines        3413     2858     -555     
==========================================
- Hits         2840     2380     -460     
+ Misses        458      357     -101     
- Partials      115      121       +6     

β˜” View full report in Codecov by Sentry.
πŸ“’ Have feedback on the report? Share it here.

@mrsheepuk mrsheepuk force-pushed the fix-junit-stop-on-first-fail branch from 026541e to e82afb8 Compare April 29, 2024 08:53
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.

Can't get report on test failure and StopOnFailure=true
1 participant