Cucumber-like Tags

267 views
Skip to first unread message

David Stanek

unread,
Aug 21, 2012, 11:05:08 AM8/21/12
to lettuce-d...@googlegroups.com
Hello All,

Has anyone thought of creating a tag feature similar to what Cucumber
implements[1]? I've been thinking about ways to organize my tests and
that feels like a good approach. There are really two things I'm
trying to accomplish:
1. A way to mark tests a "work in progress" so that they are skipped
until ready to become a part of the build.
2. A way to select certain tests to run or not run. For example I
may want to run all test except selenium tests or maybe I want to run
all billing tests.


References:
1. https://github.com/cucumber/cucumber/wiki/Tags

--
David
blog: http://www.traceback.org
twitter: http://twitter.com/dstanek
www: http://dstanek.com

Gabriel Falcão

unread,
Aug 21, 2012, 1:44:40 PM8/21/12
to lettuce-d...@googlegroups.com
It's already implemented, it's not documented yet though. Sorry.


You can decorate your scenarios with @as @many-tags @youwant

and run with

lettuce --tag=many-tags

you can also exclude scenarios that match some tag prefixing with "-" minus sign

lettuce --tag=-youwant

and specify as many tags as you want:

lettuce --tag=many-tags --tag=youwant


the same works for the `./manage.py harvest` django command
 -- Gabriel Falcão
Reply all
Reply to author
Forward
0 new messages