-
Notifications
You must be signed in to change notification settings - Fork 0
NUnit Task
The NUnitTask is designed to run tests written with the nunit test framework.
There are only a few pieces of information needed for the NUnitTask to operate correctly. Most notably are the path to the nunit-console executable, and a list of assemblies for nunit to run tests against.
For example
desc "NUnit Test Runner Example"
nunit do |nunit|
nunit.command = "NUnit/nunit-console.exe"
nunit.assemblies "assemblies/TestSolution.Tests.dll"
end
You must provide the location of the nunit console executable either through the constructor or via the .command setting.
You must provide at least one assembly for nunit to run. This should be the assembly that contains your [TestFixture]s and [Test]s.
You can wholesale replace the assemblies list with an array of dlls, or you can append individual dlls to the list. The following examples produce the same results.
Specify an array of assemblies
nunit.assemblies 'some.test.dll', 'another.test.dll', 'stillmore.tests.dll'You can specify additional parameters for the nunit executable here. If the options require a “/”, “-”, or any other special character, be sure to include that in the option.
Like the assemblies setting, options is an array that can be wholesale replaced or appended to.
nunit.options '/someoption', '/anotheroption'A particularly useful way of using the options parameter is to set the name of the xml report NUnit generates.
nunit.options '/xml=MyProject.Tests-results.xml'This task supports configuration via an external YAML file. For more information, see the yamlconfig page.
This task supports additional command line options, including a .parameters collection for passing in options that are not directly supported. For more information, see the commandline task options documentation.
- Build-Server Integration
- Command Line Task Options
- Configuration
- Custom Tasks
- Logging Options
- Sample Usages
- Task Arguments and Rakefile Parameters
- YAML Configuration
- ASP.NET Compiler - ASP.Net website compiler
- Assembly Info Generator - generate assembly info dynamically
- CSC - C# compiler
- Exec - Execute arbitrary cmd
- Fluent Migrator - Run FluentMigrator on migration library
- ILMerge - Merge dll/exe-s together
- MSBuild and XBuild - Compile a .sln-file or a MsBuild xml-file
- MSpec - Test using MSpec (machine.specifications)
- MSTest - Test using Microsoft Test Framework
- NAnt - Run a NAnt script
- NChurn - Calculate per-file churn
- NCover Console - Run NCover for tests/library
- NCover Reports - Generate a report from a coverage run
- NDepend - Run NDepend to check static code metrics
- NuGet Install - Install NuGet packages
- NuGet Pack - Create NuGet packages
- NuGet Push - Push NuGet packages to official MS repo
- NuGet Publish - Publish NuGet packages
- NUnit - Test using NUnit
- NuSpec - Generate a NuSpec file
- Output - File copying and template expansion
- PLink - SSH into a remote computer and run a command
- SQLCmd - Run a SQL command as a part of your build process
- UnZip - Unzip a directory
- XBuild - Run XBuild (will be merged into MsBuild)
- XUnit - Test using XUnit
- Zip - Zip a directory or files
- Edit the Wiki Locally - How to edit the wiki without using Github's interface
- How to Build Albacore
- How to Contribute