Skip to content

modify Start-PSPester to accept -Quiet to eliminate Pester output - #2795

Merged
Jason Shirk (lzybkr) merged 2 commits into
PowerShell:masterfrom
JamesWTruher:jameswtruher/travisdaily
Dec 1, 2016
Merged

Jason Shirk (lzybkr) merged 2 commits into
PowerShell:masterfrom
JamesWTruher:jameswtruher/travisdaily

Conversation

@JamesWTruher

Copy link
Copy Markdown
Collaborator

also modify travis.ps1 to include -Quiet for Pester args to reduce
stdout log size which should hopefully allow daily builds to run
without being cancelled due to too much output

@adityapatwardhan

Copy link
Copy Markdown
Member

:shipit:

@lzybkr

Copy link
Copy Markdown
Contributor

With -Quiet, it looks like Pester will not report any failures to the screen.

So how will failing tests be reported in a way we can easily see?

I see our scripts will throw if there are any errors, but it just reports a count. If I'm missing the code that would report the errors to the console, can you point me to that code?

@JamesWTruher

Copy link
Copy Markdown
Collaborator Author

The log file always contains the errors even if they're not emitted to the screen during the test run. I can add functionality to Test-PSPesterResults to emit the errors before throwing. This is probably the best we can hope for because there is so much output there is no way that Travis-CI will be able to run all of our tests.

@lzybkr Jason Shirk (lzybkr) self-assigned this Nov 29, 2016

@lzybkr Jason Shirk (lzybkr) left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Please modify Test-PSPesterResults so that it reports as much detail as possible about the test failures - this will make it easier for the maintainers to quickly see why builds are failing.

@JamesWTruher

Copy link
Copy Markdown
Collaborator Author

Do you wish to see the error details at all times?
Should the default behavior for all test runs be -Quiet?

@lzybkr

Copy link
Copy Markdown
Contributor

I can hardly imagine a scenario where I wouldn't want errors logged to the console, so yes, always.

As for -Quiet being the default for all runs - maybe just in CI. I have on occasion wanted to check that my test ran in CI, but less spew to the console in CI makes finding the errors easier. If the log files are uploaded, maybe it's a reasonable default for CI.

@JamesWTruher

Copy link
Copy Markdown
Collaborator Author

for the moment, I'm going to leave the verbose output for CI runs as I believe that the log output is useful. We can use the daily builds in travis-ci to determine whether we like it or no.

@iSazonov

Copy link
Copy Markdown
Collaborator

Related PR #2600 from Steve Lee (@SteveL-MSFT) who open a feature request in Pester repo.

also modify travis.ps1 to include -Quiet for Pester args to reduce
stdout log size which should hopefully allow daily builds to run
without being cancelled due to too much output
Test-PSPesterResults will now also emit information about the errors
found during a test run rather than just the number of failed tests.
Created a new errorlog function so the output of errors will be red.
@JamesWTruher

Copy link
Copy Markdown
Collaborator Author

Jason Shirk (@lzybkr) requested change should be handled by 2441c89

@lzybkr
Jason Shirk (lzybkr) merged commit 8e360bf into PowerShell:master Dec 1, 2016
@vors sergei (vors) mentioned this pull request Dec 3, 2016
@JamesWTruher
James Truher (JamesWTruher) deleted the jameswtruher/travisdaily branch January 13, 2017 22:30
Thatgfsj (Thatgfsj) pushed a commit to Thatgfsj-contribs/PowerShell that referenced this pull request Aug 6, 2026
…werShell#2795)

* modify Start-PSPester to accept -Quiet to eliminate Pester output

also modify travis.ps1 to include -Quiet for Pester args to reduce
stdout log size which should hopefully allow daily builds to run
without being cancelled due to too much output

* Add error detail information as part of Test-PSPesterResults

Test-PSPesterResults will now also emit information about the errors
found during a test run rather than just the number of failed tests.
Created a new errorlog function so the output of errors will be red.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

Review - Needed The PR is being reviewed

Projects

None yet

Development

Successfully merging this pull request may close these issues.

7 participants