Faker Actions related to Harry Potter
characterHarryPotter
Description: This function will generate a random character name from the Harry Potter series
Input Format : DatasheetName:ColumnName
ObjectName | Action | Input | Condition | Reference | |
---|---|---|---|---|---|
Synthetic Data | characterHarryPotter |
DatasheetName:ColumnName |
@Action(object = ObjectType.FAKER, desc = "Generate a random character name from the Harry Potter series", input = InputType.YES, condition = InputType.NO)
public void characterHarryPotter() {
try {
String strObj = Input;
String character = faker.get(key).harryPotter().character();
Report.updateTestLog(Action, "Generated data: " + character, Status.DONE);
String sheetName = strObj.split(":", 2)[0];
String columnName = strObj.split(":", 2)[1];
userData.putData(sheetName, columnName, character);
} catch (Exception ex) {
Logger.getLogger(this.getClass().getName()).log(Level.SEVERE, "Exception during data generation", ex);
Report.updateTestLog(Action, "Error generating data: " + "\n" + ex.getMessage(), Status.DEBUG);
}
}
locationHarryPotter
Description: This function will generate a random location from the Harry Potter series
Input Format : DatasheetName:ColumnName
ObjectName | Action | Input | Condition | Reference | |
---|---|---|---|---|---|
Synthetic Data | locationHarryPotter |
DatasheetName:ColumnName |
@Action(object = ObjectType.FAKER, desc = "Generate a random location from the Harry Potter series", input = InputType.YES, condition = InputType.NO)
public void locationHarryPotter() {
try {
String strObj = Input;
String location = faker.get(key).harryPotter().location();
Report.updateTestLog(Action, "Generated data: " + location, Status.DONE);
String sheetName = strObj.split(":", 2)[0];
String columnName = strObj.split(":", 2)[1];
userData.putData(sheetName, columnName, location);
} catch (Exception ex) {
Logger.getLogger(this.getClass().getName()).log(Level.SEVERE, "Exception during data generation", ex);
Report.updateTestLog(Action, "Error generating data: " + "\n" + ex.getMessage(), Status.DEBUG);
}
}
quoteHarryPotter
Description: This function will generate a random quote from the Harry Potter series
Input Format : DatasheetName:ColumnName
ObjectName | Action | Input | Condition | Reference | |
---|---|---|---|---|---|
Synthetic Data | quoteHarryPotter |
DatasheetName:ColumnName |
@Action(object = ObjectType.FAKER, desc = "Generate a random quote from the Harry Potter series", input = InputType.YES, condition = InputType.NO)
public void quoteHarryPotter() {
try {
String strObj = Input;
String quote = faker.get(key).harryPotter().quote();
Report.updateTestLog(Action, "Generated data: " + quote, Status.DONE);
String sheetName = strObj.split(":", 2)[0];
String columnName = strObj.split(":", 2)[1];
userData.putData(sheetName, columnName, quote);
} catch (Exception ex) {
Logger.getLogger(this.getClass().getName()).log(Level.SEVERE, "Exception during data generation", ex);
Report.updateTestLog(Action, "Error generating data: " + "\n" + ex.getMessage(), Status.DEBUG);
}
}
bookHarryPotter
Description: This function will generate a random book name from the Harry Potter series
Input Format : DatasheetName:ColumnName
ObjectName | Action | Input | Condition | Reference | |
---|---|---|---|---|---|
Synthetic Data | bookHarryPotter |
DatasheetName:ColumnName |
@Action(object = ObjectType.FAKER, desc = "Generate a random book name from the Harry Potter series", input = InputType.YES, condition = InputType.NO)
public void bookHarryPotter() {
try {
String strObj = Input;
String book = faker.get(key).harryPotter().book();
Report.updateTestLog(Action, "Generated data: " + book, Status.DONE);
String sheetName = strObj.split(":", 2)[0];
String columnName = strObj.split(":", 2)[1];
userData.putData(sheetName, columnName, book);
} catch (Exception ex) {
Logger.getLogger(this.getClass().getName()).log(Level.SEVERE, "Exception during data generation", ex);
Report.updateTestLog(Action, "Error generating data: " + "\n" + ex.getMessage(), Status.DEBUG);
}
}