Faker Actions related to Friends
characterFriends
Description: This function will generate a random character name from the TV show "Friends"
Input Format : DatasheetName:ColumnName
ObjectName | Action | Input | Condition | Reference | |
---|---|---|---|---|---|
Synthetic Data | characterFriends |
DatasheetName:ColumnName |
@Action(object = ObjectType.FAKER, desc = "Generate a random character name from the TV show \"Friends\"", input = InputType.YES, condition = InputType.NO)
public void characterFriends() {
try {
String strObj = Input;
String character = faker.get(key).friends().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);
}
}
locationFriends
Description: This function will generate a random location name from the TV show "Friends"
Input Format : DatasheetName:ColumnName
ObjectName | Action | Input | Condition | Reference | |
---|---|---|---|---|---|
Synthetic Data | locationFriends |
DatasheetName:ColumnName |
@Action(object = ObjectType.FAKER, desc = "Generate a random location from the TV show \"Friends\"", input = InputType.YES, condition = InputType.NO)
public void locationFriends() {
try {
String strObj = Input;
String location = faker.get(key).friends().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);
}
}
quoteFriends
Description: This function will generate a random quote from the TV show "Friends"
Input Format : DatasheetName:ColumnName
ObjectName | Action | Input | Condition | Reference | |
---|---|---|---|---|---|
Synthetic Data | quoteFriends |
DatasheetName:ColumnName |
@Action(object = ObjectType.FAKER, desc = "Generate a random quote from the TV show \"Friends\"", input = InputType.YES, condition = InputType.NO)
public void quoteFriends() {
try {
String strObj = Input;
String quote = faker.get(key).friends().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);
}
}