Author Posts

December 2, 2016 at 4:14 pm

Is there a way to specify particular Context or It blocks when using the Invoke-Pester command?

As I write tests, I'd like a convenient way to call specific Context or It block rather than having the Invoke-Pester command run through all tests within a Describe block.

Current method is to comment out the code.

I see there's a -Tag parameter, but it appears to be only applicable to the Describe block.

December 5, 2016 at 11:02 pm

Just been reading through the wiki and issues log for Pester and there are similar requests for this functionality so it's doesn't look like it's possible at the moment.

However, rather than comment out tests, you could just add the -Skip parameter to the It block so that the test doesn't run.