gulp-mspec-runner
A Gulp.js plugin to facilitate running MSpec tests on .NET assemblies. Much of this work is based on the gulp-nunit-runner plugin.
Installation
From the root of your project (where your gulpfile.js
is), issue the following command:
npm install --save-dev gulp-mspec-runner
Usage
The plugin uses standard gulp.src
globs to retrieve a list of assemblies that should be tested with MSpec. By default the plugin looks for the MSpec console runner in your PATH
. You can optionally specify the MSpec bin
folder or the full path of the runner as demonstrated below. You should add {read: false}
to your gulp.src
so that it doesn't actually read the files and only grabs the file names.
var gulp = mspec = ; gulp;
This would result in the following command being executed (assuming you had Database and Services specification assemblies.)
C:/mspec/bin/mspec-clr4.exe "C:\full\path\to\Database.Specs.dll" "C:\full\path\to\Services.Specs.dll"
Note: If you use Windows paths with \
's, you need to escape them with another \
. (e.g. C:\\mspec\\bin\\mspec-clr4.exe
). However, you may also use forward slashes /
instead which don't have to be escaped.
You may also add options that will be used as MSpec command line switches. Any property that is a boolean true
will simply be added to the command line, String values will be added to the switch parameter separated by a colon and arrays will be a comma seperated list of values.
For more information on available switches, see the MSpec documentation:
https://github.com/machine/machine.specifications#command-line-reference
var gulp = mspec = ; gulp;
This would result in the following command:
C:/mspec/bin/mspec-clr4.exe --silent --no-color "C:\full\path\to\Database.Test.dll" "C:\full\path\to\Services.Test.dll"
Options
Below are all available options.
;
Release Notes
0.1.0 (26 December 2015)
- Initial release