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

feature request - behavior of multiple --tag options #74

Open
elade89 opened this issue Jul 17, 2023 · 2 comments
Open

feature request - behavior of multiple --tag options #74

elade89 opened this issue Jul 17, 2023 · 2 comments

Comments

@elade89
Copy link

elade89 commented Jul 17, 2023

Hello,

‘tags’ option allows to specify tags in the command line, which cause all tests which include the specified tags in the test module’s ‘@tags’ attribute to be executed in the same launch.

We wish to have an option to change the behavior of this feature, so when specifying more than one tag, Nightwatch will collect only tests which include all specified tags instead of collecting any test which include one of the tags.

Thanks for the support :)

@sharutkarsh
Copy link

Hi There,

Thank you for raising this issue with us.

To elaborate on your use case, could you please share a sample code and 'how to run' steps with us?

Also, please raise an issue with BrowserStack support team by filling this form: https://www.browserstack.com/contact#technical-support.

@elade89
Copy link
Author

elade89 commented Jul 17, 2023

hi, so for example if I have three test modules, which have a list of these tags under their '@tags' attribute:

test_1.js : ['tag1', 'tag2']
test_2.js : ['tag2']
test_3.js : ['tag2', 'tag3']

when running:
npx nightwatch --tag tag1 --tag tag2

the collected tests for this execution will be test_1.js, test_2.js and test_3.js, because they all contain one of the specified tags (tag2).

I would rather having an option to collect only the tests which include all of the specified tags, like in this example - only test_1.js.

hope that's clear, lmkn if any questions pop up.

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

No branches or pull requests

2 participants