Is there a way to get logging put into the results file?

59 views
Skip to first unread message

good...@gmail.com

unread,
Apr 1, 2015, 6:20:24 PM4/1/15
to pes...@googlegroups.com
Hi, folks. I'm pretty new to Pester but am loving it so far. There is one thing I'm not really finding an answer to and I hope this is just a newbie mistake.

I'm looking at the NUnit-style results that are created and am noticing there's no logging for the execution of the unit test -- no errors, verbose, warnings, or Write-Host calls in the unit tests themselves. It's as if they are just discarded. This is kind of a pain because to be able to see what actually happened when the test ran I have to either log that somewhere else or I need to run the test by hand and hope the issue reproduces.

Is there just something I'm missing here or is there really no way to easily capture the output that occurred while the test ran into the results?

Dave Wyatt

unread,
Jun 3, 2015, 2:32:45 PM6/3/15
to pes...@googlegroups.com
There's an issue logged for this, but it's tricky to make it happen, since Pester still supports PowerShell v2 and we can't capture any streams other than Output and Error in that version (and Write-Host is a pain in all current versions, though PowerShell v5 is going to help out with this with the new Information stream.)
Reply all
Reply to author
Forward
0 new messages