pester / AzureDevOpsExtension

MIT License
27 stars 14 forks source link

Add flag to fail on or not on stderr - Fixes #56 #59

Closed ChrisLGardner closed 3 years ago

ChrisLGardner commented 3 years ago

What problem does this PR address?

If a tested function or application write to StdErr and it is not captured then it can cause the task to fail even if it's actually succeeded. This is usually an issue with command line tools (like git) where they will often write information output to stderr because they are limited to 2 streams of data.

The solution here is to add a flag to allow the user to decide if the task should fail when data is written to StdErr. It currently defaults to True as that is the current behaviour and I don't want to break it for anyone who is currently using this behaviour as they'd expect. The test suite will still fail correctly if any tests fail as those are tracked separately by Pester and the logs don't write to StdErr (using Write-Host instead).

Is there a related Issue?

56

Have you...