I have a for each loop I wish to run in parallel, however I'm not getting a uniform time as to when each iteration kicks off, which is leading to some edgecase timing issues.
As such, I've changed my loop just to be sequential. However, I don't want to wait for the iteration commands to complete.
Each iteration is essentially doing:
Invoke-Pester @{Path= "tests.ps1"; Parameters = @{...}} -Tag 'value' -OutputFile $xmlpath -OutputFormat NUnitXML -EnableExit
I want each iteration to run sequentially (tests expect to be run sequentially) however I don't wish to wait for tests to complete.
What is the best way to ensure the iteration does not wait for the Invoke-Pester command to complete, such that the next iteration kicks off after the previous iteration has initiated? I've tried using Start-Process Invoke-Pester which I think invalidated further code structure.
Thank you