Mark junit test cases as skipped if no pickle step results available#597
Mark junit test cases as skipped if no pickle step results available#597vearutop merged 2 commits intocucumber:mainfrom
Conversation
ef369b1 to
e319fd6
Compare
e319fd6 to
026541e
Compare
Codecov ReportAttention: Patch coverage is
Additional details and impacted files@@ Coverage Diff @@
## main #597 +/- ##
==========================================
- Coverage 83.21% 77.93% -5.28%
==========================================
Files 28 41 +13
Lines 3413 4074 +661
==========================================
+ Hits 2840 3175 +335
- Misses 458 780 +322
- Partials 115 119 +4 ☔ View full report in Codecov by Sentry. 🚀 New features to boost your workflow:
|
026541e to
e82afb8
Compare
Sorry just noticed this comment - if this approach is acceptable @Johnlon (recovering panics instead of changing the return signatures of everything), I'm happy to add tests etc in order to get this mergeable. Will take a look shortly at what is needed. |
|
I'm on holiday so can't remind myself about this. |
Hi there - sorry I was myself away on holiday when you replied @Johnlon :) This PR was the smallest change to fix the issue - by recovering the panics that cause the issue and handling them that way. It works, but a more 'idiomatic go' solution would be to change the function signature that is panicking to return an error, and change all the places it is used to handle the error. That would be a much, much bigger change though - hence my question about whether this approach of just catching the panics was acceptable here. If there's no objection to this panic-recovering approach, it would be my preference to keep the change small and I'll add some tests to cover it as-is. |
e82afb8 to
f91598d
Compare
|
I've rebased this over the latest and actually added some tests for it - I don't know if you're still the right person to review @Johnlon but hopefully should be mergeable if the CI flow passes - take a look and let me know any concerns. |
🤔 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?
📋 Checklist: