Improve Pester test coverage for core modules
Nobody has claimed this yet.
Assessment
- Difficulty
- 5/5
- Estimated time
- Over a week
- Newbie friendliness
- 35/100
Research direction
Start by reviewing the existing Pester suite under the tests folder and inventorying the core modules and behaviors named in the issue. Then inspect the repository's GitHub workflow configuration, if present, to determine the reusable workflow entry point. Done means expanded mocked coverage, a baseline that increases incrementally, and validation that runs Pester and PSScriptAnalyzer across the supported PowerShell environments.
Written by the indexing model from the issue text.
Description
Is your feature request related to a problem? Please describe.
Monkey365 already includes a Pester test suite under the tests folder, but unit test coverage for the core internal modules is still limited.
Running the project with Set-StrictMode -Version Latest helps catch some issues during execution, but it does not replace automated unit tests, static analysis, or pull request validation.
Describe the solution you'd like
Expand the Pester test suite to cover the main internal components, including:
- Runspace creation, execution, cleanup, and error handling
- API request construction, pagination, retries, and failure scenarios
- Authentication and token-handling workflows
- Configuration file loading, validation, and default values
- Shared functions and other core module behavior
External services should be mocked where possible so the tests remain reliable and can run without access to an Azure or Microsoft 365 tenant.
Add a reusable workflow that:
- Runs Pester and PSScriptAnalyzer for pull requests and commits
- Publishes test results and code coverage
- Fails when tests or static analysis checks fail
- Supports Windows PowerShell and PowerShell Core where applicable
- Can be reused by other Monkey365 repositories
An initial code coverage baseline should be established and increased incrementally as more modules are covered.
Improved test coverage and pull request validation will help catch regressions earlier, make refactoring safer, validate edge cases, and provide clearer documentation of the expected behavior of internal functions.
Related issues
- #153
- #181
- Dominant language
- PowerShell
- Stars
- 1.3k
- Forks
- 140
- PR merge metrics
- No merged PRs in 30d
Contributor guide
No contributing guide indexed for this repository
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
More from silverhack/monkey365
-
Monkey365 1.0 Opendocumentation enhancement epic impact-low priority-high status/In Progress
Difficulty 5/5 Over a week Newbie friendliness 25/100
silverhack/monkey365#190 ·
-
documentation enhancement impact-low priority-high status/In Progress
Difficulty 4/5 3-5 days Newbie friendliness 48/100
silverhack/monkey365#189 ·
-
documentation enhancement help wanted impact-low priority-medium question
Difficulty 4/5 3-5 days Newbie friendliness 68/100
silverhack/monkey365#187 · 1 comment ·
-
enhancement
Difficulty 3/5 1-2 days Newbie friendliness 55/100
silverhack/monkey365#185 ·
-
documentation enhancement epic priority-medium
Difficulty 5/5 Over a week Newbie friendliness 30/100
silverhack/monkey365#184 ·
All issues in silverhack/monkey365
Similar issues
-
kind/bug
Difficulty 2/5 1-3 hours Newbie friendliness 88/100
kubernetes-sigs/prow#953 · 1 comment ·
-
Difficulty 2/5 1-3 hours Newbie friendliness 78/100
-
automated-analysis bug memory-safety
Difficulty 2/5 1-3 hours Newbie friendliness 68/100
-
area/entangle bug
Difficulty 1/5 Under an hour Newbie friendliness 92/100
-
kind/bug Ubuntu 24
Difficulty 2/5 1-3 hours Newbie friendliness 72/100
kubernetes-sigs/kubespray#13532 ·