Table of Contents

Class UnitTestSuiteBase

The base class of the FTD Visual Studio template classes that are provided when creating a new test project. This class is used by NUnit 3 template base class SetupFixture.

Inheritance
UnitTestSuiteBase
Namespace: HP.LFT.UnitTesting
Assembly: HP.LFT.UnitTesting.dll
Syntax
public class UnitTestSuiteBase
Remarks

This class encapsulates all the functionality related to running tests and creating the HTML report.

Constructors

UnitTestSuiteBase()

Declaration
public UnitTestSuiteBase()

Methods

GetConfigurationAssembly()

Returns the Assembly for the currently loaded configuration.

Declaration
protected virtual Assembly GetConfigurationAssembly()
Returns
Type Description
Assembly

Assembly

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().

Declaration
protected virtual ReportConfiguration GetReportConfiguration()
Returns
Type Description
ReportConfiguration

ReportConfiguration

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().

Declaration
protected virtual SdkConfiguration GetSdkConfiguration()
Returns
Type Description
SdkConfiguration

SdkConfiguration

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.

Declaration
protected virtual void Init(string frameworkWorkDir)
Parameters
Type Name Description
string frameworkWorkDir

TestSuiteSetup(string)

This method is called by FTD Visual Studio templates' GlobalSetup to initialize the test class.

Declaration
protected virtual void TestSuiteSetup(string directoryFromContext = null)
Parameters
Type Name Description
string directoryFromContext

TestSuiteTearDown()

This method is called by FTD Visual Studio templates' GlobalTeardown to clean up the test class.

Declaration
protected virtual void TestSuiteTearDown()