Skip to content

Commit 8f2dc94

Browse files
Kingsley HauseJohn Doherty
authored andcommitted
Added the ability to pass a comma-separated list of feature files to run (#75)
1 parent 575b8a1 commit 8f2dc94

File tree

1 file changed

+8
-4
lines changed

1 file changed

+8
-4
lines changed

index.js

Lines changed: 8 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -48,7 +48,7 @@ program
4848
.option('-d, --disableLaunchReport [optional]', 'Disables the auto opening the browser with test report')
4949
.option('-j, --junit <path>', 'output path to save junit-report.xml defaults to ' + config.reports)
5050
.option('-t, --tags <tagName>', 'name of tag to run', collectPaths, [])
51-
.option('-f, --featureFile <path>', 'a specific feature file to run')
51+
.option('-f, --featureFiles <paths>', 'comma-separated list of feature files to run')
5252
.option('-x, --timeOut <n>', 'steps definition timeout in milliseconds. defaults to ' + config.timeout, coerceInt, config.timeout)
5353
.option('-n, --noScreenshot [optional]', 'disable auto capturing of screenshots when an error is encountered')
5454
.parse(process.argv);
@@ -92,9 +92,13 @@ global.sharedObjectPaths = program.sharedObjects.map(function (item) {
9292
// rewrite command line switches for cucumber
9393
process.argv.splice(2, 100);
9494

95-
// allow a specific feature file to be executed
96-
if (program.featureFile) {
97-
process.argv.push(program.featureFile);
95+
// allow specific feature files to be executed
96+
if (program.featureFiles) {
97+
var splitFeatureFiles = program.featureFiles.split(',');
98+
99+
splitFeatureFiles.forEach(function (feature) {
100+
process.argv.push(feature);
101+
});
98102
}
99103

100104
// add switch to tell cucumber to produce json report files

0 commit comments

Comments
 (0)