You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Using NPM scripts its more easy. Let's assume you have following `package.json`.
115
+
116
+
```json
117
+
{
118
+
...
119
+
"scripts": {
120
+
"test": "nightwatch",
121
+
...
122
+
}
123
+
...
124
+
}
125
+
```
126
+
127
+
You can run the tests by executing
128
+
129
+
```bash
130
+
npm test
131
+
```
132
+
133
+
### Executing individual feature files or scenarios
134
+
135
+
Single feature file
136
+
137
+
```bash
138
+
npm test -- features/google-search.feature
139
+
```
140
+
141
+
or
142
+
143
+
```bash
144
+
npm test -- features/google-search
145
+
```
146
+
147
+
Multiple feature files
148
+
149
+
```bash
150
+
npm test -- features/google-search features/duckduckgo-search
151
+
```
152
+
153
+
Single feature file and one folder
154
+
155
+
```bash
156
+
npm test -- features/google/google-search features/duckduckgo
157
+
```
158
+
159
+
Single scenario by its line number
160
+
161
+
```bash
162
+
npm test -- features/google-search.feature:11
163
+
```
164
+
114
165
# Features
115
166
116
167
## Supported Nightwatch command line options
@@ -123,8 +174,8 @@ node_modules/.bin/nightwatch
123
174
|`--env`|`-e`| ✅ | default | Which testing environment to use - defined in nightwatch.conf.js |
124
175
|`--verbose`|| ✅ || Shows extended selenium command logging during the session |
125
176
|`--version`|`-v`| ✅ || Shows the version number |
126
-
|`--test`|`-t`|🚧|| Runs only the specified test suite/module. By default the runner will attempt to run all tests in the src_folders settings folder(s) and their subfolders. |
127
-
|`--testcase`||🚧|| Used only together with --test. Runs the specified testcase from the current suite/module. |
177
+
|`--test`|`-t`|✅|| Runs only the specified feature file. By default the runner will attempt to run all feature files. |
178
+
|`--testcase`||⛔|| Used only together with --test. Runs the specified testcase from the current suite/module. |
128
179
|`--group`|`-g`| ✅ || Runs only the specified group of tests (subfolder). Tests are grouped by being placed in the same subfolder. |
129
180
|`--skipgroup`|`-s`| ✅ || Skip one or several (comma separated) group of tests. |
130
181
|`--filter`|`-f`| 🚧 || Specify a filter (glob expression) as the file name format to use when loading the test files. |
@@ -230,8 +281,11 @@ As input you need to provide a Cucumber JSON report generated by this package. Y
0 commit comments