fitSharp
Suite Configuration File
The execution environment for a suite of tests can be controlled by a suite configuration file. This is a way to consolidate configuration information into one place and to remove it from business-facing story tests. We specify the file in the command line for the fitSharp Runner with a -c switch:
c:\program files\fitsharp\runner -c c:\myfolder\mysuite.config.xml ...
To specify the file from FitNesse, we include it in the COMMAND_PATTERN definition:
!define COMMAND_PATTERN {%m -c c:\myfolder\mysuite.config.xml ...}
The execution environment is re-initialized at the beginning of each test, to preserve test independence. This means any changes made to configurable items during test execution will not be visible to other tests. The exception is the SuiteSetUp page which changes the configuration for all subsequent tests.

The file format is XML. Here is a sample showing the configurable items:
<suiteConfig>
    <System.AppDomainSetup>
        <ApplicationBase>myApp</ApplicationBase>
        <ConfigurationFile>myapp.config</ConfigurationFile>
    </System.AppDomainSetup>
    <ApplicationUnderTest>
        <AddAssembly>myTests.dll</AddAssembly>
        <AddOptionalAssembly>myOtherTests.dll</AddOptionalAssembly>
        <AddNamespace>myTests</AddNamespace>
    </ApplicationUnderTest>
    <Culture>
        <Name>en-US</Name>
    </Culture>
    <Settings>
        <ApartmentState>STA</ApartmentState>
        <Behavior>std</Behavior>
        <CodePage>1200</CodePage>
        <InputFolder>myInput</InputFolder>
        <OutputFolder>myOutput</OutputFolder>
        <Runner>fitSharp.Slim.Service.Runner</Runner>
        <XmlOutput>myResult.xml</XmlOutput>
    </Settings>
    <FileExclusions>
        <Add>^\.svn$</Add>
    </FileExclusions>
    <Slim.Operators>
        <Add>my.Custom.Operator</Add>
    </Slim.Operators>
    <Fit.Operators>
        <Add>my.Custom.Handler</Add>
        <Remove>fit.Operators.ExecuteError</Remove>
    </Fit.Operators>
</suiteConfig>
We can also include custom configuration set up by adding nodes in the format:
<Our.Class>
    <aMethod>aParameterValue</aMethod>
</Our.Class>
The standard configuration items are listed below.

Apartment State
The default COM apartment state is MTA. It can be set to STA when testing with software that requires this.

System.AppDomainSetup
This section describes the App Domain in which story tests are executed. Two frequently-used properties are:See the MSDN documentation for a complete list of properties for App Domain Setup.

ApplicationUnderTest
Assemblies and namespaces can be specified to be used when looking for fixture and domain classes.
Behavior
This is a comma-separated list of keywords to specify behavior that differs between different Fit versions.

These are the behavior keywords:The default behavior is the FitNesse parsing and naming behavior:We can also include a setting in the Runner.exe.config file.
<appSettings>
    <add key="fitVersion" value="std,fitlibrary1" />
</appSettings>

CodePage
The default code page for file I/O is 1252 (Windows encoding). It can be set to other values to process Unicode, UTF-8 and other encodings. See the MSDN documentation for code page values.

Culture
The name of the culture to use for test execution. The name "Invariant" can be used for the invariant culture.

FileExclusions
Regular expression patterns can be added to exclude files from Folder Runner processing.

InputFolder
The input folder for Folder Runner.

Fit.Operators/Slim.Operators
Operators can be added or removed from the list of Cell Operators used by Fit and Slim.

OutputFolder
The output folder for Folder Runner.

Runner
The class that executes the tests.

XMLOutput
The file name for recording test results in XML format from Folder Runner.
© Copyright Syterra Software Inc. All rights reserved.