-
-
Notifications
You must be signed in to change notification settings - Fork 473
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
Handle tests marked as inconclusive #2405
Handle tests marked as inconclusive #2405
Conversation
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Happy new year! 🎆
Thanks for looking into this. It looks great!
I've left a few comments. There's also a few more places to update:
-
Update example in
Set-ItResult
comment-based help to include a Inconclusive test + fix summary line which has been wrong the whole time. 🤦♂️ -
Update
PostPorcess-ExecutedBlock
here to check and increaseOwnInconlusiveCount
similar to skipped. This is used byInconclusive
andOwnInconclusive
at Block-level in the result-object ($result.Inconclusive.Block | ft Name, OwnInconclusiveCount, InconclusiveCount
). I've suggested a typo fix to related bug in the review. -
We need some tests to make sure this works and doesn't break in the future. Suggestions:
-
Include
InconclusiveCount
inConvertTo-Pester4Result
here
Thank you @fflaten and late happy new year to you too (sorry about the response time). I have tried to address your comments and requested changes, but would appreciate some advise on this one though:
Can I trouble you for an example of what you have in mind that is not already there? |
@fflaten when you have a moment, please let me know if there is anything else I should do or address to complete this PR. Thanks |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Getting close! A few more things for the NUnit-reports:
- Testsuites in NUnit 2.5 will get Success result when it contains a inconclusive test. Need to extend
Pester/src/functions/TestResults.NUnit25.ps1
Lines 395 to 403 in acc66a9
} if ($InputObject.SkippedCount -gt 0) { return 'Ignored' } if ($InputObject.PendingCount -gt 0) { return 'Inconclusive' } return 'Success' } - Results in NUnit 3.0 should be
Inconclusive
if no other tests are failed/passed. Maybe add aPassedCount -gt 0
= Passed elseif and default toInconclusive
?:Pester/src/functions/TestResults.NUnit3.ps1
Lines 344 to 349 in acc66a9
elseif ($InputObject.SkippedCount -gt 0) { 'Skipped' } else { 'Passed' }
Apologies for the delay. Been occupied with work for a while.
Can't remember tbh. so just ignore it. I probably missed the existing inconclusive test 🙂 |
& release. <- Not so easy :D My certificate expired because I asked for renew and then went on vacation. I am waiting for a new one. |
Looking good. I've added cheaper way of checking that the deprecation should be shown so we don't have to inspect every single test on every run. |
Merged, thank you! :) |
No thank you for your work, and sorry for being slow! Same huge thanks for Frode 👏 |
PR Summary
Inconclusive
andInconclusiveCount
properties on thePester.Run
object.Set-ItResult -Pending
is used in tests.Fix #2400
PR Checklist
Create Pull Request
to mark it as a draft. PR can be markedReady for review
when it's ready.Notes
I think the logic to handle inconclusive tests is sound, but I am looking for feedback on these points