Choosing Context blocks or It blocks for testing

15 views
Skip to first unread message

Gregory Tate

unread,
Dec 1, 2016, 2:33:45 PM12/1/16
to Pester
Other than commenting out the code, is there an easier way to control which Context and It blocks to execute during testing?

Chris Dent

unread,
Dec 2, 2016, 12:06:50 PM12/2/16
to Gregory Tate, Pester

If there are different sets of tests, why not use different files?


On 1 Dec 2016 19:33, "Gregory Tate" <gre...@gmail.com> wrote:
Other than commenting out the code, is there an easier way to control which Context and It blocks to execute during testing?

--
You received this message because you are subscribed to the Google Groups "Pester" group.
To unsubscribe from this group and stop receiving emails from it, send an email to pester+unsubscribe@googlegroups.com.
For more options, visit https://groups.google.com/d/optout.

Gregory Tate

unread,
Dec 2, 2016, 2:36:15 PM12/2/16
to Pester, gre...@gmail.com
Let's assume they belong in the same set of tests from the Context perspective.

It doesn't seem that there's an easy way to specify which specific tests to run in Invoke-Pester except for on the level of the Describe block. It would be nice to be able to include the -Tag parameter alongside the Context block and the It block.

Just checking to see if someone has come across a better way for running specific tests in the It block without having to comment out code. 


On Friday, December 2, 2016 at 11:06:50 AM UTC-6, Chris Dent wrote:

If there are different sets of tests, why not use different files?

On 1 Dec 2016 19:33, "Gregory Tate" <gre...@gmail.com> wrote:
Other than commenting out the code, is there an easier way to control which Context and It blocks to execute during testing?

--
You received this message because you are subscribed to the Google Groups "Pester" group.
To unsubscribe from this group and stop receiving emails from it, send an email to pester+un...@googlegroups.com.
Reply all
Reply to author
Forward
0 new messages