Skip to content
A gradle plugin for launching NUnit tests
Branch: master
Clone or download
Fetching latest commit…
Cannot retrieve the latest commit at this time.
Type Name Latest commit message Commit time
Failed to load latest commit information.
appveyor.yml Added appveyor/travis config May 26, 2015
gradlew Fix msbuild plugin id Oct 27, 2017

gradle-nunit-plugin Build status Build Status

A gradle plugin for launching NUnit tests

It is compatible with the new plugin mechanism and can be used with:

plugins {
  id 'com.ullink.nunit' version '1.12'

Or, when using Gradle lower than 2.1:

buildscript {
    repositories {

    dependencies {
        classpath "com.ullink.gradle:gradle-nunit-plugin:1.12"

It creates a task 'nunit' that may be configured as follows:

nunit {
    // optional - defaults to '3.10.0', but plugin is compatible with v3+ as well
    // for compatibility reason, nunitVersion should be set (if needed) before applying version specific parameters
    // optional - defaults to ''
    // optional - defaults to NUNIT_HOME env variable if set or to a downloaded version of NUnit fitting the
    // specified nunitVersion
    // mandatory - the assemblies containing the tests to be run
    // optional - the output location of the nunit test report, defaults to 'build\nunit\reports'
    reportFolder = file('some/where/')
    // optional - the file name of the nunit test report, defaults to 'TestResult.xml'
    reportFileName = 'foo.xml'
    // optional - if set, specifies the /trace argument of nunit-console
    // optional - defaults to FALSE and determines whether tests should run in x86 mode
    // optional - defaults to FALSE and termines the behavior of the task if the nunit-console.exe program exits
    // abnormally
    ignoreFailures = false
    // optional - specify whether to write test case names to the output
    labels = 'Off|On|All'
    // Mapped NUnit-Console Command Line Options
    exclude = 'Database'
    include = 'BaseLine'
    // for NUnit v3+, use _where_ option instead of include/exclude
    framework = 'net-1.1'
    shadowCopy = true
    // redirect output to file
    logFile = 'TestOutput.log'

    // for NUnit v3+
    resultFormat = 'nunit2'

    // environment variables map (already defined)
    env = [:]

    // optional - if set, can overwrite the default command arguments in order to allow running of external tools like dotMemoryUnit
    nunitCommandModifier = { nunitBin, args -> [nunitBin, *args] }


All these plugins are licensed under the Apache License, Version 2.0 with no warranty (expressed or implied) for any purpose.

You can’t perform that action at this time.