DscResource.Test

0.18.0

Testing DSC Resources against HQRM guidelines

Minimum PowerShell version

5.0

Installation Options

Copy and Paste the following command to install this package using PowerShellGet More Info

Install-Module -Name DscResource.Test

Copy and Paste the following command to install this package using Microsoft.PowerShell.PSResourceGet More Info

Install-PSResource -Name DscResource.Test

You can deploy this package directly to Azure Automation. Note that deploying packages with dependencies will deploy all the dependencies to Azure Automation. Learn More

Manually download the .nupkg file to your system's default download location. Note that the file won't be unpacked, and won't include any dependencies. Learn More

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

Version History

Version Downloads Last updated
0.18.0 (current version) 2,402 9/1/2025
0.18.0-previ... 4 9/1/2025
0.18.0-previ... 4 9/1/2025
0.18.0-previ... 4 9/1/2025
0.18.0-previ... 4 9/1/2025
0.18.0-previ... 2,226 8/11/2025
0.18.0-previ... 6 8/8/2025
0.17.2 60,867 2/28/2025
0.17.2-previ... 4 2/28/2025
0.17.1 9,604 2/2/2025
0.17.1-previ... 4 2/2/2025
0.17.0 3,207 1/25/2025
0.17.0-previ... 4 1/25/2025
0.17.0-previ... 3,717 11/25/2024
0.17.0-previ... 56 11/24/2024
0.17.0-previ... 1,936 10/10/2024
0.17.0-previ... 26 10/9/2024
0.17.0-previ... 3 10/9/2024
0.17.0-previ... 469 9/29/2024
0.16.3 52,841 8/29/2024
0.16.3-previ... 833 8/14/2024
0.16.3-previ... 6 8/13/2024
0.16.2 234,908 5/18/2023
0.16.2-previ... 76 5/17/2023
0.16.2-previ... 6,011 8/1/2022
0.16.1 168,934 4/20/2022
0.16.1-previ... 17 4/20/2022
0.16.1-previ... 36 4/18/2022
0.16.0 129,753 9/11/2021
0.16.0-previ... 17 9/11/2021
0.15.2 2,058 9/8/2021
0.15.2-previ... 17 9/8/2021
0.15.2-previ... 35 6/9/2021
0.15.1 63,106 3/29/2021
0.15.1-previ... 18 3/29/2021
0.15.1-previ... 24 2/14/2021
0.15.0 18,666 2/9/2021
0.15.0-previ... 22 2/9/2021
0.15.0-previ... 22 2/8/2021
0.15.0-previ... 21 2/5/2021
0.14.3 9,529 1/13/2021
0.14.3-previ... 20 1/13/2021
0.14.2 2,432 1/5/2021
0.14.2-previ... 19 1/5/2021
0.14.1 29,425 11/12/2020
0.14.1-previ... 24 10/21/2020
0.14.1-previ... 24 8/16/2020
0.14.0 144,196 8/8/2020
0.14.0-previ... 18 8/8/2020
0.13.3 109,980 6/1/2020
0.13.3-previ... 18 6/1/2020
0.13.2 846 5/30/2020
0.13.2-previ... 18 5/30/2020
0.13.1 26,582 5/15/2020
0.13.1-previ... 18 5/15/2020
0.13.0 69,634 3/28/2020
0.13.0-previ... 20 3/26/2020
0.13.0-previ... 21 1/24/2020
0.12.1 253,737 1/16/2020
0.12.1-previ... 20 1/16/2020
0.12.0 1,394 1/16/2020
0.12.0-previ... 20 1/16/2020
0.12.0-previ... 20 1/16/2020
0.11.1 69,893 1/6/2020
0.11.1-previ... 21 1/6/2020
0.11.1-previ... 21 1/6/2020
0.11.0 57,854 12/29/2019
0.11.0-previ... 24 12/29/2019
0.11.0-previ... 22 12/29/2019
0.11.0-previ... 22 12/28/2019
0.11.0-previ... 22 12/28/2019
0.10.1-previ... 22 12/28/2019
0.10.0 8,889 12/28/2019
0.10.0-previ... 23 12/28/2019
0.9.1-previe... 22 12/28/2019
0.9.0 3,161 12/27/2019
0.9.0-previe... 21 12/27/2019
0.8.1-previe... 20 12/27/2019
0.8.1-previe... 20 12/23/2019
0.8.1-previe... 20 12/23/2019
0.8.1-previe... 20 12/22/2019
0.8.0 125 12/21/2019
0.8.0-previe... 20 12/21/2019
0.8.0-previe... 20 12/21/2019
0.8.0-previe... 20 12/21/2019
0.7.0 78 12/19/2019
0.7.0-previe... 20 12/19/2019
0.6.0-previe... 20 12/18/2019
0.5.4-previe... 20 12/17/2019
0.5.3 95 12/16/2019
0.5.3-previe... 21 12/16/2019
0.5.2 54 12/13/2019
0.5.2-previe... 20 12/13/2019
0.5.1 27 12/13/2019
0.5.1-previe... 20 12/13/2019
0.5.0 30 12/12/2019
0.5.0-previe... 21 12/12/2019
0.4.3 85 12/4/2019
0.4.3-previe... 20 12/4/2019
0.4.2 27 12/4/2019
0.4.2-previe... 21 12/4/2019
0.4.1 27 12/4/2019
0.4.1-previe... 20 12/4/2019
0.4.1-previe... 20 12/4/2019
0.4.0 26 12/4/2019
0.4.0-previe... 21 12/3/2019
0.3.1-previe... 20 12/3/2019
0.3.0 27 12/2/2019
0.3.0-previe... 21 12/2/2019
0.2.1-previe... 20 12/2/2019
0.2.0 25 11/27/2019
0.2.0-previe... 19 11/27/2019
0.2.0-previe... 20 11/26/2019
0.2.0-previe... 20 11/26/2019
0.2.0-previe... 20 11/26/2019
0.2.0-previe... 20 11/26/2019
Show more