grunt-parallel-spec-runner
Advanced tools
Comparing version 0.0.4 to 0.0.5
{ | ||
"name": "grunt-parallel-spec-runner", | ||
"version": "0.0.4", | ||
"version": "0.0.5", | ||
"description": "Plugin used to configure and launch multiple spec ", | ||
@@ -5,0 +5,0 @@ "homepage": "https://github.com/RallySoftware/grunt-parallel-spec-runner.git", |
@@ -22,3 +22,7 @@ /* | ||
specRunnerQueue = [], | ||
specRunnersCompleted = false; | ||
specRunnersCompleted = false, | ||
summary = { | ||
failures:0, | ||
pass: 0 | ||
}; | ||
@@ -31,3 +35,3 @@ if(options.isolateAllSpecs){ | ||
if(code !== 0){ | ||
grunt.log.error(result); | ||
grunt.log.error(result); //TODO: result is always empty string | ||
} | ||
@@ -133,3 +137,9 @@ }; | ||
grunt: true, | ||
opts: {stdio: 'inherit'}, | ||
opts: { | ||
stdio: [ | ||
process.stdin, | ||
process.stout, | ||
process.stderr | ||
] | ||
}, | ||
args: ['webdriver_jasmine_runner:' + options.target + ':' + specRunner.file] | ||
@@ -141,3 +151,12 @@ } | ||
} | ||
grunt.util.spawn(opts, df); | ||
var s = grunt.util.spawn(opts, df); | ||
//TODO: see if we can get this working with stdio: {'inherit'} | ||
s.stdout.on('data', function(data) { | ||
var msg = data.toString(); | ||
var pat = /\d+ of \d+ tests failed:/; | ||
if(pat.test(msg)) { | ||
var failures = +msg.match(pat)[0].match(/\d+/)[0]; | ||
summary.failures = summary.failures + failures; | ||
} | ||
}); | ||
} | ||
@@ -166,2 +185,6 @@ }, 500); | ||
return { | ||
getSummary: function(){ | ||
return summary; | ||
}, | ||
isDone: function(){ | ||
@@ -213,2 +236,4 @@ if(!started){ | ||
//options.specs = options.specs.splice(0, 10); | ||
//Use the user defined number of spec files per runner, or split the spec files among the available runners | ||
@@ -225,2 +250,4 @@ options.maxSpecFilesPerRunner = +grunt.option('maxSpecFilesPerRunner') > 0 ? +grunt.option('maxSpecFilesPerRunner') | ||
//TODO: output timing info from grunt-time task instead | ||
//TODO: cleanup/format output messages | ||
grunt.log.writeln('Summary Failures:' + specRunner.getSummary().failures); | ||
var endTime = new Date().getTime() / 1000; | ||
@@ -227,0 +254,0 @@ grunt.log.writeln("Total Execution Time:" + ((endTime - startTime) / 60) + ' Minutes'); |
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
13628
323