Skip to content

rafasousa/grunt-xunit

 
 

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

25 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

grunt-xunit Build Status

Run xUnit tests using Grunt.

Getting Started

This plugin requires Grunt ~0.4.0

If you haven't used Grunt before, be sure to check out the Getting Started guide, as it explains how to create a Gruntfile as well as install and use Grunt plugins. Once you're familiar with that process, you may install this plugin with this command:

npm install grunt-xunit --save-dev

Once the plugin has been installed, it may be enabled inside your Gruntfile with this line of JavaScript:

grunt.loadNpmTasks('grunt-xunit');

xunit task

Run this task with the grunt xunit command.

Task targets, files and options may be specified according to the grunt Configuring tasks guide.

Example configuration

var path = require('path');
var _ = require('underscore');

var dir = path.resolve('../../Test/TestResults');

grunt.initConfig({
    xunit: {
        options: {
            parallel: "all",
            xml: path.join(dir, _.uniqueId('xunit-results-') + '.xml')
        },
        files: {
            src: 'Tests/bin/Debug/Tests.dll'
        }
    }
});

grunt-xunit comes with its own xunit console runner binary, which is the .NET 4 64 bit variant. To override this behaviour, set the runner option to the executeable path.

This task has been tested on Linux and Windows, but it should work on other operating systems where mono points to the mono executeable.

About

Run xUnit tests using Grunt

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages

  • JavaScript 93.3%
  • C# 6.7%