Skip to content

Faker Actions related to Back to the future

characterBackToTheFuture

Description: This function will generate a random back To The Future Character

Input Format : DatasheetName:ColumnName

ObjectName Action Input Condition Reference
Synthetic Data 🟢 characterBackToTheFuture DatasheetName:ColumnName ⬅ Store in Datasheet
@Action(object = ObjectType.FAKER, desc = "Generate a character name from Back to the Future", input = InputType.YES, condition = InputType.NO)
    public void characterBackToTheFuture() {
        try {
            String strObj = Input;
            String character = faker.get(key).backToTheFuture().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);
        }
    }

quoteBackToTheFuture

Description: This function will generate a random back To The Future quote

Input Format : DatasheetName:ColumnName

ObjectName Action Input Condition Reference
Synthetic Data 🟢 quoteBackToTheFuture DatasheetName:ColumnName ⬅ Store in Datasheet
@Action(object = ObjectType.FAKER, desc = "Generate a quote from Back to the Future", input = InputType.YES, condition = InputType.NO)
    public void quoteBackToTheFuture() {
        try {
            String strObj = Input;
            String quote = faker.get(key).backToTheFuture().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);
        }
    }

dateBackToTheFuture

Description: This function will generate a random back To The Future date

Input Format : DatasheetName:ColumnName

ObjectName Action Input Condition Reference
Synthetic Data 🟢 dateBackToTheFuture DatasheetName:ColumnName ⬅ Store in Datasheet
@Action(object = ObjectType.FAKER, desc = "Generate a date from Back to the Future", input = InputType.YES, condition = InputType.NO)
    public void dateBackToTheFuture() {
        try {
            String strObj = Input;
            String date = faker.get(key).backToTheFuture().date();
            Report.updateTestLog(Action, "Generated data: " + date, Status.DONE);
            String sheetName = strObj.split(":", 2)[0];
            String columnName = strObj.split(":", 2)[1];
            userData.putData(sheetName, columnName, date);
        } 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);
        }
    }