org.jboss.test.selenium.utils.testng
Class TestInfo

java.lang.Object
  extended by org.jboss.test.selenium.utils.testng.TestInfo

public final class TestInfo
extends Object

Obtains informations about status of test, obtains method names from test result.

Version:
$Revision$
Author:
Lukas Fryc

Field Summary
static Map<Integer,String> STATUSES
          Mapping of the status ids to string equivalents
 
Method Summary
static String getClassMethodName(org.testng.ITestResult result)
          Get class + method name from ITestResult
static String getClassName(org.testng.ITestResult result)
          Get class name from ITestResult
static String getContainingPackageName(org.testng.ITestResult result)
          Get last containing package name from ITestResult
static String getMethodName(org.testng.ITestResult result)
          Get method name from ITestResult
static String getPackageClassMethodName(org.testng.ITestResult result)
          Get package + class + method name from ITestResult
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

STATUSES

public static final Map<Integer,String> STATUSES
Mapping of the status ids to string equivalents

Method Detail

getPackageClassMethodName

public static String getPackageClassMethodName(org.testng.ITestResult result)
Get package + class + method name from ITestResult

Parameters:
result - from the fine-grained listener's method such as onTestFailure(ITestResult)
Returns:
the package + class + method name in current context

getClassMethodName

public static String getClassMethodName(org.testng.ITestResult result)
Get class + method name from ITestResult

Parameters:
result - from the fine-grained listener's method such as onTestFailure(ITestResult)
Returns:
the class + method name in current context

getMethodName

public static String getMethodName(org.testng.ITestResult result)
Get method name from ITestResult

Parameters:
result - from the fine-grained listener's method such as onTestFailure(ITestResult)
Returns:
the method name in current context

getClassName

public static String getClassName(org.testng.ITestResult result)
Get class name from ITestResult

Parameters:
result - from the fine-grained listener's method such as onTestFailure(ITestResult)
Returns:
the class name in current context

getContainingPackageName

public static String getContainingPackageName(org.testng.ITestResult result)
Get last containing package name from ITestResult

Parameters:
result - from the fine-grained listener's method such as onTestFailure(ITestResult)
Returns:
the package name in current context


Copyright © 2011 JBoss, a division of Red Hat, Inc.. All Rights Reserved.