'Run' profile configuration
Posted: Fri May 15, 2020 10:28 am
To help you better we need some information from you.
*** Please fill in the fields below. If you leave fields empty or specify 'latest' rather than the actual version your answer will be delayed as we will be forced to ask you for this information. ***
Product, version and build: Product: PowerShell Studio 2020 v5.7.175
32 or 64 bit version of product: 64
Operating system: Windows 10 Enterprise
32 or 64 bit OS: 64
*** Please add details and screenshots as needed below. ***
DO NOT POST LICENSES, KEYS OR ANY OTHER LICENSING INFORMATION IN THIS FORUM
I am working on a module project currently and building Pester tests for the module. In order to test the module the way I need to, it has to be imported and pull specific metadata for the tests. I have found that when I run the Pester tests I am building, it does not appear to be able to specify a host specific profile (meaning PS Studio specific similar to the way VS Code can use a 'Microsoft.VSCode_profile.ps1' profile) unless I am missing a configuration setting in the application. It also does not appear to be using any existing profiles within PowerShell when running the Pester tests within PS Studio. As a work around I have included lines in the Pester test script for the module to include adding the dev module path into the environment but that is less than ideal.
My question is whether or not there is a configuration setting I have missed to have PS Studio load a particular environment for running the Pester tests or is there a PS Studio specific profile file I can create that PS Studio will use whenever it runs my code so that I can include my dev module location only in that profile? Ideally the host specific profile would be preferable but if I can at least get the environment modification work-around out of my Pester tests that would be nice.
Thanks,
Glen
*** Please fill in the fields below. If you leave fields empty or specify 'latest' rather than the actual version your answer will be delayed as we will be forced to ask you for this information. ***
Product, version and build: Product: PowerShell Studio 2020 v5.7.175
32 or 64 bit version of product: 64
Operating system: Windows 10 Enterprise
32 or 64 bit OS: 64
*** Please add details and screenshots as needed below. ***
DO NOT POST LICENSES, KEYS OR ANY OTHER LICENSING INFORMATION IN THIS FORUM
I am working on a module project currently and building Pester tests for the module. In order to test the module the way I need to, it has to be imported and pull specific metadata for the tests. I have found that when I run the Pester tests I am building, it does not appear to be able to specify a host specific profile (meaning PS Studio specific similar to the way VS Code can use a 'Microsoft.VSCode_profile.ps1' profile) unless I am missing a configuration setting in the application. It also does not appear to be using any existing profiles within PowerShell when running the Pester tests within PS Studio. As a work around I have included lines in the Pester test script for the module to include adding the dev module path into the environment but that is less than ideal.
My question is whether or not there is a configuration setting I have missed to have PS Studio load a particular environment for running the Pester tests or is there a PS Studio specific profile file I can create that PS Studio will use whenever it runs my code so that I can include my dev module location only in that profile? Ideally the host specific profile would be preferable but if I can at least get the environment modification work-around out of my Pester tests that would be nice.
Thanks,
Glen