Open topic with navigation

com.hp.lft.unittesting

## Class TestNgUnitTestBase

- java.lang.Object
- - com.hp.lft.unittesting.UnitTestBase
  - - com.hp.lft.unittesting.TestNgUnitTestBase

- Direct Known Subclasses:
    TestNgCucumberUnitTestBase

      public abstract class TestNgUnitTestBase
      extends UnitTestBase

  The base class of the LeanFT TestNG Eclipse template classes provided when creating a new LeanFT project.

- - ### Constructor Summary

    Constructor and Description
    `TestNgUnitTestBase()`

  - ### Method Summary

    Modifier and Type | Method and Description
    --- | ---
    `protected static java.lang.String` | `buildFullTestMethodName(java.lang.String methodName, java.lang.Object[] params)`
    `protected void` | `classSetup(java.lang.String[] context)`
    `protected void` | `classTearDown()` This method is called by LeanFT Eclipse templates to clean up the test class.
    `protected static java.lang.Iterable<java.lang.String[]>` | `getAlmData()` Returns the collection of parameterized test parameter values extracted from data resource on ALM server.
    `protected java.lang.String` | `getMethodName(java.lang.reflect.Method method, java.lang.Object[] arguments)`
    `protected void` | `suiteSetup()`
    `protected void` | `suiteTearDown()`
    `protected void` | `testSetup(java.lang.String[] context)`

    - ### Methods inherited from class com.hp.lft.unittesting.UnitTestBase

      `classSetup, getAlternativeClassName, getAlternativeTestName, getClassName, getDefaultReportConfiguration, getFrameworkClassName, getFrameworkClassName, getFrameworkTestName, getFrameworkTestName, getReportConfiguration, getReportConfigurationFromExternalPropertiesFile, getReportConfigurationFromResourcesPropertiesFile, getReporter, getSDKConfiguration, getTestName, innerClassSetup, parameterizedTestSetup, setStatus, setStatus, testSetup, testTearDown, testTearDownNoThrow`

    - ### Methods inherited from class java.lang.Object

      `clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait`

- - ### Constructor Detail

    - #### TestNgUnitTestBase

          public TestNgUnitTestBase()

  - ### Method Detail

    - #### suiteSetup

          protected void suiteSetup()
                             throws java.lang.Exception

      Throws:
        `java.lang.Exception`

    - #### suiteTearDown

          protected void suiteTearDown()
                                throws java.lang.Exception

      Throws:
        `java.lang.Exception`

    - #### classSetup

          protected void classSetup(java.lang.String[] context)
                             throws java.lang.Exception

      Throws:
        `java.lang.Exception`

    - #### classTearDown

          protected void classTearDown()

      Description copied from class: `UnitTestBase`
      This method is called by LeanFT Eclipse templates to clean up the test class.
      Overrides:
        `classTearDown` in class `UnitTestBase`

    - #### testSetup

          protected void testSetup(java.lang.String[] context)

    - #### buildFullTestMethodName

          protected static java.lang.String buildFullTestMethodName(java.lang.String methodName,
                                                                    java.lang.Object[] params)

    - #### getMethodName

          protected java.lang.String getMethodName(java.lang.reflect.Method method,
                                                   java.lang.Object[] arguments)

    - #### getAlmData

          protected static java.lang.Iterable<java.lang.String[]> getAlmData()
                                                                      throws java.lang.Exception

      Returns the collection of parameterized test parameter values extracted from data resource on ALM server.
      Returns:
        the collection of parameterized test parameter values extracted from data resource on ALM server.
      Throws:
        `java.lang.Exception` - if error occurs in the ALM Data process