Skip to content

Speed up Pester tests by using -NoStatus #207

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 1 commit into from
May 31, 2020

Conversation

HowardWolosky
Copy link
Member

@HowardWolosky HowardWolosky commented May 31, 2020

Suppressing Status (e.g. using -NoStatus) reduces the overall runtime of the UT's across all 3 platforms (Windows, Linux, Mac) by 25-30 min. It also has the side-effect of improving the readability of the raw logs on CI for Linux and Mac.

Most recent run without this change: 1h 19m
Run with this change without this change: 54m

Resolves #206

It appears that suppressing Status may improve the run time of the tests
and remove log corruption on Linux and Mac.
@HowardWolosky HowardWolosky added the build Changes related to the build infrastructure for the project. label May 31, 2020
@HowardWolosky
Copy link
Member Author

/azp run PowerShellForGitHub-CI

@azure-pipelines
Copy link

Azure Pipelines successfully started running 1 pipeline(s).

@HowardWolosky HowardWolosky added the tests A change related to the Pester tests for the module. label May 31, 2020
@HowardWolosky HowardWolosky changed the title Setting Pester tests to default to using -NoStatus to reduce time Speed up Pester tests by using -NoStatus May 31, 2020
@HowardWolosky HowardWolosky merged commit b9dc12f into microsoft:master May 31, 2020
@HowardWolosky HowardWolosky deleted the quietUTs branch May 31, 2020 16:58
@X-Guardian
Copy link
Contributor

OK, my extrapolation was a bit optimistic, but a 25 minute reduction is not bad!

@HowardWolosky
Copy link
Member Author

OK, my extrapolation was a bit optimistic, but a 25 minute reduction is not bad!

Absolutely! This is still a great improvement, all with a single line of code. So, thanks so much for the suggestion!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
build Changes related to the build infrastructure for the project. tests A change related to the Pester tests for the module.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Suggestion: Add 'Set-GitHubConfiguration -DefaultNoStatus' to All Pester Tests
2 participants