Skip to content

Faker Actions related to Zelda

characterZelda

Description: This function will generate a random Zelda character

Input Format : DatasheetName:ColumnName

ObjectName Action Input Condition Reference
Synthetic Data 🟢 characterZelda DatasheetName:ColumnName ⬅ Store in Datasheet
@Action(object = ObjectType.FAKER, desc = "Generate a random Zelda character", input = InputType.YES, condition = InputType.NO)
    public void characterZelda() {
        try {
            String strObj = Input;
            String character = faker.get(key).zelda().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 Zelda quote: " + "\n" + ex.getMessage(), Status.DEBUG);
        }
    }

gameZelda

Description: This function will generate a random Zelda game

Input Format : DatasheetName:ColumnName

ObjectName Action Input Condition Reference
Synthetic Data 🟢 gameZelda DatasheetName:ColumnName ⬅ Store in Datasheet
@Action(object = ObjectType.FAKER, desc = "Generate a random Zelda game", input = InputType.YES, condition = InputType.NO)
    public void gameZelda() {
        try {
            String strObj = Input;
            String game = faker.get(key).zelda().game();
            Report.updateTestLog(Action, "Generated data: " + game, Status.DONE);
            String sheetName = strObj.split(":", 2)[0];
            String columnName = strObj.split(":", 2)[1];
            userData.putData(sheetName, columnName, game);
        } catch (Exception ex) {
            Logger.getLogger(this.getClass().getName()).log(Level.SEVERE, "Exception during data generation", ex);
            Report.updateTestLog(Action, "Error generating Zelda quote: " + "\n" + ex.getMessage(), Status.DEBUG);
        }
    }