Guidance Request: Best way to create an output.ps1 plugin that emits Test objects to Write-Output in real time #2011
Unanswered
JustinGrote
asked this question in
Q&A
Replies: 1 comment 5 replies
-
I think this is where I am looking: Pester/src/functions/Output.ps1 Lines 649 to 650 in 8fb1317 Basically I want an option that, at this point, to just do EDIT: I tried putting a write-output here directly and it never came out, I assume it's getting swallowed upstream. |
Beta Was this translation helpful? Give feedback.
5 replies
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
-
@nohwnd @fflaten I may need a little guidance on what is the best way to emit the Test objects found in the .Tests property of the passthru result via the output.ps1 you mentioned
I just need the tests as they complete to be output pipeline style, not all at the end, so I can update the test API as the tests are completed rather than just at the end, and I'd rather not try to parse the Write-Host output if at all possible.
So end result when I run invoke-pester would be:
-Passthru
, output [Test] objects right after every time it writes the write-host of the test result. The [test] objects should be fully formed ideally, including all the test result metadata and the parent block.Beta Was this translation helpful? Give feedback.
All reactions