Is your feature request related to a problem? Please describe.
I am writing my night-watch test in BDD Style. using 'describe' and 'it' blocks. I also have to select specific test and run on specific environment. In order to select specific test, using Test Tags is the better option. Unfortunately I don't see the support for the Test Tags in BDD style tests. Please note , i cannot use grouping here . its because 'describe' block can have many 'it' blocks and each 'it' blocks represents separate test cases.
Describe the solution you'd like
Providing the support of Test Tags in BDD Style will be really helpful to run selective tests.
Describe how the solution will work
I will be able to select specific tests to run the test.
Describe alternatives you've considered
I have considered running the test as group. but i cannot use grouping here . its because 'describe' block can have many 'it' blocks and each 'it' blocks represents separate test cases.
You can simply define a tags property inside the main describe block. E.g.:
describe('testsuite', function() {
this.tags = ['some-tag'];
it('the testcase', function(browser) {
});
});
Is that possible to define the tags in 'it' block level , because a describe can have many 'it' blocks . which represents separate tests. In that case, how do we run selective tests ?
@s-kugan I approach this by writing one testcase per file, that way tags can be used to run or skip certain files
@zwbetz-gh yes. that was my last thought as well. if we cannot define test tags in 'it' blocks level.
This issue has been automatically marked as stale because it has not had any recent activity.
If possible, please retry using the latest Nightwatch version and update the issue with any relevant details. If no further activity occurs, it will be closed. Thank you for your contribution.
Most helpful comment
You can simply define a tags property inside the main
describeblock. E.g.: