Hello,
Is there any way to do something like this and skip the hassle of writing out my tests to a file first? I'm working on dynamically generating tests to check operations, similar to the Operations Validation Framework. I know I can run the command directly but I want the nice output provided by invoke-pester -passthrough rather than write-host because I plan to output it to an excel.
I was hoping to do something like:
$PesterTestBlock = {Describe "Host Networking {It "Returns True" { $true } }
$PesterTestBlock | invoke-pester -passthrough
So is there a way to do this? SO far I can seem to only get Pester to run a script if it exists in a file, and I'm hoping to do this in Azure automation so writing it out to a temp file and reading it back in is a little bit of a hassle.
Just wanted to see if there was a better way. Thanks for any input.