public class ApiTestDriver extends Object
| Constructor and Description |
|---|
ApiTestDriver() |
| Modifier and Type | Method and Description |
|---|---|
String |
getClassName() |
static TestObject |
getParentTestObject() |
static TestObject |
getParentTestObject(ServiceObject serviceObject) |
static TestObject |
getParentTestObject(String parentId) |
static String |
getTestClass(ServiceObject serviceObject)
gets the test class based on the csv file name eg.
|
static String |
getTestClass(String csvFilename)
get test class name based on csv file name
|
static Object[] |
getTestData(Object[] testData)
get test data
if from data provider, then it will be the first item in object array
else it will be object array
|
void |
initTest(ServiceObject serviceObject)
initialized testInfo with testId as key runs before test adds current driver
info to test object note: each row in csv is treated as separate test, with
separate test object test logs And config are shared by test class object,
which is the csv file name
|
static boolean |
isCsvTestComplete()
returns true if all tests in current csv file are completed
|
static boolean |
isCsvTestComplete(ServiceObject service)
returns true if all tests in current csv file are completed
|
static boolean |
isCsvTestStarted()
returns true if tests in csv file are starting
|
static boolean |
isCsvTestStarted(int index)
returns true if tests in csv file are starting
|
static boolean |
isRunningServiceTest()
is service test running
|
static boolean |
isRunningServiceTest(Object[] testData) |
static boolean |
isRunningUITest() |
static void |
parentTrackChildTests()
store all child tests objects in parent object as list
|
static void |
setServiceTestName(Object[] testData)
set service test name based on test name specified in test data
|
static void |
setTestId(ServiceObject serviceObject) |
static void |
trackBatchTestLogs()
tracks test logs
getTestInfo().testLog: tracks logs of individual service tests
on test success or failure, contains all the logs of all tests for batch logging
|
public static void setTestId(ServiceObject serviceObject)
public static String getTestClass(ServiceObject serviceObject)
serviceObject - public static String getTestClass(String csvFilename)
csvFilename - public void initTest(ServiceObject serviceObject)
driverObject - public static TestObject getParentTestObject(ServiceObject serviceObject)
public static TestObject getParentTestObject(String parentId)
public static TestObject getParentTestObject()
public static void parentTrackChildTests()
public static void trackBatchTestLogs()
public static boolean isCsvTestComplete()
public static boolean isCsvTestComplete(ServiceObject service)
public static boolean isCsvTestStarted()
public static boolean isCsvTestStarted(int index)
public String getClassName()
public static boolean isRunningServiceTest()
public static boolean isRunningUITest()
public static boolean isRunningServiceTest(Object[] testData)
public static void setServiceTestName(Object[] testData)
testData - Copyright © 2020. All rights reserved.