Class UnitTestSuiteBase
- Namespace
- HP.LFT.UnitTesting
- Assembly
- HP.LFT.UnitTesting.dll
The base class of the FTD Visual Studio template classes that are provided when creating a new test project.
public class UnitTestSuiteBase
- Inheritance
-
UnitTestSuiteBase
- Derived
- Inherited Members
Remarks
This class encapsulates all the functionality related to running tests and creating the HTML report.
Constructors
UnitTestSuiteBase()
public UnitTestSuiteBase()
Methods
GetConfigurationAssembly()
Returns the Assembly for the currently loaded configuration.
protected virtual Assembly GetConfigurationAssembly()
Returns
Remarks
By default, returns the Assembly representing the app.config of the current assembly.
When overriding, you can provide a Assembly instance with the assembly of another test, for example a central settings assembly that all tests use.
GetReportConfiguration()
Returns a HP.LFT.Report.Configuration.ReportConfiguration instance with the values from the 'App.config' of the assembly returned by GetConfigurationAssembly().
protected virtual ReportConfiguration GetReportConfiguration()
Returns
Remarks
By default, returns the ReportConfiguration representing the Report section of app.config from the current assembly.
When overriding, you can provide a ReportConfiguration instance with the assembly of another test, for example a central settings assembly that all tests use.
GetSdkConfiguration()
Returns an SdkConfiguration instance with the values from the 'App.config' of the assembly returned by GetConfigurationAssembly().
protected virtual SdkConfiguration GetSdkConfiguration()
Returns
Remarks
By default, returns the SdkConfiguration representing the SDK section of app.config from the current assembly.
When overriding, you can provide a SdkConfiguration instance with the assembly of another test, for example a central settings assembly that all tests use.
Init(string)
Initializes the SDK and the Reporter.
protected virtual void Init(string frameworkWorkDir)
Parameters
frameworkWorkDirstring
TestSuiteSetup(string)
This method is called by FTD Visual Studio templates' GlobalSetup to initialize the test class.
protected virtual void TestSuiteSetup(string directoryFromContext = null)
Parameters
directoryFromContextstring
TestSuiteTearDown()
This method is called by FTD Visual Studio templates' GlobalTeardown to clean up the test class.
protected virtual void TestSuiteTearDown()