Running test with multiple tags

973 views
Skip to first unread message

Juan Chavez

unread,
Mar 23, 2016, 1:28:05 PM3/23/16
to NightwatchJs
Hi,

is it possible to run tests with specific tags? For example, run a test with tags mobile AND search? Right now all the tests with the mobile tag are run, but I would like to run only that one test which matches both tags

Thank you,
J Chavez

Josh Vito

unread,
Mar 23, 2016, 3:53:25 PM3/23/16
to NightwatchJs
Are you able to select the tags you need by including all "mobile" and use another tag(s) to remove the unwanted?

$ nightwatch --tag search --skiptags mobile

Andrei Rusu

unread,
Mar 23, 2016, 4:31:58 PM3/23/16
to nightw...@googlegroups.com
$ nightwatch --tag search --tag mobile
> --
> You received this message because you are subscribed to the Google Groups
> "NightwatchJs" group.
> To unsubscribe from this group and stop receiving emails from it, send an
> email to nightwatchjs...@googlegroups.com.
> To post to this group, send email to nightw...@googlegroups.com.
> To view this discussion on the web visit
> https://groups.google.com/d/msgid/nightwatchjs/326d3005-3295-45ce-a457-6f462d466a49%40googlegroups.com.
>
> For more options, visit https://groups.google.com/d/optout.
Message has been deleted

Juan Chavez

unread,
Mar 23, 2016, 5:55:20 PM3/23/16
to NightwatchJs
For example, I have two features.   One test has tags,  @mobile @signIn and the other feature has @mobile @search.  So what I can to do is just run the second scenario only using both tags @mobile and @search.  I could do only --tags search but I want to know if it's possible to use both and keep the other test with mobile tag from running.  Something Like: Run only the test with tags mobile AND Search 

Andrei Rusu

unread,
Mar 24, 2016, 7:01:16 AM3/24/16
to nightw...@googlegroups.com
I see, you need the union. I don't think that's supported yet, but we might add it soon. Feel free to open a feature request on GitHub. We could add something like --tags mobile,search.

On Wednesday, 23 March 2016, Juan Chavez <juan....@foxsports.com> wrote:
This will run all tests with tags mobile and search I believe.  What I would like to do is to is to run one test which has both tags without running all the other tests with mobile or search tags
To view this discussion on the web visit https://groups.google.com/d/msgid/nightwatchjs/06c82c81-3610-47c1-b375-2d0b6785cc60%40googlegroups.com.

Juan Chavez

unread,
Mar 24, 2016, 2:41:33 PM3/24/16
to NightwatchJs
Andrei,

Thank you for your feedback.  I have added a new feature request.  https://github.com/nightwatchjs/nightwatch/issues/914

Thank you,
J Chavez
To unsubscribe from this group and stop receiving emails from it, send an email to nightwatchjs+unsubscribe@googlegroups.com.

Eric Mumford

unread,
Apr 11, 2016, 10:10:04 AM4/11/16
to NightwatchJs
Also, reconsider your tagging paradigm. In other words, consider adding a tag that captures the flow you want, and add that tag to the affected tests.



On Wednesday, March 23, 2016 at 1:28:05 PM UTC-4, Juan Chavez wrote:
Reply all
Reply to author
Forward
0 new messages