fitSharp is a set of open-source functional testing tools for .NET, inspired by the Framework for Integrated Test (Fit). It provides Fit, Slim, and DbFit support and can run .NET fixtures from FitNesse.
Add the package to a .NET project:
dotnet add package FitSharpThe package contains the fitSharp libraries and runners. FitNesse starts the appropriate runner to execute fixtures in your .NET assemblies.
Configure FitNesse with a command pattern, a test runner, and a fitSharp suite configuration file. For modern .NET:
!define COMMAND_PATTERN {%m path\to\Runner.dll -c path\to\suite.config.xml %p}
!define TEST_RUNNER {dotnet}
For .NET Framework 4.8:
!define COMMAND_PATTERN {%m -c path\to\suite.config.xml %p}
!define TEST_RUNNER {path\to\Runner.exe}
The suite configuration selects the Fit or Slim runner and identifies fixture assemblies and namespaces. See Run tests with FitNesse for the complete setup.
The canonical build runs on Windows and targets:
- .NET Framework 4.8
- .NET 8+
- Windows-specific variants of .NET 8+
Install the .NET Framework 4.8 Developer Pack and the .NET 8 through 11 SDKs.
The repository's global.json currently pins a prerelease .NET
11 SDK and allows roll-forward to a later major prerelease SDK. The
CI workflow is the reference environment.
Run commands from the repository root:
# Restore
dotnet msbuild -target:restore .\build.proj
# Build the solution in Debug configuration
dotnet msbuild -target:solution .\build.proj
# Run unit tests
dotnet msbuild -target:unittests .\build.proj
# Run story tests
dotnet msbuild -target:storytests .\build.projThe test targets build the solution before running their tests. Each test
command uses dotnet test -m:1 to match CI.
Release versions are maintained manually in
nuget\FitSharp.nuspec. Update the version there,
then create the release build and NuGet package with:
dotnet msbuild -target:package .\build.projThe package target restores and builds the solution in Release configuration,
recreates the package staging directory, validates the required build outputs,
and writes nuget\FitSharp.<version>.nupkg.
Deploying creates the package and copies it to binary:
dotnet msbuild -target:deploy .\build.projOpen fitSharp.sln in Visual Studio or use the commands above.
The main projects are:
source\fitSharp: shared runtime and infrastructuresource\fit: Fit and DbFit implementationsource\Runner: command-line runnersource\RunnerW: Windows GUI runnersource\fitSharpTest,source\fitTest, andsource\StoryTest: automated tests
To debug Slim fixtures launched by FitNesse, set TEST_RUNNER to RunnerW.exe,
start the test, attach the debugger while RunnerW waits, and then select Go.
Use a SLIM_PORT other than the default value 1. See
Debugging fixtures
for details.
Work derived from the original Fit, FitLibrary, and DBFit projects is covered by
the GNU General Public License. This includes fit.dll and
dbfit*.dll.
Original work on fitSharp is covered by the Common Public License. This includes the other executables.