{"id":20156218,"url":"https://github.com/dsccommunity/dscresource.test","last_synced_at":"2025-04-09T22:23:23.016Z","repository":{"id":36480442,"uuid":"223096464","full_name":"dsccommunity/DscResource.Test","owner":"dsccommunity","description":"Module to test your Projects against the HQRM guidelines","archived":false,"fork":false,"pushed_at":"2025-02-28T09:35:23.000Z","size":672,"stargazers_count":5,"open_issues_count":11,"forks_count":8,"subscribers_count":4,"default_branch":"main","last_synced_at":"2025-03-24T00:16:37.403Z","etag":null,"topics":[],"latest_commit_sha":null,"homepage":null,"language":"PowerShell","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"mit","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/dsccommunity.png","metadata":{"files":{"readme":"README.md","changelog":"CHANGELOG.md","contributing":"CONTRIBUTING.md","funding":null,"license":"LICENSE","code_of_conduct":"CODE_OF_CONDUCT.md","threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":"SECURITY.md","support":null,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null}},"created_at":"2019-11-21T05:37:23.000Z","updated_at":"2025-02-28T09:35:23.000Z","dependencies_parsed_at":"2024-08-13T22:07:36.715Z","dependency_job_id":"a3dda150-300c-42ce-b846-8dd4dee5a200","html_url":"https://github.com/dsccommunity/DscResource.Test","commit_stats":null,"previous_names":[],"tags_count":113,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/dsccommunity%2FDscResource.Test","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/dsccommunity%2FDscResource.Test/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/dsccommunity%2FDscResource.Test/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/dsccommunity%2FDscResource.Test/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/dsccommunity","download_url":"https://codeload.github.com/dsccommunity/DscResource.Test/tar.gz/refs/heads/main","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":248120892,"owners_count":21051043,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":[],"created_at":"2024-11-13T23:38:05.282Z","updated_at":"2025-04-09T22:23:22.994Z","avatar_url":"https://github.com/dsccommunity.png","language":"PowerShell","funding_links":[],"categories":[],"sub_categories":[],"readme":"# DscResource.Test\n\nThis module contains tasks and the HQRM (High Quality Resource Module) tests for the PowerShell DSC Community's DSC resources. This is a PowerShell module designed to help testing your projects against HQRM guidelines.\n\n[![Build Status](https://dev.azure.com/dsccommunity/DscResource.Test/_apis/build/status/dsccommunity.DscResource.Test?branchName=main)](https://dev.azure.com/dsccommunity/DscResource.Test/_build/latest?definitionId=3\u0026branchName=main)\n![Azure DevOps coverage (branch)](https://img.shields.io/azure-devops/coverage/dsccommunity/DscResource.Test/3/main)\n[![codecov](https://codecov.io/gh/dsccommunity/DscResource.Test/branch/main/graph/badge.svg)](https://codecov.io/gh/dsccommunity/DscResource.Test)\n[![Azure DevOps tests](https://img.shields.io/azure-devops/tests/dsccommunity/DscResource.Test/3/main)](https://dsccommunity.visualstudio.com/DscResource.Test/_test/analytics?definitionId=3\u0026contextType=build)\n[![PowerShell Gallery (with prereleases)](https://img.shields.io/powershellgallery/vpre/DscResource.Test?label=DscResource.Test%20Preview)](https://www.powershellgallery.com/packages/DscResource.Test/)\n[![PowerShell Gallery](https://img.shields.io/powershellgallery/v/DscResource.Test?label=DscResource.Test)](https://www.powershellgallery.com/packages/DscResource.Test/)\n\n## Code of Conduct\n\nThis project has adopted this [Code of Conduct](CODE_OF_CONDUCT.md).\n\n## Releases\n\nFor each merge to the branch `main` a preview release will be\ndeployed to [PowerShell Gallery](https://www.powershellgallery.com/).\nPeriodically a release version tag will be pushed which will deploy a\nfull release to [PowerShell Gallery](https://www.powershellgallery.com/).\n\n## Contributing\n\nPlease check out common DSC Community [contributing guidelines](https://dsccommunity.org/guidelines/contributing).\n\n## Change log\n\nA full list of changes in each version can be found in the [change log](CHANGELOG.md).\n\n## Usage\n\nAlthough this module is best used as part of the Sampler template pipeline\nautomation, you can also use this in a standalone or custom way.\n\nYou can run the tests against the source of your project or against a built module.  \nThe format expected for your project follows [the Sampler](https://github.com/gaelcolas/Sampler)\ntemplate (basically the source code in a source/src/ModuleName folder, and\na built version in the output folder).\n\nInstall the module from the PowerShell Gallery:\n\n```PowerShell\nInstall-Module DscResource.test\n```\n\nExecute against a Built module:\n\n```PowerShell\nInvoke-DscResourceTest -Module UpdateServicesDsc\n```\n\n## Dependencies\n\nThis module depends on:\n\n- **Pester**: This is a collection of generic Pester tests to run against your built\nmodule or source code.\n- **PSScriptAnalyzer**: Some tests are just validating you comply with some of the\nguidances set in PSSA rules and with custom rules.\n- **DscResource.AnalyzerRules**: This is the custom rules we've created to enforce\na standard across the DscResource module we look after as a community.\n- **xDscResourceDesigner**: Because it offers MOF and DSC Resource testing capabilities.\n\n### Contributing\n\nThe [Contributing guidelines can be found here](CONTRIBUTING.md).\n\nThis project has continuous testing running on Windows, MacOS, Linux, with both\nWindows PowerShell 5.1 and the PowerShell version available on the Azure DevOps\nagents.\n\nQuick Start:\n\n```PowerShell\nPS C:\\src\\\u003e git clone git@github.com:dsccommunity/DscResource.Test.git\nPS C:\\src\\\u003e cd DscResource.Test\nPS C:\\src\\DscResource.Test\u003e build.ps1 -ResolveDependency\n# this will first bootstrap the environment by downloading dependencies required\n# then run the '.' task workflow as defined in build.yml\n```\n\n## Cmdlets\n\u003c!-- markdownlint-disable MD036 - Emphasis used instead of a heading --\u003e\n\nRefer to the comment-based help for more information about these helper\nfunctions.\n\n### `Clear-DscLcmConfiguration`\n\nClear the DSC LCM by performing the following functions:\n\n1. Cancel any currently executing DSC LCM operations\n1. Remove any DSC configurations that:\n    - are currently applied\n    - are pending application\n    - have been previously applied\n\nThe purpose of this function is to ensure the DSC LCM is in a known\nand idle state before an integration test is performed that will\napply a configuration.\n\nThis is to prevent an integration test from being performed but failing\nbecause the DSC LCM is applying a previous configuration.\n\nThis function should be called after each Describe block in an integration\ntest to ensure the DSC LCM is reset before another test DSC configuration\nis applied.\n\n#### Syntax\n\n\u003c!-- markdownlint-disable MD013 - Line length --\u003e\n```plaintext\nClear-DscLcmConfiguration [\u003cCommonParameters\u003e]\n```\n\u003c!-- markdownlint-enable MD013 - Line length --\u003e\n\n#### Outputs\n\nNone.\n\n#### Example\n\n```powershell\nClear-DscLcmConfiguration\n```\n\nThis command will Stop the DSC LCM and clear out any DSC configurations.\n\n### `Get-DscResourceTestContainer`\n\nThis command will return a container for each available HQRM test script.\n\n#### Syntax\n\n\u003c!-- markdownlint-disable MD013 - Line length --\u003e\n```plaintext\nGet-DscResourceTestContainer [-ProjectPath] \u003cstring\u003e [-ModuleName] \u003cstring\u003e \n  [-DefaultBranch] \u003cstring\u003e [-SourcePath] \u003cstring\u003e [[-ExcludeSourceFile] \u003cstring[]\u003e] \n  [-ModuleBase] \u003cstring\u003e [[-ExcludeModuleFile] \u003cstring[]\u003e] [\u003cCommonParameters\u003e]\n```\n\u003c!-- markdownlint-enable MD013 - Line length --\u003e\n\n#### Outputs\n\n**Pester.ContainerInfo[]**\n\n#### Example\n\n```powershell\n$getDscResourceTestContainersParameters = @{\n    ProjectPath       = '.'\n    ModuleName        = 'MyDscResourceName'\n    DefaultBranch     = 'main'\n    SourcePath        = './source'\n    ExcludeSourceFile = @('Examples')\n    ModuleBase        = \"./output/MyDscResourceName/*\"\n    ExcludeModuleFile = @('Modules/DscResource.Common')\n}\n\n$container = Get-DscResourceTestContainer @getDscResourceTestContainersParameters\n\nInvoke-Pester -Container $container -Output Detailed\n```\n\nReturns a container for each available HQRM test script using the provided\nvalues as script parameters. Then Pester is invoked on the containers.\n\n### `Get-InvalidArgumentRecord`\n\nReturns an invalid argument exception object.\n\n#### Syntax\n\n\u003c!-- markdownlint-disable MD013 - Line length --\u003e\n```plaintext\nGet-InvalidArgumentRecord [-Message] \u003cstring\u003e [-ArgumentName] \u003cstring\u003e [\u003cCommonParameters\u003e]\n```\n\u003c!-- markdownlint-enable MD013 - Line length --\u003e\n\n#### Outputs\n\n**System.Object**\n\n#### Example\n\n```powershell\n$errorRecord = Get-InvalidArgumentRecord `\n    -Message ($script:localizedData.InterfaceNotAvailableError -f $interfaceAlias) `\n    -ArgumentName 'Interface'\n```\n\nThis will return an error record with the localized string as the exception\nmessage.\n\n### `Get-InvalidResultRecord`\n\nReturns an invalid result exception object.\n\n#### Syntax\n\n\u003c!-- markdownlint-disable MD013 - Line length --\u003e\n```plaintext\nGet-InvalidResultRecord [-Message] \u003cstring\u003e [[-ErrorRecord] \u003cErrorRecord\u003e] [\u003cCommonParameters\u003e]\n```\n\u003c!-- markdownlint-enable MD013 - Line length --\u003e\n\n#### Outputs\n\n**System.Object**\n\n#### Example\n\n```powershell\n$mockErrorRecord = Get-InvalidResultRecord -Message (\n    $script:localizedData.FailedToGetAllFromName -f $name\n)\n```\n\nThis will return an error record with the localized string as the exception\nmessage.\n\n```powershell\ntry\n{\n    # Something that tries to return an expected result.\n}\ncatch\n{\n    $mockErrorRecord = Get-InvalidResultRecord -ErrorRecord $_ -Message (\n        $script:localizedData.FailedToGetAllFromName -f $name\n    )\n}\n```\n\nThis will return an error record. The exception message will be concatenated\nto include both the localized string and all the inner exceptions messages\nfrom error record that was passed from the `catch`-block.\n\n### `Get-InvalidResultRecord`\n\nReturns an invalid result exception object.\n\n#### Syntax\n\n\u003c!-- markdownlint-disable MD013 - Line length --\u003e\n```plaintext\nGet-InvalidResultRecord [-Message] \u003cstring\u003e [[-ErrorRecord] \u003cErrorRecord\u003e] [\u003cCommonParameters\u003e]\n```\n\u003c!-- markdownlint-enable MD013 - Line length --\u003e\n\n#### Outputs\n\n**System.Object**\n\n#### Example\n\n```powershell\n$mockErrorRecord = Get-InvalidResultRecord -Message (\n    $script:localizedData.FailedToGetAllFromName -f $name\n)\n```\n\nThis will return an error record with the localized string as the exception\nmessage.\n\n```powershell\ntry\n{\n    # Something that tries to return an expected result.\n}\ncatch\n{\n    $mockErrorRecord = Get-InvalidResultRecord -ErrorRecord $_ -Message (\n        $script:localizedData.FailedToGetAllFromName -f $name\n    )\n}\n```\n\nThis will return an error record. The exception message will be concatenated\nto include both the localized string and all the inner exceptions messages\nfrom error record that was passed from the `catch`-block.\n\n### `Get-ObjectNotFoundRecord`\n\nReturns an invalid result exception object.\n\n#### Syntax\n\n\u003c!-- markdownlint-disable MD013 - Line length --\u003e\n```plaintext\nGet-ObjectNotFoundRecord [-Message] \u003cstring\u003e [[-ErrorRecord] \u003cErrorRecord\u003e] [\u003cCommonParameters\u003e]\n```\n\u003c!-- markdownlint-enable MD013 - Line length --\u003e\n\n#### Outputs\n\n**System.Object**\n\n#### Example\n\n```powershell\n$mockErrorRecord = Get-ObjectNotFoundRecord -Message (\n    $script:localizedData.FailedToGetAllFromName -f $name\n)\n```\n\nThis will return an error record with the localized string as the exception\nmessage.\n\n```powershell\ntry\n{\n    # Something that tries to return an expected result.\n}\ncatch\n{\n    $mockErrorRecord = Get-ObjectNotFoundRecord -ErrorRecord $_ -Message (\n        $script:localizedData.FailedToGetAllFromName -f $name\n    )\n}\n```\n\nThis will return an error record. The exception message will be concatenated\nto include both the localized string and all the inner exceptions messages\nfrom error record that was passed from the `catch`-block.\n\n### `Initialize-TestEnvironment`\n\nInitializes an environment for running unit or integration tests\non a DSC resource.\n\nThis includes:\n\n1. Updates the $env:PSModulePath to ensure the correct module is tested.\n1. Imports the module to test.\n1. Sets the PowerShell ExecutionMode to Unrestricted.\n1. returns a test environment object to store the settings.\n\nThe above changes are reverted by calling the Restore-TestEnvironment\nfunction with the returned object.\n\nReturns a test environment object which must be passed to the\nRestore-TestEnvironment function to allow it to restore the system\nback to the original state.\n\n#### Syntax\n\n\u003c!-- markdownlint-disable MD013 - Line length --\u003e\n```plaintext\nInitialize-TestEnvironment [-Module] \u003cstring\u003e [-DscResourceName] \u003cstring\u003e \n  [-TestType] {Unit | Integration | All} [[-ResourceType] {Mof | Class}]\n  [[-ProcessExecutionPolicy] {AllSigned | Bypass | RemoteSigned | Unrestricted}] \n  [[-MachineExecutionPolicy] {AllSigned | Bypass | RemoteSigned | Unrestricted}] \n  [\u003cCommonParameters\u003e]\n```\n\u003c!-- markdownlint-enable MD013 - Line length --\u003e\n\n#### Outputs\n\n**System.Collections.Hashtable**\n\n#### Example\n\n```powershell\n$script:testEnvironment = Initialize-TestEnvironment `\n    -DSCModuleName 'NetworkingDsc' `\n    -DSCResourceName 'DSC_Firewall' `\n    -ResourceType 'Mof' `\n    -TestType 'Unit'\n```\n\nThis command will initialize the test environment for Unit testing\nthe DSC_Firewall MOF-based DSC resource in the NetworkingDsc DSC resource\nmodule.\n\n```powershell\n$script:testEnvironment = Initialize-TestEnvironment `\n    -DSCModuleName 'NetworkingDsc' `\n    -DSCResourceName 'DSC_Firewall' `\n    -ResourceType 'Class' `\n    -TestType 'Unit'\n```\n\nThis command will initialize the test environment for Unit testing\nthe DSC_Firewall Class-based DSC resource in the NetworkingDsc DSC resource'\nmodule.\n\n```powershell\n$script:testEnvironment = Initialize-TestEnvironment `\n    -DSCModuleName 'NetworkingDsc' `\n    -DSCResourceName 'DSC_Firewall' `\n    -ResourceType 'Class' `\n    -TestType 'Integration'\n```\n\nThis command will initialize the test environment for Integration testing\nthe DSC_Firewall DSC resource in the NetworkingDsc DSC resource module.\n\n### `Invoke-DscResourceTest`\n\nThis cmdlet behaves differently between Pester 4 and Pester 5. For Pester 5\nthe cmdlet has been made so that it can run on any module by providing\nthe correct paths. When only Pester 4 is available it is limited to the\npattern of the [Sampler](https://github.com/gaelcolas/Sampler) project.\n\n#### Using Pester 4\n\nWrapper for Invoke-Pester. It is used primarily by the pipeline and can\nbe used to run test by providing a project path, module specification,\nby module name, or path.\n\n#### Pester 5\n\nWrapper for Invoke-Pester's Simple parameter set. It can be used to run\nall the HQRM test with a single command. Only the parameter set `Pester5`\nis supported, the first parameter set in the section _Syntax_ below.\nMandatory parameters are those necessary to run the test scripts.\n\n#### Syntax\n\n\u003c!-- markdownlint-disable MD013 - Line length --\u003e\n```plaintext\nInvoke-DscResourceTest -ProjectPath \u003cstring\u003e -MainGitBranch \u003cstring\u003e \n  -ModuleName \u003cstring\u003e -SourcePath \u003cstring\u003e -ModuleBase \u003cstring\u003e \n  [-TagFilter \u003cstring[]\u003e] [-ExcludeTagFilter \u003cstring[]\u003e] \n  [-ExcludeModuleFile \u003cstring[]\u003e] [-ExcludeSourceFile \u003cstring[]\u003e] \n  [-PassThru] [-Output \u003cstring\u003e] [\u003cCommonParameters\u003e]\n\nInvoke-DscResourceTest [[-ProjectPath] \u003cstring\u003e] [[-Path] \u003cObject[]\u003e] [[-TestName] \u003cstring[]\u003e]\n  [[-EnableExit]] [[-TagFilter] \u003cstring[]\u003e] [-ExcludeTagFilter \u003cstring[]\u003e] [-ExcludeModuleFile \u003cstring[]\u003e]\n  [-ExcludeSourceFile \u003cstring[]\u003e] [-PassThru] [-CodeCoverage \u003cObject[]\u003e] [-CodeCoverageOutputFile \u003cstring\u003e]\n  [-CodeCoverageOutputFileFormat {JaCoCo}] [-Strict] [-Output \u003cstring\u003e] [-OutputFile \u003cstring\u003e] \n  [-OutputFormat {NUnitXml | JUnitXml}] [-Quiet] [-PesterOption \u003cObject\u003e]\n  [-Show {None | Default | Passed | Failed | Pending | Skipped | Inconclusive | Describe | Context | Summary | Header | Fails | All}]\n  [-Settings \u003chashtable\u003e] [-MainGitBranch \u003cstring\u003e] [\u003cCommonParameters\u003e]\n\nInvoke-DscResourceTest [[-Module] \u003cstring\u003e] [[-Path] \u003cObject[]\u003e] [[-TestName] \u003cstring[]\u003e] \n  [[-EnableExit]] [[-TagFilter] \u003cstring[]\u003e] [-ExcludeTagFilter \u003cstring[]\u003e] [-ExcludeModuleFile \u003cstring[]\u003e]\n  [-ExcludeSourceFile \u003cstring[]\u003e] [-PassThru] [-CodeCoverage \u003cObject[]\u003e] [-CodeCoverageOutputFile \u003cstring\u003e]\n  [-CodeCoverageOutputFileFormat {JaCoCo}] [-Strict] [-Output \u003cstring\u003e] [-OutputFile \u003cstring\u003e]\n  [-OutputFormat {NUnitXml | JUnitXml}] [-Quiet] [-PesterOption \u003cObject\u003e]\n  [-Show {None | Default | Passed | Failed | Pending | Skipped | Inconclusive | Describe | Context | Summary | Header | Fails | All}]\n  [-Settings \u003chashtable\u003e] [-MainGitBranch \u003cstring\u003e] [\u003cCommonParameters\u003e]\n\nInvoke-DscResourceTest [[-FullyQualifiedModule] \u003cModuleSpecification\u003e] [[-Path] \u003cObject[]\u003e]\n  [[-TestName] \u003cstring[]\u003e] [[-EnableExit]] [[-TagFilter] \u003cstring[]\u003e] [-ExcludeTagFilter \u003cstring[]\u003e]\n  [-ExcludeModuleFile \u003cstring[]\u003e] [-ExcludeSourceFile \u003cstring[]\u003e] [-PassThru] [-CodeCoverage \u003cObject[]\u003e]\n  [-CodeCoverageOutputFile \u003cstring\u003e] [-CodeCoverageOutputFileFormat {JaCoCo}] [-Strict] [-Output \u003cstring\u003e]\n  [-OutputFile \u003cstring\u003e] [-OutputFormat {NUnitXml | JUnitXml}] [-Quiet] [-PesterOption \u003cObject\u003e]\n  [-Show {None | Default | Passed | Failed | Pending | Skipped | Inconclusive | Describe | Context | Summary | Header | Fails | All}]\n  [-Settings \u003chashtable\u003e] [-MainGitBranch \u003cstring\u003e] [\u003cCommonParameters\u003e]\n```\n\u003c!-- markdownlint-enable MD013 - Line length --\u003e\n\n#### Outputs\n\n**System.Object**\n\n#### Example\n\n```powershell\n$invokeDscResourceTestParameters = @{\n    # Test script parameters\n    ProjectPath       = '.'\n    ModuleName        = 'SqlServerDsc'\n    MainGitBranch     = 'main'\n    SourcePath        = './source'\n    ModuleBase        = \"./output/SqlServerDsc/*\"\n}\n\nInvoke-DscResourceTest @invokeDscResourceTestParameters\n```\n\nThis passes all mandatory parameters to `Invoke-DscResourceTest` which\nrun all the HQRM tests. This will only output minimal information, by using\nthe default value for `Invoke-Pester`'s `Output` parameter.\n\n```powershell\n$invokeDscResourceTestParameters = @{\n    # Test script parameters\n    ProjectPath       = '.'\n    ModuleName        = 'SqlServerDsc'\n    MainGitBranch     = 'main'\n    SourcePath        = './source'\n    ExcludeSourceFile = @('Examples')\n    ModuleBase        = \"./output/SqlServerDsc/*\"\n    ExcludeModuleFile = @('Modules/DscResource.Common')\n\n    # Invoke-Pester parameters\n    Output            = 'Detailed'\n    ExcludeTagFilter  = 'Common Tests - New Error-Level Script Analyzer Rules'\n    PassThru          = $true\n}\n\n$testResult = Invoke-DscResourceTest @invokeDscResourceTestParameters\n```\n\nThis run all the HQRM tests except the tests tagged with\n`'Common Tests - New Error-Level Script Analyzer Rules'` and also outputs\ndetails of every tests as it runs.\n\n### `New-DscSelfSignedCertificate`\n\nThis command will create a new self-signed certificate to be used to\ncompile configurations.\n\n#### Syntax\n\n\u003c!-- markdownlint-disable MD013 - Line length --\u003e\n```plaintext\nNew-DscSelfSignedCertificate [\u003cCommonParameters\u003e]\n```\n\u003c!-- markdownlint-enable MD013 - Line length --\u003e\n\n#### Outputs\n\nReturns the created certificate. Writes the path to the public\ncertificate in the machine environment variable $env:DscPublicCertificatePath,\nand the certificate thumbprint in the machine environment variable\n$env:DscCertificateThumbprint.\n\n#### Example\n\n```powershell\n$certificate = New-DscSelfSignedCertificate\n```\n\nThis command will create and return a new self-signed certificate to be\nused to compile configurations. The command will write the path to the\npublic certificate in the machine environment variable `$env:DscPublicCertificatePath`,\nand the certificate thumbprint in the machine environment variable\n`$env:DscCertificateThumbprint`.\n\nIf a certificate with subject 'DscEncryptionCert' already exists, that\ncertificate will be returned instead of creating a new. The command will\nassume that the existing certificate was created with the same command.\n\n### `Restore-TestEnvironment`\n\nRestores the environment after running unit or integration tests\non a DSC resource.\n\nThis restores the following changes made by calling\nInitialize-TestEnvironment:\n\n1. Restores the $env:PSModulePath if it was changed.\n1. Restores the PowerShell execution policy.\n1. Resets the DSC LCM if running Integration tests.\n\n#### Syntax\n\n\u003c!-- markdownlint-disable MD013 - Line length --\u003e\n```plaintext\nRestore-TestEnvironment [-TestEnvironment] \u003chashtable\u003e [\u003cCommonParameters\u003e]\n```\n\u003c!-- markdownlint-enable MD013 - Line length --\u003e\n\n#### Outputs\n\nNone.\n\n#### Example\n\n```powershell\nRestore-TestEnvironment -TestEnvironment $script:testEnvironment\n```\n\nThis will restore the test environment and use the values that is provided\nin the hashtable passed to the command. The hasttable that is passed should\nhave been created by `Initialize-TestEnvironment`.\n\n### `Wait-ForIdleLcm`\n\nWaits for LCM to become idle and optionally clears the LCM by running\n`Clear-DscLcmConfiguration`.\n\nIt is meant to be used in integration test where integration tests run to\nquickly before LCM have time to cool down.\n\nIt will return if the LCM state is other than 'Busy'. The other states are\n'Idle', 'PendingConfiguration', or 'PendingReboot'.\n\n#### Syntax\n\n\u003c!-- markdownlint-disable MD013 - Line length --\u003e\n```plaintext\nWait-ForIdleLcm [[-Timeout] \u003ctimespan\u003e] [-Clear] [\u003cCommonParameters\u003e]\n```\n\u003c!-- markdownlint-enable MD013 - Line length --\u003e\n\n#### Outputs\n\nNone.\n\n#### Example\n\n```powershell\nWait-ForIdleLcm -Clear\n```\n\nThis will wait for the LCM to return from busy state and then clear the LCM.\n\n```powershell\nWait-ForIdleLcm -Clear -Timeout '00:00:08'\n```\n\nThis will wait for the LCM to return from busy state. If the LCM has not\nreturned from busy state within the elapsed time specified in the parameter\n`Timeout` then it will stop waiting and clear the LCM.\n\n## Tasks\n\nThese are `Invoke-Build` tasks. The build tasks are primarily meant to be\nrun by the project [Sampler's](https://github.com/gaelcolas/Sampler)\n`build.ps1` which wraps `Invoke-Build` and has the configuration file\n(`build.yaml`) to control its behavior.\n\nTo make the tasks available for the cmdlet `Invoke-Build` in a repository\nthat is based on the [Sampler](https://github.com/gaelcolas/Sampler) project,\nadd this module to the file `RequiredModules.psd1` and then in the file\n`build.yaml` add the following:\n\n```yaml\nModuleBuildTasks:\n  DscResource.Test:\n    - 'Task.*'\n```\n\n### `Invoke_HQRM_Tests`\n\nThis build task runs the High Quality Resource Module (HQRM) tests located\nin the folder `Tests/QA` in the module _DscResource.Test_'s root. This build\ntask is normally not used on its own. It is meant to run through the meta task\n[`Invoke_HQRM_Tests_Stop_On_Fail`](#invoke-hqrm-tests-stop-on-fail).\n\nBelow is an example how the build task can be used when a repository is\nbased on the [Sampler](https://github.com/gaelcolas/Sampler) project.\n\n```yaml\nBuildWorkflow:\n  '.':\n    - build\n\n  hqrmtest:\n    - Invoke_HQRM_Tests\n```\n\nThe build configuration (build.yaml) can be used to control the behavior\nof the build task. Everything under the key `DscTest:` controls the behavior.\nThere are two sections `Pester` and `Script`.\n\n#### Section Pester\n\nThe section Pester control the behavior of `Invoke-Pester` that is run\nthrough the build task. There are two different ways of configuring this,\nthey can be combined but it is limited to the parameter sets of `Invoke-Pester`,\nsee the command syntax in the [`Invoke-Pester` documentation](https://pester.dev/docs/commands/Invoke-Pester).\n\n##### Passing parameters to Pester\n\nAny parameter that `Invoke-Pester` takes is valid to use as key in the\nbuild configuration. The exception is `Container`, it is handled by the\nbuild task to pass parameters to the scripts correctly (see [Section Script](#section-script)).\nAlso the parameter `Path` can only point to test files that do not need\nany script parameters passed to them to run.\n\n\u003e**NOTE:** A key that does not have a value will be ignored.\n\n```yaml\nDscTest:\n  Pester:\n    Path:\n    ExcludePath:\n    TagFilter:\n    FullNameFilter:\n    ExcludeTagFilter:\n      - Common Tests - New Error-Level Script Analyzer Rules\n    Output: Detailed\n```\n\nImportant to note that if the key `Configuration` is present it limits\nwhat other parameters that can be passed to `Invoke-Pester` due to the\nparameter set that is then used. But the key `Configuration` gives more\ncontrol over the behavior of `Invoke-Pester`. For more information what \ncan be configured see the [sections of the `[PesterConfiguration]` object](https://pester.dev/docs/commands/Invoke-Pester#-configuration).\n\nUnder the key `Configuration` any section name in the `[PesterConfiguration]`\nobject is valid to use as key. Any new sections or properties that will be\nadded in future version of Pester will also be valid (as long as they follow\nthe same pattern).\n\n```plaintext\nPS \u003e [PesterConfiguration]::Default\nRun          : Run configuration.\nFilter       : Filter configuration\nCodeCoverage : CodeCoverage configuration.\nTestResult   : TestResult configuration.\nShould       : Should configuration.\nDebug        : Debug configuration for Pester. ⚠ Use at your own risk!\nOutput       : Output configuration\n```\n\nThis shows how to use the advanced configuration option to exclude tags\nand change the output verbosity. The keys `Filter:` and `Output:` are the\nsection names from the list above, and the keys `ExcludeTag` and `Verbosity`\nare properties in the respective section in the `[PesterConfiguration]`\nobject.\n\n\u003e**NOTE:** A key that does not have a value will be ignored.\n\n```yaml\nDscTest:\n  Pester:\n    Configuration:\n      Filter:\n        Tag:\n        ExcludeTag:\n          - Common Tests - New Error-Level Script Analyzer Rules\n      Output:\n        Verbosity: Detailed\n```\n\n#### Section Script\n\n##### Passing parameters to test scripts\n\nThe key `Script:` is used to define values to pass to parameters in the\ntest scripts. Each key defined under the key `Script:` is a parameter that\ncan be used in one or more test script.\n\nSee the section [Tests](#tests) for the parameters that can be defined here\nto control the behavior of the tests.\n\n\u003e**NOTE:** The test scripts only used the parameters that is required and\n\u003eignore any other that is defined. If there are tests added that need a\n\u003edifferent parameter name, that name can be defined under the key `Script:`\n\u003eand will be passed to the test that require it without any change to the\n\u003ebuild task.\n\nThis defines three parameters `ExcludeSourceFile`, `ExcludeModuleFile`,\nand `MainGitBranch` and their corresponding values.\n\n```yaml\nDscTest:\n  Script:\n    ExcludeSourceFile:\n      - output\n      - source/DSCResources/DSC_ObsoleteResource1\n      - DSC_ObsoleteResource2\n    ExcludeModuleFile:\n      - Modules/DscResource.Common\n    MainGitBranch: main\n```\n\n### `Fail_Build_If_HQRM_Tests_Failed`\n\nThis build task evaluates that there was no failed tests when the task\n`Invoke_HQRM_Tests` ran. This build task is normally not used on its own.\nIt is meant to run through the meta task [`Invoke_HQRM_Tests_Stop_On_Fail`](#invoke_hqrm_tests_stop_on_fail).\n\nBelow is an example how the build task can be used when a repository is\nbased on the [Sampler](https://github.com/gaelcolas/Sampler) project.\n\n```yaml\nBuildWorkflow:\n  '.':\n    - build\n\n  hqrmtest:\n    - Invoke_HQRM_Tests\n    - Fail_Build_If_HQRM_Tests_Failed\n```\n\n### `Invoke_HQRM_Tests_Stop_On_Fail`\n\nThis is a meta task meant to be used in the build configuration to run\ntests in the correct order to fail the test pipeline if there are any\nfailed test.\n\nThe order this meta task is running tasks:\n\n- Invoke_HQRM_Tests\n- Fail_Build_If_HQRM_Tests_Failed\n\nBelow is an example how the build task can be used when a repository is\nbased on the [Sampler](https://github.com/gaelcolas/Sampler) project.\n\n```yaml\nBuildWorkflow:\n  '.':\n    - build\n\n  hqrmtest:\n    - Invoke_HQRM_Tests_Stop_On_Fail\n```\n\n\n## Tests\n\nThis is the documentation for the Pester 5 tests. \n\n### Changelog.common\n\n#### Parameters\n\n\u003c!-- markdownlint-disable MD013 - Line length --\u003e\n```plaintext\n[-ProjectPath] \u003cString\u003e [-MainGitBranch] \u003cString\u003e [[-Args] \u003cObject\u003e] [\u003cCommonParameters\u003e]\n```\n\u003c!-- markdownlint-enable MD013 - Line length --\u003e\n\n##### MainGitBranch\n\nThe name of the default branch of the Git upstream repository.\n\n##### ProjectPath\n\nThe path to the root of the project, for example the root of the local\nGit repository.\n\nIf using the build task the default value for this parameter will be set\nto the value that comes from the pipeline.\n\n```powershell\n$defaultBranch = 'main'\n$pathToHQRMTests = Join-Path -Path (Get-Module DscResource.Test).ModuleBase -ChildPath 'Tests\\QA'\n\n$container = New-PesterContainer -Path \"$pathToHQRMTests/Changelog.common.*.Tests.ps1\" -Data @{\n    ProjectPath = '.'\n    MainGitBranch = $defaultBranch\n}\n\nInvoke-Pester -Container $container -Output Detailed\n```\n\n### ExampleFiles.common\n\n#### Parameters\n\n\u003c!-- markdownlint-disable MD013 - Line length --\u003e\n```plaintext\n[-SourcePath] \u003cString\u003e [[-ExcludeSourceFile] \u003cString[]\u003e] [[-Args] \u003cObject\u003e] [\u003cCommonParameters\u003e]\n```\n\u003c!-- markdownlint-enable MD013 - Line length --\u003e\n\n##### ExcludeSourceFile\n\nAny path or part of a path that will be excluded from the list of files\ngathered by the test. Default no files will be excluded from the test.\n\n##### SourcePath\n\nThe path to the source folder of the project, e.g. `./source`.\n\nIf using the build task the default value for this parameter will be set\nto the value that comes from the pipeline.\n\n#### Example\n\n```powershell\n$pathToHQRMTests = Join-Path -Path (Get-Module DscResource.Test).ModuleBase -ChildPath 'Tests\\QA'\n\n$container = New-PesterContainer -Path \"$pathToHQRMTests/ExampleFiles.common.*.Tests.ps1\" -Data @{\n    SourcePath = './source'\n    # ExcludeSourceFile = @('MyExample.ps1')\n}\n\nInvoke-Pester -Container $container -Output Detailed\n```\n\n### FileFormatting.common\n\n#### Parameters\n\n\u003c!-- markdownlint-disable MD013 - Line length --\u003e\n```plaintext\n [-ProjectPath] \u003cString\u003e [-ModuleBase] \u003cString\u003e [[-SourcePath] \u003cString\u003e] \n   [[-ExcludeModuleFile] \u003cString[]\u003e] [[-ExcludeSourceFile] \u003cString[]\u003e] \n   [[-Args] \u003cObject\u003e] [\u003cCommonParameters\u003e]\n```\n\u003c!-- markdownlint-enable MD013 - Line length --\u003e\n\n##### ExcludeModuleFile\n\nAny path or part of a path that will be excluded from the list of files\ngathered by the test from the path specified in the parameter `ModuleBase`.\nDefault no files will be excluded from the test.\n\n##### ExcludeSourceFile\n\nAny path or part of a path that will be excluded from the list of files\ngathered by the test from the path specified in the parameter `SourcePath`.\nDefault no files will be excluded from the test.\n\n##### ModuleBase\n\nThe path to the root of built module, e.g. `./output/FileSystemDsc/1.2.0`.\n\nIf using the build task the default value for this parameter will be set\nto the value that comes from the pipeline.\n\n##### ProjectPath\n\nThe path to the root of the project, for example the root of the local\nGit repository.\n\nIf using the build task the default value for this parameter will be set\nto the value that comes from the pipeline.\n\n##### SourcePath\n\nThe path to the source folder of the project, e.g. `./source`.\n\nIf using the build task the default value for this parameter will be set\nto the value that comes from the pipeline.\n\n```powershell\n$dscResourceModuleName = 'FileSystemDsc'\n$pathToHQRMTests = Join-Path -Path (Get-Module DscResource.Test).ModuleBase -ChildPath 'Tests\\QA'\n\n$container = New-PesterContainer -Path \"$pathToHQRMTests/FileFormatting.common.*.Tests.ps1\" -Data @{\n    ProjectPath = '.'\n    ModuleBase = \"./output/$dscResourceModuleName/*\"\n    # SourcePath = './source'\n    # ExcludeModuleFile = @('Modules/DscResource.Common')\n    # ExcludeSourceFile = @('Examples')\n}\n\nInvoke-Pester -Container $container -Output Detailed\n```\n\n### Localization.common\n\n#### Parameters\n\n\u003c!-- markdownlint-disable MD013 - Line length --\u003e\n```plaintext\n  [-ModuleBase] \u003cString\u003e [[-ExcludeModuleFile] \u003cString[]\u003e]  [[-ProjectPath] \u003cString[]\u003e]\n  [[-Args] \u003cObject\u003e] [\u003cCommonParameters\u003e]\n```\n\u003c!-- markdownlint-enable MD013 - Line length --\u003e\n\n##### ExcludeModuleFile\n\nAny path or part of a path that will be excluded from the list of files\ngathered by the test from the path specified in the parameter `ModuleBase`.\nDefault no files will be excluded from the test.\n\n##### ModuleBase\n\nThe path to the root of built module, e.g. `./output/FileSystemDsc/1.2.0`.\n\nIf using the build task the default value for this parameter will be set\nto the value that comes from the pipeline.\n\n##### ProjectPath\n\nThe path to the root of the project, for example the root of the local\nGit repository.\n\nIf using the build task the default value for this parameter will be set\nto the value that comes from the pipeline.\n\n#### Example\n\n```powershell\n$dscResourceModuleName = 'FileSystemDsc'\n$pathToHQRMTests = Join-Path -Path (Get-Module DscResource.Test).ModuleBase -ChildPath 'Tests\\QA'\n\n$container = New-PesterContainer -Path \"$pathToHQRMTests/Localization.common.*.Tests.ps1\" -Data @{\n    ModuleBase = \"./output/$dscResourceModuleName/*\"\n    # ExcludeModuleFile = @('Modules/DscResource.Common')\n    # ProjectPath = '.'\n}\n\nInvoke-Pester -Container $container -Output Detailed\n```\n\n### Localization.builtModule\n\n#### Parameters\n\n\u003c!-- markdownlint-disable MD013 - Line length --\u003e\n```plaintext\n  [-ModuleBase] \u003cString\u003e [[-ProjectPath] \u003cString[]\u003e]\n  [[-Args] \u003cObject\u003e] [\u003cCommonParameters\u003e]\n```\n\u003c!-- markdownlint-enable MD013 - Line length --\u003e\n\n##### ModuleBase\n\nThe path to the root of built module, e.g. `./output/FileSystemDsc/1.2.0`.\n\nIf using the build task the default value for this parameter will be set\nto the value that comes from the pipeline.\n\n##### ProjectPath\n\nThe path to the root of the project, for example the root of the local\nGit repository.\n\nIf using the build task the default value for this parameter will be set\nto the value that comes from the pipeline.\n\n#### Example\n\n```powershell\n$dscResourceModuleName = 'FileSystemDsc'\n$pathToHQRMTests = Join-Path -Path (Get-Module DscResource.Test).ModuleBase -ChildPath 'Tests\\QA'\n\n$container = New-PesterContainer -Path \"$pathToHQRMTests/Localization.builtModule.*.Tests.ps1\" -Data @{\n    ModuleBase = \"./output/$dscResourceModuleName/*\"\n    # ProjectPath = '.'\n}\n\nInvoke-Pester -Container $container -Output Detailed\n```\n\n### MarkdownLinks.common\n\n#### Parameters\n\n\u003c!-- markdownlint-disable MD013 - Line length --\u003e\n```plaintext\n[-ProjectPath] \u003cString\u003e [-ModuleBase] \u003cString\u003e [[-SourcePath] \u003cString\u003e] \n  [[-ExcludeSourceFile] \u003cString[]\u003e] [[-Args] \u003cObject\u003e] [\u003cCommonParameters\u003e]\n```\n\u003c!-- markdownlint-enable MD013 - Line length --\u003e\n\n##### ExcludeSourceFile\n\nAny path or part of a path that will be excluded from the list of files\ngathered by the test from the path specified in the parameter `SourcePath`.\nDefault no files will be excluded from the test.\n\n##### ModuleBase\n\nThe path to the root of built module, e.g. `./output/FileSystemDsc/1.2.0`.\n\nIf using the build task the default value for this parameter will be set\nto the value that comes from the pipeline.\n\n##### ProjectPath\n\nThe path to the root of the project, for example the root of the local\nGit repository.\n\nIf using the build task the default value for this parameter will be set\nto the value that comes from the pipeline.\n\n##### SourcePath\n\nThe path to the source folder of the project, e.g. `./source`.\n\nIf using the build task the default value for this parameter will be set\nto the value that comes from the pipeline.\n\n```powershell\n$dscResourceModuleName = 'FileSystemDsc'\n$pathToHQRMTests = Join-Path -Path (Get-Module DscResource.Test).ModuleBase -ChildPath 'Tests\\QA'\n\n$container = New-PesterContainer -Path \"$pathToHQRMTests/MarkdownLinks.common.*.Tests.ps1\" -Data @{\n    $ProjectPath = '.'\n    ModuleBase = \"./output/$dscResourceModuleName/*\"\n    # SourcePath = './source'\n    # ExcludeSourceFile = @('Examples')\n}\n\nInvoke-Pester -Container $container -Output Detailed\n```\n\n### ModuleManifest.common\n\n#### Parameters\n\n\u003c!-- markdownlint-disable MD013 - Line length --\u003e\n```plaintext\n[-ModuleName] \u003cString\u003e [-ModuleBase] \u003cString\u003e [[-Args] \u003cObject\u003e]\n  [\u003cCommonParameters\u003e]\n```\n\u003c!-- markdownlint-enable MD013 - Line length --\u003e\n\n##### ModuleBase\n\nThe path to the root of built module, e.g. `./output/FileSystemDsc/1.2.0`.\n\nIf using the build task the default value for this parameter will be set\nto the value that comes from the pipeline.\n\n##### ModuleName\n\nThe name of the module that is built, e.g. `FileSystemDsc`.\n\nIf using the build task the default value for this parameter will be set\nto the value that comes from the pipeline.\n\n#### Example\n\n```powershell\n$dscResourceModuleName = 'JeaDsc'\n$pathToHQRMTests = Join-Path -Path (Get-Module DscResource.Test).ModuleBase -ChildPath 'Tests\\QA'\n\n$container = New-PesterContainer -Path \"$pathToHQRMTests/ModuleManifest.common.*.Tests.ps1\" -Data @{\n    ModuleName = $dscResourceModuleName\n    ModuleBase = \"./output/$dscResourceModuleName/*\"\n}\n\nInvoke-Pester -Container $container -Output Detailed\n```\n\n### ModuleScriptFiles.common\n\n#### Parameters\n\n\u003c!-- markdownlint-disable MD013 - Line length --\u003e\n```plaintext\n[-ProjectPath] \u003cString\u003e [-ModuleBase] \u003cString\u003e [[-SourcePath] \u003cString\u003e]\n  [[-ExcludeModuleFile] \u003cString[]\u003e] [[-ExcludeSourceFile] \u003cString[]\u003e] \n  [[-Args] \u003cObject\u003e] [\u003cCommonParameters\u003e]\n```\n\u003c!-- markdownlint-enable MD013 - Line length --\u003e\n\n##### ExcludeModuleFile\n\nAny path or part of a path that will be excluded from the list of files\ngathered by the test from the path specified in the parameter `ModuleBase`.\nDefault no files will be excluded from the test.\n\n##### ExcludeSourceFile\n\nAny path or part of a path that will be excluded from the list of files\ngathered by the test from the path specified in the parameter `SourcePath`.\nDefault no files will be excluded from the test.\n\n##### ModuleBase\n\nThe path to the root of built module, e.g. `./output/FileSystemDsc/1.2.0`.\n\nIf using the build task the default value for this parameter will be set\nto the value that comes from the pipeline.\n\n##### ProjectPath\n\nThe path to the root of the project, for example the root of the local\nGit repository.\n\nIf using the build task the default value for this parameter will be set\nto the value that comes from the pipeline.\n\n##### SourcePath\n\nThe path to the source folder of the project, e.g. `./source`.\n\nIf using the build task the default value for this parameter will be set\nto the value that comes from the pipeline.\n\n#### Example\n\n```powershell\n$dscResourceModuleName = 'FileSystemDsc'\n$pathToHQRMTests = Join-Path -Path (Get-Module DscResource.Test).ModuleBase -ChildPath 'Tests\\QA'\n\n$container = New-PesterContainer -Path \"$pathToHQRMTests/ModuleScriptFiles.common.*.Tests.ps1\" -Data @{\n    ProjectPath = '.'\n    ModuleBase = \"./output/$dscResourceModuleName/*\"\n    # SourcePath = './source'\n    # ExcludeModuleFile = @('Modules/DscResource.Common')\n    # ExcludeSourceFile = @('Examples')\n}\n\nInvoke-Pester -Container $container -Output Detailed\n```\n\n### PSSAResource.common\n\n#### Parameters\n\n\u003c!-- markdownlint-disable MD013 - Line length --\u003e\n```plaintext\n[-ProjectPath] \u003cString\u003e [-ModuleBase] \u003cString\u003e [[-SourcePath] \u003cString\u003e]\n  [[-ExcludeSourceFile] \u003cString[]\u003e] [[-Args] \u003cObject\u003e] [\u003cCommonParameters\u003e]\n```\n\u003c!-- markdownlint-enable MD013 - Line length --\u003e\n\n##### ExcludeSourceFile\n\nAny path or part of a path that will be excluded from the list of files\ngathered by the test from the path specified in the parameter `SourcePath`.\nDefault no files will be excluded from the test.\n\n##### ModuleBase\n\nThe path to the root of built module, e.g. `./output/FileSystemDsc/1.2.0`.\n\nIf using the build task the default value for this parameter will be set\nto the value that comes from the pipeline.\n\n##### ProjectPath\n\nThe path to the root of the project, for example the root of the local\nGit repository.\n\nIf using the build task the default value for this parameter will be set\nto the value that comes from the pipeline.\n\n##### SourcePath\n\nThe path to the source folder of the project, e.g. `./source`.\n\nIf using the build task the default value for this parameter will be set\nto the value that comes from the pipeline.\n\n```powershell\n$dscResourceModuleName = 'FileSystemDsc'\n$pathToHQRMTests = Join-Path -Path (Get-Module DscResource.Test).ModuleBase -ChildPath 'Tests\\QA'\n\n$container = New-PesterContainer -Path \"$pathToHQRMTests/PSSAResource.common.*.Tests.ps1\" -Data @{\n    ProjectPath = '.'\n    ModuleBase = \"./output/$dscResourceModuleName/*\"\n    # SourcePath = './source'\n    # ExcludeSourceFile = @('Examples')\n}\n\nInvoke-Pester -Container $container -Output Detailed\n```\n\n### PublishExampleFiles.common\n\n#### Parameters\n\n\u003c!-- markdownlint-disable MD013 - Line length --\u003e\n```plaintext\n[-SourcePath] \u003cString\u003e [[-ExcludeSourceFile] \u003cString[]\u003e] [[-Args] \u003cObject\u003e] \n  [\u003cCommonParameters\u003e]\n```\n\u003c!-- markdownlint-enable MD013 - Line length --\u003e\n\n##### ExcludeSourceFile\n\nAny path or part of a path that will be excluded from the list of files\ngathered by the test from the path specified in the parameter `SourcePath`.\nDefault no files will be excluded from the test.\n\n##### SourcePath\n\nThe path to the source folder of the project, e.g. `./source`.\n\nIf using the build task the default value for this parameter will be set\nto the value that comes from the pipeline.\n\n#### Example\n\n```powershell\n$pathToHQRMTests = Join-Path -Path (Get-Module DscResource.Test).ModuleBase -ChildPath 'Tests\\QA'\n\n$container = New-PesterContainer -Path \"$pathToHQRMTests/PublishExampleFiles.common.*.Tests.ps1\" -Data @{\n    SourcePath = './source'\n    # ExcludeSourceFile = @('MyExample.ps1')\n}\n\nInvoke-Pester -Container $container -Output Detailed\n```\n\n### RelativePathLength.common\n\n#### Parameters\n\n\u003c!-- markdownlint-disable MD013 - Line length --\u003e\n```plaintext\n[-ModuleBase] \u003cString\u003e [[-Args] \u003cObject\u003e] [\u003cCommonParameters\u003e]\n```\n\u003c!-- markdownlint-enable MD013 - Line length --\u003e\n\n##### ModuleBase\n\nThe path to the root of built module, e.g. `./output/FileSystemDsc/1.2.0`.\n\nIf using the build task the default value for this parameter will be set\nto the value that comes from the pipeline.\n\n```powershell\n$dscResourceModuleName = 'FileSystemDsc'\n$pathToHQRMTests = Join-Path -Path (Get-Module DscResource.Test).ModuleBase -ChildPath 'Tests\\QA'\n\n$container = New-PesterContainer -Path \"$pathToHQRMTests/RelativePathLength.common.*.Tests.ps1\" -Data @{\n    ModuleBase = \"./output/$dscResourceModuleName/*\"\n}\n\nInvoke-Pester -Container $container -Output Detailed\n```\n\n### ResourceSchema.common\n\n#### Parameters\n\n\u003c!-- markdownlint-disable MD013 - Line length --\u003e\n```plaintext\n[-ModuleBase] \u003cString\u003e [[-Args] \u003cObject\u003e] [\u003cCommonParameters\u003e]\n```\n\u003c!-- markdownlint-enable MD013 - Line length --\u003e\n\n##### ModuleBase\n\nThe path to the root of built module, e.g. `./output/FileSystemDsc/1.2.0`.\n\nIf using the build task the default value for this parameter will be set\nto the value that comes from the pipeline.\n\n```powershell\n$dscResourceModuleName = 'FileSystemDsc'\n$pathToHQRMTests = Join-Path -Path (Get-Module DscResource.Test).ModuleBase -ChildPath 'Tests\\QA'\n\n$container = New-PesterContainer -Path \"$pathToHQRMTests/ResourceSchema.common.*.Tests.ps1\" -Data @{\n    ModuleBase = \"./output/$dscResourceModuleName/*\"\n}\n\nInvoke-Pester -Container $container -Output Detailed\n```\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fdsccommunity%2Fdscresource.test","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fdsccommunity%2Fdscresource.test","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fdsccommunity%2Fdscresource.test/lists"}