.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:
suiteconfigis the name of a Suite Configuration File
- The
Runnertag indicates the class that runs the tests:fitnesse.fitserver.FitServerfor Fit tests orfitSharp.Slim.Service.Runnerfor Slim tests. - The
AddAssemblytag loads assemblies that contain our fixtures and system under test. - The
AddNamespacetag specifies the namespaces used by our fixtures and system under test. - .NET Framework only: The
ConfigurationFiletag 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 assembliesdefinition specifies a list of assemblies to load, seperated by ';'. - The
-r runnerClasscommand switch indicates the class that runs the tests. - .NET Framework only: The
-a appConfigFilecommand 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}