Handle tests marked as inconclusive#2405
Conversation
There was a problem hiding this comment.
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-ItResultcomment-based help to include a Inconclusive test + fix summary line which has been wrong the whole time. 🤦♂️ -
Update
PostPorcess-ExecutedBlockhere to check and increaseOwnInconlusiveCountsimilar to skipped. This is used byInconclusiveandOwnInconclusiveat 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
InconclusiveCountinConvertTo-Pester4Resulthere
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.
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
- Results in NUnit 3.0 should be
Inconclusiveif 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
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
InconclusiveandInconclusiveCountproperties on thePester.Runobject.Set-ItResult -Pendingis used in tests.Fix #2400
PR Checklist
Create Pull Requestto mark it as a draft. PR can be markedReady for reviewwhen it's ready.Notes
I think the logic to handle inconclusive tests is sound, but I am looking for feedback on these points