Skip to content

test: add Pester coverage for Windows scripts - #143

Merged
ReenigneArcher merged 2 commits into
masterfrom
test/powershell-pester
Sep 14, 2026
Merged

ReenigneArcher merged 2 commits into
masterfrom
test/powershell-pester

Conversation

@ReenigneArcher

Copy link
Copy Markdown
Member

Description

Add focused Pester coverage for driver install, uninstall, signing, PnP validation, and browser gamepad helpers.

Run the suite in a reusable Windows workflow and include its Cobertura and JUnit artifacts in the existing Codecov results matrix. Allow executable scripts to be dot-sourced without performing side effects.

Screenshot

Issues Fixed or Closed

Roadmap Issues

Type of Change

  • feat: New feature (non-breaking change which adds functionality)
  • fix: Bug fix (non-breaking change which fixes an issue)
  • docs: Documentation only changes
  • style: Changes that do not affect the meaning of the code (white-space, formatting, missing semicolons, etc.)
  • refactor: Code change that neither fixes a bug nor adds a feature
  • perf: Code change that improves performance
  • test: Adding missing tests or correcting existing tests
  • build: Changes that affect the build system or external dependencies
  • ci: Changes to CI configuration files and scripts
  • chore: Other changes that don't modify src or test files
  • revert: Reverts a previous commit
  • BREAKING CHANGE: Introduces a breaking change (can be combined with any type above)

Checklist

  • Code follows the style guidelines of this project
  • Code has been self-reviewed
  • Code has been commented, particularly in hard-to-understand areas
  • Code docstring/documentation-blocks for new or existing methods/components have been added or updated
  • Unit tests have been added or updated for any new or modified functionality

AI Usage

See our AI usage policy.

  • None: No AI tools were used in creating this PR
  • Light: AI provided minor assistance (formatting, simple suggestions)
  • Moderate: AI helped with code generation or debugging specific parts
  • Heavy: AI generated most or all of the code changes

Add focused Pester coverage for driver install, uninstall, signing, PnP validation, and browser gamepad helpers.

Run the suite in a reusable Windows workflow and include its Cobertura and JUnit artifacts in the existing Codecov results matrix. Allow executable scripts to be dot-sourced without performing side effects.
@codecov

codecov Bot commented Sep 14, 2026

Copy link
Copy Markdown

Codecov Report

✅ All modified and coverable lines are covered by tests.
✅ Project coverage is 73.93%. Comparing base (688209a) to head (8ed582f).
✅ All tests successful. No failed tests found.

Additional details and impacted files

Impacted file tree graph

@@            Coverage Diff             @@
##           master     #143      +/-   ##
==========================================
+ Coverage   73.89%   73.93%   +0.03%     
==========================================
  Files          34       40       +6     
  Lines        9470    10085     +615     
  Branches     3536     3536              
==========================================
+ Hits         6998     7456     +458     
- Misses       1823     1997     +174     
+ Partials      649      632      -17     
Flag Coverage Δ
FreeBSD 52.49% <ø> (-0.05%) ⬇️
Linux-Clang 55.38% <ø> (ø)
Linux-GCC 66.13% <ø> (-0.04%) ⬇️
PowerShell 75.60% <100.00%> (?)
Windows-MSVC 88.53% <ø> (-0.10%) ⬇️
Windows-MinGW-UCRT64 63.64% <ø> (+0.03%) ⬆️
macOS 49.13% <ø> (ø)

Flags with carried forward coverage won't be shown. Click here to find out more.

Files with missing lines Coverage Δ
scripts/windows/install-driver.ps1 87.02% <100.00%> (ø)
scripts/windows/sign-driver-package.ps1 97.14% <100.00%> (ø)
scripts/windows/test-browser-gamepad.ps1 37.50% <100.00%> (ø)
scripts/windows/test-installed-driver.ps1 93.83% <100.00%> (ø)
scripts/windows/uninstall-driver.ps1 73.52% <100.00%> (ø)

... and 4 files with indirect coverage changes


Continue to review full report in Codecov by Harness.

Legend - Click here to learn more
Δ = absolute <relative> (impact), ø = not affected, ? = missing data
Powered by Codecov. Last update 688209a...8ed582f. Read the comment docs.

Store mocked native command exit codes in process-scoped environment variables and clean them after each test file. This preserves cross-scope command behavior while satisfying PSAvoidGlobalVars.
@sonarqubecloud

Copy link
Copy Markdown

@ReenigneArcher
ReenigneArcher merged commit 53e1a94 into master Sep 14, 2026
34 checks passed
@ReenigneArcher
ReenigneArcher deleted the test/powershell-pester branch September 14, 2026 12:18
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant