Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Appearance settings
Discussion options

@nohwnd I wanted to try the experimental Run.Parallel feature on 6.0.0-rc1. In my tests I use Pester container with parameters that are passed to each test script:

$splatPesterContainer = @{
    Path = $tagFilteredTests
    Data = @{Module = $moduleList; Data = $Data}
}
$pesterConfiguration.Run.Container = New-PesterContainer @splatPesterContainer

Test file param() block:

param(
    [Parameter(Mandatory)]
    [ValidateNotNullOrEmpty()]
    [Collections.Generic.List[PSModuleInfo]]$Module,
    $Data
)

However when Run.Parallel is set to true. the parameters are not passed to the tests:

Running tests from 12 files in parallel.
[-] Discovery in D:\Users\Bukem\Documents\PowerShell\.projects\Modules\KBDevelopmentTools\Integration\01-Manifest.Tests.ps1 failed with:
ParameterBindingException: Cannot process command because of one or more missing mandatory parameters: Module.

Is it known limitation? Bug? Or I'm doing it wrong? 😅

You must be logged in to vote

Replies: 1 comment · 1 reply

Comment options

Not supported yet. Putting on list.

You must be logged in to vote
1 reply
@kborowinski
Comment options

Thanks! For some time, I've been using thread jobs to run the infrastructure tests in parallel, but it would be nice to migrate to Pester since it has native support for it now.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
2 participants
Morty Proxy This is a proxified and sanitized view of the page, visit original site.