Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Any support for tags on Context blocks planned? #657

Closed
davidwallis3101 opened this issue Dec 12, 2016 · 6 comments
Closed

Any support for tags on Context blocks planned? #657

davidwallis3101 opened this issue Dec 12, 2016 · 6 comments
Labels
Milestone

Comments

@davidwallis3101
Copy link

As above really..

I do describe "server intergration tests"

Context 2016

Context 2012

Context 2008

Context Linux

And a lot of my initial pre-reqs and setup are under the describe block.. but Id rather not do multiple describes, but if necessary..

@dlwyatt
Copy link
Member

dlwyatt commented Dec 12, 2016

It's something we've talked about, but surprisingly hard to implement. It might not make it into the v4 release, but is something we can look at later on as an enhancement.

@it-praktyk
Copy link
Contributor

I see that in the function Context.ps1 is added the parameter Tag.

But based on the line 129 in the Describe.ps1 I assume that tags are only supported for Describe.

Am I right?

@dlwyatt
Copy link
Member

dlwyatt commented Jan 30, 2017

In v4, there's really no difference between the Describe and Context commands; they just alias the same code. However, for the moment, you can only effectively put tags on the outermost block (whether that happens to be called Describe or Context doesn't matter.) That's because we didn't have a good way to figure out which blocks to run when their contents might also have tags (and these blocks / tags can potentially span multiple files). It wasn't important enough to hold up the rest of the code changes, so I just stuck that warning in for now.

@PeterMTaylor
Copy link

Hi there,

just wondering is it possible that these tags as @davidwallis3101 mentioned for this issue be useful as a TODO list which a set of several contexts required for one Describe block. Then later run a small summary script to see how many "to do" tests are outstanding for reflection purposes. Thanks.

I had asked the pester group forum for some ideas https://groups.google.com/forum/m/#!topic/pester/fwMtDsILe4k

@nohwnd
Copy link
Member

nohwnd commented Jan 31, 2017

@PeterMTaylor You can use -Skipped to mark tests that you are working on. Or just throw "todo" in them to make them fail. You can also write a script that will process the pester result object and pick up the tests that threw the todo message (a simple where might suffice). There is probably not much more that Pester can do for you, without making it a feature just for you :)

@nohwnd
Copy link
Member

nohwnd commented Mar 24, 2019

Implemented in v5.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

5 participants