DscResource.Test
0.18.0
Testing DSC Resources against HQRM guidelines
Minimum PowerShell version
5.0
See the version list below for details.
Installation Options
Owners
Copyright
(c) dsccommunity. All rights reserved.
Package Details
Author(s)
- DSC Community
Tags
DesiredStateConfiguration DSC DSCResourceKit DSCResource
Functions
Clear-DscLcmConfiguration Get-DscResourceTestContainer Get-InvalidArgumentRecord Get-InvalidOperationRecord Get-InvalidResultRecord Get-ObjectNotFoundRecord Initialize-TestEnvironment Invoke-DscResourceTest New-DscSelfSignedCertificate Restore-TestEnvironment Task.Fail_Build_If_HQRM_Tests_Failed Task.Invoke_HQRM_Tests_Stop_On_Fail Task.Invoke_HQRM_Tests Wait-ForIdleLcm
Dependencies
This module has no dependencies.
Release Notes
## [0.18.0] - 2025-09-01
### Added
- Add workflow for GitHub Copilot Agent.
- `ModuleManifest.common.v5.Tests`
- Added compatibility test for `CmdletsToExport` in modules with class-based DSC resources. The test validates that when a module contains class-based resources and has `CmdletsToExport` specified in the manifest, it must be set to '*' for compatibility with PSDesiredStateConfiguration 2.0.7. [#165](https://github.com/dsccommunity/DscResource.Test/issues/165)
- Updated the test that verifies that resources are exported in the module manifest to work cross-platform.
- Added a test to verify that the module manifest is valid.
### Fixed
- Add ability to filter out files in `ExampleFiles.common.v4` [#120](https://github.com/dsccommunity/DscResource.Test/issues/120).
- Private function `Test-FileContainsClassResource`
- Refactored to correctly find class-based resources (including parameterized attributes) and to throw detailed parse errors with file and position information.
- `ExampleFiles.common.*` skip if on PowerShell 6+ [#169](https://github.com/dsccommunity/DscResource.Test/issues/169).
### Removed
- Remove ModuleBuilder patch.
### Changed
- `Changelog.common.v5.Tests`
- Suppress 'PSUseDeclaredVarsMoreThanAssignments' ScriptAnalyzer rule.
- `ExampleFiles.common.v5.Tests`
- Suppress 'PSUseDeclaredVarsMoreThanAssignments' ScriptAnalyzer rule.
- Suppress 'PSAvoidUsingConvertToSecureStringWithPlainText' ScriptAnalyzer rule.
- Remove array addition.
- `FileFormatting.common.v5.Tests`
- Suppress 'PSUseDeclaredVarsMoreThanAssignments' ScriptAnalyzer rule.
- Remove array addition.
- Remove single use variable.
- `MarkdownLinks.common.v5.Tests`
- Suppress 'PSUseDeclaredVarsMoreThanAssignments' ScriptAnalyzer rule.
- Remove array addition.
- Remove single use variable.
- `ModuleScriptFiles.common.v5.Tests`
- Suppress 'PSUseDeclaredVarsMoreThanAssignments' ScriptAnalyzer rule.
- Remove array addition.
- Remove single use variable.
- `PSSAResource.common.v5.Tests`
- Suppress 'PSUseDeclaredVarsMoreThanAssignments' ScriptAnalyzer rule.
- Remove array addition.
- Remove single use variable.
- Target all source files [#163](https://github.com/dsccommunity/DscResource.Test/issues/163).
- `PublishExampleFiles.common.v5.Tests`
- Suppress 'PSUseDeclaredVarsMoreThanAssignments' ScriptAnalyzer rule.
- Remove array addition.
- Remove single use variable.
- `RelativePathLength.common.v5.Tests`
- Suppress 'PSUseDeclaredVarsMoreThanAssignments' ScriptAnalyzer rule.
- Remove array addition.
- Remove single use variable.
- `ResourceSchema.common.v5.Tests`
- Suppress 'PSUseDeclaredVarsMoreThanAssignments' ScriptAnalyzer rule.
- Remove array addition in following Public/Private functions.
- `Get-ClassResourceNameFromFile`
- `Get-ModuleScriptResourceName`
- `Get-SuppressedPSSARuleNameList`
- `Invoke-DscResourceTest`
- `Invoke_HQRM_Tests.build`
FileList
- DscResource.Test.nuspec
- DscResource.Test.psd1
- Tests\QA\ModuleFiles.common.v4.Tests.ps1
- Tests\QA\ModuleScriptFiles.common.v5.Tests.ps1
- DscResource.Test.psm1
- Tests\QA\Changelog.common.v4.Tests.ps1
- tasks\Invoke_HQRM_Tests.build.ps1
- Tests\QA\ModuleManifest.common.v4.Tests.ps1
- tasks\Invoke_HQRM_Tests_Stop_On_Fail.build.ps1
- Tests\QA\ResourceSchema.common.v4.Tests.ps1
- tasks\Fail_Build_If_HQRM_Tests_Failed.build.ps1
- Tests\QA\PSSAResource.common.v4.Tests.ps1
- Tests\SpellCheck.common.v4.Tests.ps1
- Tests\QA\Localization.common.v5.Tests.ps1
- Config\PSSA_rules_config.json
- Tests\QA\PublishExampleFiles.common.v5.Tests.ps1
- en-US\DscResource.Test.strings.psd1
- Tests\QA\PublishExampleFiles.v4.Tests.ps1
- en-US\about_DscResource.Test.help.txt
- Tests\QA\ResourceSchema.common.v5.Tests.ps1
- Tests\QA\Localization.builtModule.v5.Tests.ps1
- Tests\QA\Changelog.common.v5.Tests.ps1
- Tests\QA\ModuleManifest.common.v5.Tests.ps1
- Tests\QA\Localization.common.v4.Tests.ps1
- Tests\QA\FileFormatting.common.v4.Tests.ps1
- Tests\QA\MarkdownLinks.common.v4.Tests.ps1
- Tests\QA\RelativePathLength.common.v4.Tests.ps1
- Tests\QA\ExampleFiles.common.v4.Tests.ps1
- Tests\QA\FileFormatting.common.v5.Tests.ps1
- Tests\QA\ExampleFiles.common.v5.Tests.ps1
- Tests\QA\Psm1Parsing.common.v4.Tests.ps1
- Modules\DscResource.Common\0.23.0\DscResource.Common.psm1
- Tests\QA\PSSAResource.common.v5.Tests.ps1
- Modules\DscResource.Common\0.23.0\DscResource.Common.psd1
- Tests\QA\MarkdownLinks.common.v5.Tests.ps1
- Modules\DscResource.Common\0.23.0\en-US\about_DscResource.Common.help.txt
- Tests\QA\RelativePathLength.common.v5.Tests.ps1
- Modules\DscResource.Common\0.23.0\en-US\DscResource.Common.strings.psd1
- Tests\QA\ScriptFiles.common.v4.Tests.ps1
- Modules\DscResource.Common\0.23.0\en-US\DscResource.Common-help.xml
Version History
| Version | Downloads | Last updated |
|---|---|---|
| 0.20.0 | 29,194 | 7/2/2026 |
| 0.20.0-previ... | 13 | 7/2/2026 |
| 0.20.0-previ... | 4,038 | 1/23/2026 |
| 0.19.0 | 58,145 | 1/23/2026 |
| 0.19.0-previ... | 130 | 1/17/2026 |
| 0.18.0 (current version) | 55,753 | 9/1/2025 |
| 0.18.0-previ... | 7 | 9/1/2025 |
| 0.18.0-previ... | 8 | 9/1/2025 |
| 0.18.0-previ... | 7 | 9/1/2025 |
| 0.18.0-previ... | 8 | 9/1/2025 |
| 0.18.0-previ... | 2,229 | 8/11/2025 |
| 0.18.0-previ... | 10 | 8/8/2025 |
| 0.17.2 | 60,954 | 2/28/2025 |
| 0.17.2-previ... | 5 | 2/28/2025 |
| 0.17.1 | 9,608 | 2/2/2025 |
| 0.17.1-previ... | 7 | 2/2/2025 |
| 0.17.0 | 3,213 | 1/25/2025 |
| 0.17.0-previ... | 6 | 1/25/2025 |
| 0.17.0-previ... | 3,718 | 11/25/2024 |
| 0.17.0-previ... | 58 | 11/24/2024 |
| 0.17.0-previ... | 1,938 | 10/10/2024 |
| 0.17.0-previ... | 29 | 10/9/2024 |
| 0.17.0-previ... | 6 | 10/9/2024 |
| 0.17.0-previ... | 472 | 9/29/2024 |
| 0.16.3 | 53,713 | 8/29/2024 |
| 0.16.3-previ... | 836 | 8/14/2024 |
| 0.16.3-previ... | 8 | 8/13/2024 |
| 0.16.2 | 234,944 | 5/18/2023 |
| 0.16.2-previ... | 77 | 5/17/2023 |
| 0.16.2-previ... | 6,016 | 8/1/2022 |
| 0.16.1 | 169,147 | 4/20/2022 |
| 0.16.1-previ... | 24 | 4/20/2022 |
| 0.16.1-previ... | 40 | 4/18/2022 |
| 0.16.0 | 129,781 | 9/11/2021 |
| 0.16.0-previ... | 25 | 9/11/2021 |
| 0.15.2 | 2,070 | 9/8/2021 |
| 0.15.2-previ... | 22 | 9/8/2021 |
| 0.15.2-previ... | 40 | 6/9/2021 |
| 0.15.1 | 63,133 | 3/29/2021 |
| 0.15.1-previ... | 25 | 3/29/2021 |
| 0.15.1-previ... | 30 | 2/14/2021 |
| 0.15.0 | 18,676 | 2/9/2021 |
| 0.15.0-previ... | 28 | 2/9/2021 |
| 0.15.0-previ... | 28 | 2/8/2021 |
| 0.15.0-previ... | 26 | 2/5/2021 |
| 0.14.3 | 9,562 | 1/13/2021 |
| 0.14.3-previ... | 27 | 1/13/2021 |
| 0.14.2 | 2,443 | 1/5/2021 |
| 0.14.2-previ... | 25 | 1/5/2021 |
| 0.14.1 | 29,444 | 11/12/2020 |
| 0.14.1-previ... | 31 | 10/21/2020 |
| 0.14.1-previ... | 29 | 8/16/2020 |
| 0.14.0 | 144,225 | 8/8/2020 |
| 0.14.0-previ... | 24 | 8/8/2020 |
| 0.13.3 | 109,994 | 6/1/2020 |
| 0.13.3-previ... | 23 | 6/1/2020 |
| 0.13.2 | 861 | 5/30/2020 |
| 0.13.2-previ... | 24 | 5/30/2020 |
| 0.13.1 | 27,380 | 5/15/2020 |
| 0.13.1-previ... | 25 | 5/15/2020 |
| 0.13.0 | 69,647 | 3/28/2020 |
| 0.13.0-previ... | 29 | 3/26/2020 |
| 0.13.0-previ... | 28 | 1/24/2020 |
| 0.12.1 | 253,754 | 1/16/2020 |
| 0.12.1-previ... | 28 | 1/16/2020 |
| 0.12.0 | 1,415 | 1/16/2020 |
| 0.12.0-previ... | 25 | 1/16/2020 |
| 0.12.0-previ... | 25 | 1/16/2020 |
| 0.11.1 | 69,907 | 1/6/2020 |
| 0.11.1-previ... | 26 | 1/6/2020 |
| 0.11.1-previ... | 27 | 1/6/2020 |
| 0.11.0 | 57,875 | 12/29/2019 |
| 0.11.0-previ... | 29 | 12/29/2019 |
| 0.11.0-previ... | 29 | 12/29/2019 |
| 0.11.0-previ... | 29 | 12/28/2019 |
| 0.11.0-previ... | 28 | 12/28/2019 |
| 0.10.1-previ... | 29 | 12/28/2019 |
| 0.10.0 | 8,909 | 12/28/2019 |
| 0.10.0-previ... | 29 | 12/28/2019 |
| 0.9.1-previe... | 28 | 12/28/2019 |
| 0.9.0 | 3,206 | 12/27/2019 |
| 0.9.0-previe... | 26 | 12/27/2019 |
| 0.8.1-previe... | 25 | 12/27/2019 |
| 0.8.1-previe... | 25 | 12/23/2019 |
| 0.8.1-previe... | 25 | 12/23/2019 |
| 0.8.1-previe... | 25 | 12/22/2019 |
| 0.8.0 | 135 | 12/21/2019 |
| 0.8.0-previe... | 26 | 12/21/2019 |
| 0.8.0-previe... | 26 | 12/21/2019 |
| 0.8.0-previe... | 26 | 12/21/2019 |
| 0.7.0 | 88 | 12/19/2019 |
| 0.7.0-previe... | 25 | 12/19/2019 |
| 0.6.0-previe... | 25 | 12/18/2019 |
| 0.5.4-previe... | 27 | 12/17/2019 |
| 0.5.3 | 104 | 12/16/2019 |
| 0.5.3-previe... | 30 | 12/16/2019 |
| 0.5.2 | 60 | 12/13/2019 |
| 0.5.2-previe... | 25 | 12/13/2019 |
| 0.5.1 | 33 | 12/13/2019 |
| 0.5.1-previe... | 25 | 12/13/2019 |
| 0.5.0 | 38 | 12/12/2019 |
| 0.5.0-previe... | 28 | 12/12/2019 |
| 0.4.3 | 90 | 12/4/2019 |
| 0.4.3-previe... | 25 | 12/4/2019 |
| 0.4.2 | 32 | 12/4/2019 |
| 0.4.2-previe... | 26 | 12/4/2019 |
| 0.4.1 | 35 | 12/4/2019 |
| 0.4.1-previe... | 25 | 12/4/2019 |
| 0.4.1-previe... | 27 | 12/4/2019 |
| 0.4.0 | 34 | 12/4/2019 |
| 0.4.0-previe... | 27 | 12/3/2019 |
| 0.3.1-previe... | 26 | 12/3/2019 |
| 0.3.0 | 49 | 12/2/2019 |
| 0.3.0-previe... | 26 | 12/2/2019 |
| 0.2.1-previe... | 28 | 12/2/2019 |
| 0.2.0 | 50 | 11/27/2019 |
| 0.2.0-previe... | 25 | 11/27/2019 |
| 0.2.0-previe... | 28 | 11/26/2019 |
| 0.2.0-previe... | 27 | 11/26/2019 |
| 0.2.0-previe... | 25 | 11/26/2019 |
| 0.2.0-previe... | 25 | 11/26/2019 |