Skip to content

Faker Actions related to Medical Field

diseaseName

Description: This function will generate random medical disease name

Input Format : DatasheetName:ColumnName

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

hospitalName

Description: This function will generate random medical hospital name

Input Format : DatasheetName:ColumnName

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

medicineName

Description: This function will generate random medical medication name

Input Format : DatasheetName:ColumnName

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

symptoms

Description: This function will generate random medical symptom

Input Format : DatasheetName:ColumnName

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