.NET Framework
!define COMMAND_PATTERN {%m -c suiteconfig %p} !define TEST_RUNNER {pathToFitsharp\Runner.exe}
.NET Core
!define COMMAND_PATTERN {%m pathToFitSharp\Runner.dll -c suiteconfig %p} !define TEST_RUNNER {dotnet}
where:
suiteconfig
is the name of a Suite Configuration File
- The
Runner
tag indicates the class that runs the tests:fitnesse.fitserver.FitServer
for Fit tests orfitSharp.Slim.Service.Runner
for Slim tests. - The
AddAssembly
tag loads assemblies that contain our fixtures and system under test. - The
AddNamespace
tag specifies the namespaces used by our fixtures and system under test. - .NET Framework only: The
ConfigurationFile
tag contains the name of the App Config File used by our system under test.
<suiteConfig> <System.AppDomainSetup> <ConfigurationFile>myapp.config</ConfigurationFile> </System.AppDomainSetup> <ApplicationUnderTest> <AddAssembly>myTests.dll</AddAssembly> <AddNamespace>MyTests</AddNamespace> </ApplicationUnderTest> <Settings> <Runner>fitSharp.Slim.Service.Runner</Runner> </Settings> </suiteConfig>We need to make sure the FitNesse root (e.g., localhost:8080/root) doesn't contain Java paths. If we find the following, we remove them.
!path classes !path fitnesse.jar !path fitlibrary.jarWe can now run tests from the FitNesse wiki, or we can run FitNesse tests from the command line with the -c command line argument.
The following is deprecated and may be removed in a future release.
We can specify some of the items in the Suite Configuration File in an alternate way:
- The
!path assemblies
definition specifies a list of assemblies to load, seperated by ';'. - The
-r runnerClass
command switch indicates the class that runs the tests. - .NET Framework only: The
-a appConfigFile
command switch contains the name of the App Config File used by our system under test.
!path c:\mypath\myCode.dll !define COMMAND_PATTERN {%m -r fitnesse.fitserver.FitServer -a myapp.config -c mysuite.xml %p} !define TEST_RUNNER {c:\apps\fitsharp\Runner.exe}