Skip to content

Commit

Permalink
Merge pull request #81 from oss-specs/feature/haveCucumberFileOutputT…
Browse files Browse the repository at this point in the history
…askStartServer

Output cucumber server test results to file.
  • Loading branch information
jimCresswell committed Aug 20, 2015
2 parents a6a12fa + 15edc37 commit aa70d5a
Show file tree
Hide file tree
Showing 2 changed files with 27 additions and 3 deletions.
15 changes: 13 additions & 2 deletions gulp/tasks/testing.js
Original file line number Diff line number Diff line change
Expand Up @@ -83,7 +83,7 @@ gulp.task('test:cucumber:fileoutput', 'Run Cucumber, only output JSON to file.',
}, commandArgs);
}

var stream = spawn('gulp', commandArgs);
var stream = spawn('./node_modules/.bin/gulp', commandArgs);

stream.stdout.setEncoding(baseEncoding);
stream.stderr.setEncoding(baseEncoding);
Expand All @@ -97,7 +97,7 @@ gulp.task('test:cucumber:fileoutput', 'Run Cucumber, only output JSON to file.',
options: {'tags': 'Supports same optional tags arguments as \'test:cucumber\' task.'}
});

// The default Cucumber test run requires server to be running.
// The default Cucumber test run requires the server to be running.
gulp.task('test:features', 'Everything necessesary to test the features.', function(done) {
runSequence('set-envs:test',
'server:start',
Expand All @@ -108,6 +108,17 @@ gulp.task('test:features', 'Everything necessesary to test the features.', funct
options: {'tags': 'Supports same optional tags arguments as \'test:cucumber\' task.'}
});

// The default Cucumber test run requires server to be running.
gulp.task('test:features:fileoutput', 'Everything necessesary to test the features and send the output to file.', function(done) {
runSequence('set-envs:test',
'server:start',
'test:cucumber:fileoutput',
'server:stop',
done);
}, {
options: {'tags': 'Supports same optional tags arguments as \'test:cucumber\' task.'}
});

// Run the unit tests, report to terminal and disk.
gulp.task('test:unit', 'Run the unit tests.', function () {
return gulp.src(projectPaths['unit-test-js'])
Expand Down
15 changes: 14 additions & 1 deletion package.json
Original file line number Diff line number Diff line change
Expand Up @@ -74,5 +74,18 @@
"require-dir": "^0.3.0",
"run-sequence": "^1.1.2",
"should": "^7.0.1"
}
},
"bundleDependencies": [
"body-parser",
"cookie-parser",
"debug",
"express",
"gherkin",
"hbs",
"morgan",
"newrelic",
"nodegit",
"q-io",
"serve-favicon"
]
}

0 comments on commit aa70d5a

Please sign in to comment.