Skip to content

Suggestion: Add 'Set-GitHubConfiguration -DefaultNoStatus' to All Pester Tests #206

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

Closed
X-Guardian opened this issue May 31, 2020 · 1 comment · Fixed by #207
Closed

Suggestion: Add 'Set-GitHubConfiguration -DefaultNoStatus' to All Pester Tests #206

X-Guardian opened this issue May 31, 2020 · 1 comment · Fixed by #207
Labels
build Changes related to the build infrastructure for the project. tests A change related to the Pester tests for the module.

Comments

@X-Guardian
Copy link
Contributor

Currently the full suite of Pester tests take between 20 to 25 minutes to run per environment within the CI pipeline. There are currently three environments being tested (Windows, Linux and MacOS) meaning the full CI takes about 1 hour 15 mins to run.

Locally running the GitHubRepositories.tests Pester tests and adding Set-GitHubConfiguration -DefaultNoStatus in a BeforeAll block for each Describe block, reduces the time for the GitHubRepositories tests to run from approx 60 secs to 25 secs.

Extrapolating this up, applying this change to all tests may reduce the full test suite run from 1 hour 15 mins to approx 30 mins.

I've also noticed that the Azure DevOps Pipeline raw log for the 'Run Unit Tests via Pester` step are 'corrupted' by the status output on Linux and MacOS, unlike on Windows. Making this change would also resolve this.

@HowardWolosky
Copy link
Member

Thanks @X-Guardian! -- I had noticed the "corruption" in the raw output log for Linux, but had been unaware of the time impact. Nice call out. I'll put out a PR now to see what impact that practically makes. If it's even remotely close to being that impactful, it's definitely worth it to make the change.

@HowardWolosky HowardWolosky added build Changes related to the build infrastructure for the project. tests A change related to the Pester tests for the module. labels May 31, 2020
HowardWolosky added a commit that referenced this issue 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](https://dev.azure.com/ms/PowerShellForGitHub/_build/results?buildId=84315) without this change: 1h 19m
[Run with this change](https://dev.azure.com/ms/PowerShellForGitHub/_build/results?buildId=84357) without this change: 54m

Resolves #206
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 a pull request may close this issue.

2 participants