UnitTestBase Class
The base class of the UFT Developer Visual Studio template classes that are provided when creating a new UFT Developer test project.
Remarks
This class encapsulates all the functionality related to running UFT Developer tests and creating the UFT Developer HTML report.

C# Syntax

public abstract class UnitTestBase : UnitTestSuiteBase 
Inheritance Hierarchy

System.Object
   HP.LFT.UnitTesting.UnitTestSuiteBase
      HP.LFT.UnitTesting.UnitTestBase
         HP.LFT.UnitTesting.NUnit3UnitTestBase

Public Properties
 NameDescription
Public PropertyALMThe default ALM data-source for data-driven UFT Developer tests. Use for NUnit 2.6x tests.  
Public Propertystatic (Shared in Visual Basic)ALMStaticThe static ALM data-source for data-driven UFT Developer tests. Use for NUnit 3.x tests.  
Public PropertyReporterReturns the Reporter of type used for reporting events.  
Top
Protected Methods
 NameDescription
Protected MethodGetAlternativeClassNameReturns the alternative Class name that is used whenever framework errors occur.  
Protected MethodGetAlternativeTestNameReturns the alternative Test name that is used whenever framework errors occur.  
Protected MethodGetClassNameThis method is implemented in UFT Developer Visual Studio templates to get the running class name provided by the selected framework (NUnit/MSTest) TestContext.  
Protected MethodGetConfigurationAssemblyReturns theSystem.Reflection.Assemblyfor the currently loaded configuration. (Inherited from HP.LFT.UnitTesting.UnitTestSuiteBase )
Protected MethodGetFrameworkTestResultThis method is implemented in UFT Developer Visual Studio templates to get the running test/class status provided by the selected framework (NUnit/MSTest) TestContext.  
Protected MethodGetReportConfigurationReturns a HP.LFT.Report.Configuration.ReportConfigurationHP.LFT.UnitTesting.UnitTestSuiteBase . (Inherited from UnitTestSuiteBase.GetConfigurationAssembly instance with the values from the 'App.config' of the assembly returned by )
Protected MethodGetSdkConfigurationReturns an instance with the values from the 'App.config' of the assembly returned byUnitTestSuiteBase.GetConfigurationAssembly . (Inherited from HP.LFT.UnitTesting.UnitTestSuiteBase)
Protected MethodGetTestNameThis method is implemented in UFT Developer Visual Studio templates to get the running test name provided by the selected framework (NUnit/MSTest) TestContext.  
Protected MethodGetTestParametersThis method is implemented in UFT Developer Visual Studio template to get the running test parameters provided by MSTest TestContext.  
Protected MethodTestSetUpThis method is called by UFT Developer Visual Studio templates' BasicSetUp, which runs before each test method.  
Protected MethodTestSuiteSetupOverridden. This method is called by UFT Developer Visual Studio templates' GlobalSetup to initialize the test class. This method is called by UFT Developer Visual Studio templates' GlobalSetup to initialize the test class.  
Protected MethodTestSuiteTearDownThis method is called by UFT Developer Visual Studio templates' GlobalTeardown to clean up the test class. (Inherited from HP.LFT.UnitTesting.UnitTestSuiteBase )
Protected MethodTestTearDownThis method is called by UFT Developer Visual Studio templates' BasicTearDown, which runs after each test method.  
Top