public interface Loader
ExcelDataLoader - To load data from XLS filesXMLDataLoader - To load data from XML files. Look at the Schema for XML at :
https://github.com/EaseTech/easytest-core/blob/master/src/main/resources/testDataSchema.xsdCSVDataLoader - To load data from a CSV file
In addition users can define their own custom Loaders and use them in their test
classes by specifying the LoaderType.CUSTOM loader type in their DataLoader annotation| Modifier and Type | Field and Description |
|---|---|
static String |
ACTUAL_RESULT
The key identifying the actual output result that needs to be written to the file.
|
static String |
AMPERSAND
The ampersand sign
|
static String |
COMMA
Comma
|
static String |
DOUBLE_QUOTE
Double Quote String
|
static String |
DURATION
The key identifying the Test Duration in milli seconds
|
static String |
EMPTY_STRING
Constant for empty string
|
static String |
EXPECTED_RESULT
The key identifying the expected output that needs to be compared with actual result
|
static String |
SINGLE_QUOTE
Single Quote
|
static String |
TEST_FAILED |
static String |
TEST_PASSED
The constants for test status PASSED/FAILED
|
static String |
TEST_STATUS
The key identifying the Test Status either PASSED/FAILED
determined after comparing expected and actual results, and written to the file.
|
| Modifier and Type | Method and Description |
|---|---|
Map<String,List<Map<String,Object>>> |
loadData(Resource resource)
Method responsible to Load the test data from the
Resource instance passed as parameter |
void |
writeData(Resource resource,
Map<String,List<Map<String,Object>>> actualData,
String... methodNames)
Method responsible for writing the test data and actual result back to the file
|
static final String ACTUAL_RESULT
static final String EXPECTED_RESULT
static final String EMPTY_STRING
static final String DOUBLE_QUOTE
static final String SINGLE_QUOTE
static final String AMPERSAND
static final String COMMA
static final String TEST_STATUS
static final String DURATION
static final String TEST_PASSED
static final String TEST_FAILED
Map<String,List<Map<String,Object>>> loadData(Resource resource)
Resource instance passed as parameterresource - from which to load the datavoid writeData(Resource resource, Map<String,List<Map<String,Object>>> actualData, String... methodNames)
resource - the resource to which data needs to be writtenmethodNames - the names of the method to write the data foractualData - a Map consisting of the methodName as key and a List of Key/value pairs as the value of the Map.
This Map contains the input as well as output data
This is currently not a user friendly way of exposing the test data.Copyright © 2014. All rights reserved.