npm package discovery and stats viewer.

Discover Tips

  • General search

    [free text search, go nuts!]

  • Package details

    pkg:[package-name]

  • User packages

    @[username]

Sponsor

Optimize Toolset

I’ve always been into building performant and accessible sites, but lately I’ve been taking it extremely seriously. So much so that I’ve been building a tool to help me optimize and monitor the sites that I build to make sure that I’m making an attempt to offer the best experience to those who visit them. If you’re into performant, accessible and SEO friendly sites, you might like it too! You can check it out at Optimize Toolset.

About

Hi, 👋, I’m Ryan Hefner  and I built this site for me, and you! The goal of this site was to provide an easy way for me to check the stats on my npm packages, both for prioritizing issues and updates, and to give me a little kick in the pants to keep up on stuff.

As I was building it, I realized that I was actually using the tool to build the tool, and figured I might as well put this out there and hopefully others will find it to be a fast and useful way to search and browse npm packages as I have.

If you’re interested in other things I’m working on, follow me on Twitter or check out the open source projects I’ve been publishing on GitHub.

I am also working on a Twitter bot for this site to tweet the most popular, newest, random packages from npm. Please follow that account now and it will start sending out packages soon–ish.

Open Software & Tools

This site wouldn’t be possible without the immense generosity and tireless efforts from the people who make contributions to the world and share their work via open source initiatives. Thank you 🙏

© 2024 – Pkg Stats / Ryan Hefner

gulp-mspec-runner

v0.1.2

Published

A Gulp.js plugin to facilitate the running of MSpec tests on .Net assemblies.

Downloads

65

Readme

gulp-mspec-runner

NPM version NPM downloads Build Status Dependencies Status DevDependencies Status

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 = require('gulp'),
    mspec = require('gulp-mspec-runner');

gulp.task('mspec-test', function () {
    return gulp.src(['**/*.Specs.dll'], {read: false})
        .pipe(mspec({
            executable: 'C:/mspec/bin/mspec-clr4.exe',
        }));
});

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 = require('gulp'),
    mspec = require('gulp-mspec-runner');

gulp.task('mspec-test', function () {
    return gulp.src(['**/*.Specs.dll'], {read: false})
        .pipe(mspec({
            executable: 'C:/mspec/bin/mspec-clr4.exe',
            options: {
              "silent": true,
              "no-color": true
            }
        }));
});

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.

mspec({

    // The MSpec bin folder or the full path of the console runner.
    // If not specified the MSpec bin folder must be in the `PATH`.
    executable: 'c:/Program Files/MSpec/bin',

    // The options below map directly to the MSpec console runner. See here
    // for more info: https://github.com/machine/machine.specifications#command-line-reference
    options: {
        // Filter file specifying contexts to execute (full type name, one per line). Takes precedence over tags.
        "filters": 'filters.txt',

        // Executes all specifications in contexts with these comma delimited tags. Ex. -include "foo, bar, foo_bar".
        "include": ['foo', 'bar'],

        // Exclude specifications in contexts with these comma delimited tags. Ex. -exclude "foo, bar, foo_bar".
        "exclude": ['foo', 'bar'],

        // Shows time-related information in HTML output.
        "timeinfo": true|false,

        // Suppress progress output (print fatal errors, failures and summary).
        "silent": true|false,

        // Print dotted progress output.
        "progress": true|false,

        // Suppress colored console output.
        "no-color": true|false,        

        // Wait 15 seconds for debugger to be attached.
        "wait": true|false,      

        // Reporting for TeamCity CI integration (also auto-detected).
        "teamcity": true|false,

        // Disables TeamCity autodetection.
        "no-teamcity-autodetect": true|false

        // Reporting for AppVeyor CI integration (also auto-detected).
        "appveyor": true|false

        // Disables AppVeyor autodetection.
        "no-appveyor-autodetect": true|false

        // Outputs the HTML report to path, one-per-assembly w/ index.html (if directory, otherwise all are in one file).
        "html": './output/results.html'

        // Outputs the XML report to the file referenced by the path.
        "xml": './output/results.xml'                
    }
});

Release Notes

0.1.0 (26 December 2015)

  • Initial release