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-mstest

v1.0.0

Published

Gulp wrapper for executing mstest

Downloads

1,357

Readme

gulp-mstest

Gulp wrapper for running MSTest

Usage

Use gulp-mstest like any other gulp plugin:

ES5

var gulp = require('gulp'),
	mstest = require('gulp-mstest').default;

gulp.task('mstest', function () {
  return gulp.src(['mytestlibrary.dll'])
  .pipe(mstest());
});

ES2015

import gulp from 'gulp';
import mstest from 'gulp-mstest';

gulp.task('mstest', () => gulp.src(['mstestlibrary.dll'])
						  .pipe(mstest()));

###Options Gulp-Mstest has a few minor settings that determine what gets output to the console. By default, nothing is printed to the console -- you will need to tie in another stream to get output. This is beneficial because it allows you to put the test results wherever you want (e.g. file, console, web service, etc.). However, if you'd like to have output, here are the settings to do so:

  • outputEachResult: This will output the pass or fail status of each test as it is run
    • Example: 'Passed: MyUnitTest'
  • errorMessage: This will output the full error message generated from mstest as each test is run. outputEachResult must be set to true for these to be output.
  • errorStackTrace: This will output the full stack trace generated from mstest as each test is run. outputEachResult must be set to true for these to be output.
  • outputFinalCount: This will output the total number of tests that passed
    • Example: 'Passed 3/5'
  • quitOnFailed: This causes gulp-mstest to use a gulp plugin error if any of the tests in a dll failed to pass. This is useful when there are multiple test packages that must run and you want to be notified as soon as one fails.
    • If errorMessage or errorStackTrace are on, they will be output with the failed message
  • language: if you mstest.exe is non-english, change your language (ie. language='fr'). see mstest to see available language.

In addition to the above settings, all settings available to the mstest npm package will be passed through to the mstest library.

One change will allow you to use a special key "!source" to indicate to the library that the working directory should be set to the same directory as the test library. This will default to "." if no directory is passed in as a part of the test file path. For example, the path "D:\code\tests\bin\Debug\mylibrary.tests.dll" will set the working directory to "D:\code\tests\bin\Debug". The path of just "mylibrary.tests.dll" will set the working directory to ".".