public class CsvReader extends Object
| Modifier and Type | Field and Description |
|---|---|
static int |
SERVICE_CSV_COLUMN_COUNT |
static String |
SERVICE_CSV_FILE_PREFIX |
| Constructor and Description |
|---|
CsvReader() |
| Modifier and Type | Method and Description |
|---|---|
static void |
getAllKeywords()
gets all keywords And stores them in apiMap in testObject
|
static void |
getAllTestCases(String testPath,
String prefix)
gets all test cases from testcase path based on prefix
|
static int |
getColumnIndexByName(String column,
String[] row)
gets column name by the column name
|
static int |
getCsvFileCount() |
static String |
getCsvFileFromIndex(int index)
returns current csv test file
|
static int |
getCsvFileIndex(String fileName)
returns the index of the file from the list of csv files
|
static ArrayList<File> |
getCsvFileList()
returns a list of all csv test files
|
static int |
getCsvTestcount()
get the number of tests in csv file
|
static List<String[]> |
getCsvTestList(File file) |
static List<String[]> |
getCsvTestListForTestRunner(String csvFile)
gets csv tests list for api tests
|
static int |
getCurrentTestInvocation()
gets csv file index does not increment When retry
|
static int |
getFileIndex(ArrayList<File> testCsvFileList,
String csvFile) |
static List<Object[]> |
getTestCasesFromCsvFile()
gets the tests from csv file based on the current test file index
|
static boolean |
isRunningServiceTest() |
static Map<String,ServiceObject> |
mapToApiObject(List<String[]> testCases)
maps list of testcases to api object map
|
static ServiceObject |
mapToApiObject(Object[] testData) |
public static int SERVICE_CSV_COLUMN_COUNT
public static String SERVICE_CSV_FILE_PREFIX
public static List<Object[]> getTestCasesFromCsvFile()
public static Map<String,ServiceObject> mapToApiObject(List<String[]> testCases)
testCases - public static ServiceObject mapToApiObject(Object[] testData)
public static void getAllTestCases(String testPath, String prefix)
public static void getAllKeywords()
public static int getCurrentTestInvocation()
public static boolean isRunningServiceTest()
public static String getCsvFileFromIndex(int index)
public static int getCsvFileCount()
public static ArrayList<File> getCsvFileList()
public static int getCsvFileIndex(String fileName)
fileName - public static List<String[]> getCsvTestListForTestRunner(String csvFile)
csvFile - public static int getColumnIndexByName(String column, String[] row)
column: - column namerow: - header rowpublic static int getCsvTestcount()
Copyright © 2019. All rights reserved.