Giter Site home page Giter Site logo

grunt-nunit-runner's Introduction

grunt-nunit-runner Build Status NPM version

Grunt plugin for running NUnit. NOTE: this plugin requires Grunt 0.4.x.

Getting Started

From the same directory as your project's Gruntfile and package.json, install this plugin with the following command:

$ npm install grunt-nunit-runner --save-dev

Next add this line to your project's Gruntfile:

grunt.loadNpmTasks('grunt-nunit-runner');

Config

Inside your Gruntfile.js file, add a section named nunit, containing the test runner configuration:

nunit: {
    options: {

        // The path to the NUnit bin folder. If not specified the bin
        // folder must be in the system path.
        path: 'c:/Program Files/NUnit/bin',

        // Runs the anycpu or x86 build of NUnit. Default is anycpu. 
        // http://www.nunit.org/index.php?p=nunit-console&r=2.6.3
        platform: 'anycpu|x86',

        // Can be solutions, projects or individual assemblies. Solutions 
        // are searched for projects referencing nunit.framework.dll.
        files: ['src/MySolution.sln', 
                'src/Tests/Tests.csproj', 
                'src/Tests/bin/Debug/Tests.dll'],

        // Integrate test output with TeamCity.
        teamcity: true|false,

        // The options below map directly to the NUnit console runner. See here
        // for more info: http://www.nunit.org/index.php?p=consoleCommandLine&r=2.6.3

        // Name of the test case(s), fixture(s) or namespace(s) to run.
        run: ['TestSuite.Unit', 'TestSuite.Integration'],

        // Name of a file containing a list of the tests to run, one per line.
        runlist: 'TestsToRun.txt',

        // Project configuration (e.g.: Debug) to load.
        config: 'Debug',

        // Name of XML result file (Default: TestResult.xml)
        result: 'TestResult.xml',

        // Suppress XML result output.
        noresult: true|false,

        // File to receive test output.
        output: 'TestOutput.txt',

        // File to receive test error output.
        err: 'TestErrors.txt',

        // Work directory for output files.
        work: 'BuildArtifacts',

        // Label each test in stdOut.
        labels: true|false,

        // Set internal trace level.
        trace: 'Off|Error|Warning|Info|Verbose',

        // List of categories to include.
        include: ['BaseLine', 'Unit'],

        // List of categories to exclude.
        exclude: ['Database', 'Network'],

        // Framework version to be used for tests.
        framework: 'net-1.1',

        // Process model for tests.
        process: 'Single|Separate|Multiple',

        // AppDomain Usage for tests.
        domain: 'None|Single|Multiple',

        // Apartment for running tests (Default is MTA).
        apartment: 'MTA|STA',

        // Disable shadow copy when running in separate domain.
        noshadow: true|false,

        // Disable use of a separate thread for tests.
        nothread: true|false,

        // Base path to be used when loading the assemblies.
        basepath: 'src',

        // Additional directories to be probed when loading assemblies.
        privatebinpath: ['lib', 'bin'],

        // Set timeout for each test case in milliseconds.
        timeout: 1000,

        // Wait for input before closing console window.
        wait: true|false,

        // Do not display the logo.
        nologo: true|false,

        // Do not display progress.
        nodots: true|false,

        // Stop after the first test failure or error.
        stoponerror: true|false,

        // Erase any leftover cache files and exit.
        cleanup: true|false

    }
}

License

MIT License

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.