|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
public interface Loader
An interface for different types of loader. This would ultimately be used by the users of EasyTest as well to provide their custom Loaders. Currently, EasyTest supports three Loaders internally :
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
| Field Summary | |
|---|---|
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. |
| Method Summary | |
|---|---|
Map<String,List<Map<String,Object>>> |
loadData(Resource resource)
Method responsible to Load the test data from the list of files 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 |
| Field Detail |
|---|
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
| Method Detail |
|---|
Map<String,List<Map<String,Object>>> loadData(Resource resource)
resource - from which to load the data
void 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.
|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||