Skip to content
Henrik Feldt edited this page Feb 5, 2018 · 7 revisions

Deprecated!

Use system to run nunit-console, or even better, migrate to Expecto — smooth testing

v2 docs follow

test_runner :tests do |tests|
  tests.files = FileList['**/*.Tests/bin/Release/*.Tests.dll'] # dll files with test
  tests.exe = 'src/packages/NUnit.Runners.2.5.3/tools/nunit-console.exe' # executable to run tests with
  tests.add_parameter '/TestResults=Lallaa.xml' # you may add parameters to the execution
  tests.copy_local # when running from network share
  tests.is_ms_test # idenifies that the dlls found in tests.files are mstest compliled libraries
  tests.native_exe # when you don't want to use 'mono' as the native executable on non-windows systems
  tests.execute_as_batch # run the exe on all the files at once
end

Properties

files

An Enumerable of files to test

exe

An executable to run with mono or on .Net. (also see the native_exe method)

copy_local

When running from a network share or you want to shadow-copy the DLLs to a temporary folder.

execute_as_batch

Causes the exe to be run once, processing all the test files in a batch. (Without this, Albacore will run the exe multiple times, once per file in files.)

This option is not compatible with either copy_local or is_ms_test.

Methods

#native_exe

When you don't want Albacore to use the 'mono' executable to run your passed exe. Usually, if you're using distribution-packages nunit-console.exe, wrappers around the CIL binary would be added by the package system. However, often you're using nugets ending with "Tools" and then you're just getting the CIL-binary into your packages/ folder and want Albacore to explicitly call the exe with mono.

Clone this wiki locally