-
Notifications
You must be signed in to change notification settings - Fork 71
XUnitTask
The XUnitTask is designed to run tests written with the xunit test framework.
There are only a few pieces of information needed for the XUnitTask to operate correctly. Most notably are the path to the xunit-console executable, and a list of assemblies for xunit to run tests against.
For example
desc "XUnit Test Runner Example"
xunit do |xunit|
xunit.command = "XUnit/xunit.console.exe"
xunit.assembly = "assemblies/TestSolution.XUnitTests.dll"
end
You must provide the location of the xunit console executable either through the constructor or via the .command setting.
You must provide a single assembly or array of assemblies for xunit to run. These should be assemblies that contain your [Fact]s. The xUnit runner does not allow more than one assembly to be specified, so command
will be started for each individual assembly.
You can specify additional parameters for the xunit 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.
xunit.options '/someoption', '/anotheroption'
You can specify the folder to write an html report of the tests to.
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.