10_GettingStarted

Thorsten Lorenz edited this page Nov 29, 2010 · 3 revisions

Getting started with FSharpSpec

Obtaining FSharpSpec

  • Download latest release

    1. Click on the Downloads button and select the latest release
    2. Unzip.
  • Build from Source

    1. clone its Git repository available via:

      git clone git://github.com/thlorenz/FSharpSpec.git

    2. Build the FSharpSpec solution

    3. Run bundle.ps1 via PowerShell to collect all necessary files into the "bundle" folder

Referencing FSharpSpec in your projects

In your test projects you only need to reference the FSharpSpec.dll

Running specifications

Assuming you have written some specifications, you can run them as follows:

FSharpSpec comes with the FSharpSpec.ConsoleRunner.

Usage: FsharpSpec.ConsoleRunner [options] [FullPath1 FullPath2 ...]

FullPath: The full path to the assembly containing the specifications to run

Options:
    -help:      prints this help
    -silent:    supresses printing out of the detailed specification tree

Example

Assuming you compiled a test project to "c:\dev\mycoolproject\thespecs.dll", run the specs as follows:

FSharpSpec.ConsoleRunner c:\dev\mycoolproject\thespecs.dll

Running from inside VisualStudio

Currently there are two ways to run FSharpSpecs from inside Visual Studio

  1. Using External commands as explained here.
  2. Via the TDNetRunner as explained here