Generates ContainerInfo-objects used as for Invoke-Pester -Container
Pester 5 supports running tests files and scriptblocks using parameter-input. To use this feature, Invoke-Pester expects one or more ContainerInfo-objects created using this funciton, that specify test containers in the form of paths to the test files or scriptblocks containing the tests directly.
A optional Data-dictionary can be provided to supply the containers with any required parameter-values. This is useful in when tests are generated dynamically based on parameter-input. This method enables complex test-solutions while being able to re-use a lot of test-code.
This example runs Pester using a generated ContainerInfo-object referencing a file and required parameters that's provided to the test-file during execution.
This example runs Pester agianst a scriptblock. New-PesterContainer is used to genreated the requried ContainerInfo-object that enables us to do this directly.
Specifies one or more paths to files containing tests. The value is a path\file name or name pattern. Wildcards are permitted.
Specifies one or more scriptblocks containing tests.
Allows a dictionary to be provided with parameter-values that should be used during execution of the test containers defined in Path or ScriptBlock.
This cmdlet supports the common parameters: -Debug, -ErrorAction, -ErrorVariable, -InformationAction, -InformationVariable, -OutVariable, -OutBuffer, -PipelineVariable, -Verbose, -WarningAction, and -WarningVariable. For more information, see about_CommonParameters.
This page was auto-generated using the comment based help in Pester 5.1.1. To edit the content of this page, change the corresponding help in the pester/Pester repository. See our contribution guide for more information.