pester / vscode-adapter

Run PowerShell Pester Tests with Visual Studio Code
MIT License
58 stars 13 forks source link

Feature Request: Add runtime parameters to tests #218

Open b1kjsh opened 10 months ago

b1kjsh commented 10 months ago

I have pester tests that need parameters passed at runtime in order to execute the tests.

An example would be:

param($deviceName, $artifactDirectory, $CustomTarget)
BeforeAll {
...setup tests
}
Describe "These are my tests" {
    It "blah" {
        ...
    }
}

I have a CI environment where I have to run a powershell script which uses a New-PesterContainer and passes arguments via the -Data parameter. But I don't see anyway to configure this in the Pester Test explorer.

JustinGrote commented 9 months ago

I'm not sure how this would even work. Would you want a popup for each parameter? A psd1 to supply your pester config? All of which have a lot of security issues.