# ahmed-9595/hybrid-automation-framework-selenium-restassured architecture

> Architecture diagram of the GitHub repository ahmed-9595/hybrid-automation-framework-selenium-restassured, generated by GitDiagram from its file tree, README and a sample of source files (last updated 2026-10-03). It is an AI-made overview: check details against the source.

- Interactive diagram: https://gitdiagram.com/ahmed-9595/hybrid-automation-framework-selenium-restassured
- Repository: https://github.com/ahmed-9595/hybrid-automation-framework-selenium-restassured

## Overview

This is a hybrid OrangeHRM automation framework: tests establish a browser session, create employee data through the API, then exercise employee UI workflows and validate results. The main stages are login/session capture, API setup, PIM employee lookup, and contact/job updates; shared configuration, request, browser-action, and session-data utilities support them. The README documents Allure reporting and the end-to-end sequence. Test orchestration and reporting internals were not sampled, so those links reflect README statements rather than inspected test code.

Main entry points: [`src/main/java/com/orangehrmlive/qa/api/EmployeeAPI.java`](https://github.com/ahmed-9595/hybrid-automation-framework-selenium-restassured/blob/main/src/main/java/com/orangehrmlive/qa/api/EmployeeAPI.java) (Create employee), [`src/main/java/com/orangehrmlive/qa/pages/LoginPage.java`](https://github.com/ahmed-9595/hybrid-automation-framework-selenium-restassured/blob/main/src/main/java/com/orangehrmlive/qa/pages/LoginPage.java) (Login and session), [`src/main/java/com/orangehrmlive/qa/api/PersonalDetailsAPI.java`](https://github.com/ahmed-9595/hybrid-automation-framework-selenium-restassured/blob/main/src/main/java/com/orangehrmlive/qa/api/PersonalDetailsAPI.java) (Personal details API), [`src/test/java/base/TestBase.java`](https://github.com/ahmed-9595/hybrid-automation-framework-selenium-restassured/blob/main/src/test/java/base/TestBase.java) (Test setup)

## Diagram (Mermaid)

```mermaid
flowchart TD

subgraph group_tests["Test workflows"]
  node_testbase["Test setup<br/>[TestBase.java]"]
  node_apitests["API test cases"]
  node_uitests["UI test cases"]
end

subgraph group_ui["Browser workflows"]
  node_driver["Driver factory<br/>[DriverFactory.java]"]
  node_login["Login and session<br/>[LoginPage.java]"]
  node_pim["PIM employee search<br/>[PIMPage.java]"]
  node_contact["Contact details"]
  node_job["Job details"]
end

subgraph group_api["API workflows"]
  node_employeeapi["Create employee<br/>[EmployeeAPI.java]"]
  node_personapi["Personal details API"]
  node_apibase["API request setup<br/>[ApiBase.java]"]
end

subgraph group_shared["Shared infrastructure"]
  node_config["Configuration<br/>[ConfigUtils.java]"]
  node_properties["Properties loader"]
  node_session["Shared session data"]
  node_json["JSON data loader<br/>[JsonUtils.java]"]
  node_actions["Element actions"]
end

subgraph group_reporting["Reporting"]
  node_allure["Allure reporting<br/>[allure-2.20.1]"]
end

node_tester(("Test runner"))
node_browser(("Browser"))
node_hrm(("OrangeHRM"))

node_tester -->|"starts tests"| node_testbase
node_testbase -.->|"logs in"| node_login
node_testbase -->|"creates employee"| node_employeeapi
node_testbase -->|"opens employee"| node_pim
node_apitests -->|"tests creation"| node_employeeapi
node_apitests -->|"tests details"| node_personapi
node_uitests -->|"tests contact"| node_contact
node_uitests -->|"tests job"| node_job
node_driver -.->|"creates driver"| node_browser
node_login -.->|"uses driver"| node_browser
node_login -->|"reads URL"| node_config
node_login -->|"uses actions"| node_actions
node_login -->|"stores cookie"| node_session
node_pim -->|"uses actions"| node_actions
node_contact -->|"uses actions"| node_actions
node_job -->|"uses actions"| node_actions
node_employeeapi -->|"loads payload"| node_json
node_employeeapi -->|"stores IDs"| node_session
node_personapi -->|"loads payload"| node_json
node_personapi -->|"reads IDs"| node_session
node_employeeapi -->|"builds request"| node_apibase
node_personapi -->|"builds request"| node_apibase
node_apibase -->|"reads API URL"| node_config
node_apibase -->|"reads cookie"| node_session
node_config -->|"loads properties"| node_properties
node_employeeapi -->|"sends API request"| node_hrm
node_personapi -->|"sends API request"| node_hrm
node_browser -.->|"drives UI"| node_hrm
node_uitests -.->|"reports results"| node_allure

click node_testbase "https://github.com/ahmed-9595/hybrid-automation-framework-selenium-restassured/blob/main/src/test/java/base/TestBase.java"
click node_apitests "https://github.com/ahmed-9595/hybrid-automation-framework-selenium-restassured/tree/main/src/test/java/testCases/api"
click node_uitests "https://github.com/ahmed-9595/hybrid-automation-framework-selenium-restassured/tree/main/src/test/java/testCases/ui"
click node_driver "https://github.com/ahmed-9595/hybrid-automation-framework-selenium-restassured/blob/main/src/main/java/com/orangehrmlive/qa/factoryPage/DriverFactory.java"
click node_login "https://github.com/ahmed-9595/hybrid-automation-framework-selenium-restassured/blob/main/src/main/java/com/orangehrmlive/qa/pages/LoginPage.java"
click node_pim "https://github.com/ahmed-9595/hybrid-automation-framework-selenium-restassured/blob/main/src/main/java/com/orangehrmlive/qa/pages/PIMPage.java"
click node_contact "https://github.com/ahmed-9595/hybrid-automation-framework-selenium-restassured/blob/main/src/main/java/com/orangehrmlive/qa/pages/ContactDetailsPage.java"
click node_job "https://github.com/ahmed-9595/hybrid-automation-framework-selenium-restassured/blob/main/src/main/java/com/orangehrmlive/qa/pages/JobDetailsPage.java"
click node_employeeapi "https://github.com/ahmed-9595/hybrid-automation-framework-selenium-restassured/blob/main/src/main/java/com/orangehrmlive/qa/api/EmployeeAPI.java"
click node_personapi "https://github.com/ahmed-9595/hybrid-automation-framework-selenium-restassured/blob/main/src/main/java/com/orangehrmlive/qa/api/PersonalDetailsAPI.java"
click node_apibase "https://github.com/ahmed-9595/hybrid-automation-framework-selenium-restassured/blob/main/src/main/java/com/orangehrmlive/qa/api/ApiBase.java"
click node_config "https://github.com/ahmed-9595/hybrid-automation-framework-selenium-restassured/blob/main/src/main/java/com/orangehrmlive/qa/utils/ConfigUtils.java"
click node_properties "https://github.com/ahmed-9595/hybrid-automation-framework-selenium-restassured/blob/main/src/main/java/com/orangehrmlive/qa/utils/PropertiesUtils.java"
click node_session "https://github.com/ahmed-9595/hybrid-automation-framework-selenium-restassured/blob/main/src/main/java/com/orangehrmlive/qa/utils/TestSessionData.java"
click node_json "https://github.com/ahmed-9595/hybrid-automation-framework-selenium-restassured/blob/main/src/main/java/com/orangehrmlive/qa/utils/JsonUtils.java"
click node_actions "https://github.com/ahmed-9595/hybrid-automation-framework-selenium-restassured/blob/main/src/main/java/com/orangehrmlive/qa/utils/ElementActions.java"
click node_allure "https://github.com/ahmed-9595/hybrid-automation-framework-selenium-restassured/tree/main/.allure/allure-2.20.1"

classDef toneNeutral fill:#f8fafc,stroke:#334155,stroke-width:1.5px,color:#0f172a
classDef toneBlue fill:#dbeafe,stroke:#2563eb,stroke-width:1.5px,color:#172554
classDef toneAmber fill:#fef3c7,stroke:#d97706,stroke-width:1.5px,color:#78350f
classDef toneMint fill:#dcfce7,stroke:#16a34a,stroke-width:1.5px,color:#14532d
classDef toneRose fill:#ffe4e6,stroke:#e11d48,stroke-width:1.5px,color:#881337
classDef toneIndigo fill:#e0e7ff,stroke:#4f46e5,stroke-width:1.5px,color:#312e81
classDef toneTeal fill:#ccfbf1,stroke:#0f766e,stroke-width:1.5px,color:#134e4a
class node_testbase,node_apitests,node_uitests,node_browser toneBlue
class node_driver,node_login,node_pim,node_contact,node_job toneAmber
class node_employeeapi,node_personapi,node_apibase toneMint
class node_config,node_properties,node_session,node_json,node_actions toneRose
class node_allure,node_tester,node_hrm toneIndigo
```

## Components

### Test workflows

- [Test setup](https://github.com/ahmed-9595/hybrid-automation-framework-selenium-restassured/blob/main/src/test/java/base/TestBase.java): `src/test/java/base/TestBase.java`
- [API test cases](https://github.com/ahmed-9595/hybrid-automation-framework-selenium-restassured/tree/main/src/test/java/testCases/api): `src/test/java/testCases/api`
- [UI test cases](https://github.com/ahmed-9595/hybrid-automation-framework-selenium-restassured/tree/main/src/test/java/testCases/ui): `src/test/java/testCases/ui`

### Browser workflows

- [Driver factory](https://github.com/ahmed-9595/hybrid-automation-framework-selenium-restassured/blob/main/src/main/java/com/orangehrmlive/qa/factoryPage/DriverFactory.java): `src/main/java/com/orangehrmlive/qa/factoryPage/DriverFactory.java`
- [Login and session](https://github.com/ahmed-9595/hybrid-automation-framework-selenium-restassured/blob/main/src/main/java/com/orangehrmlive/qa/pages/LoginPage.java): `src/main/java/com/orangehrmlive/qa/pages/LoginPage.java`
- [PIM employee search](https://github.com/ahmed-9595/hybrid-automation-framework-selenium-restassured/blob/main/src/main/java/com/orangehrmlive/qa/pages/PIMPage.java): `src/main/java/com/orangehrmlive/qa/pages/PIMPage.java`
- [Contact details](https://github.com/ahmed-9595/hybrid-automation-framework-selenium-restassured/blob/main/src/main/java/com/orangehrmlive/qa/pages/ContactDetailsPage.java): `src/main/java/com/orangehrmlive/qa/pages/ContactDetailsPage.java`
- [Job details](https://github.com/ahmed-9595/hybrid-automation-framework-selenium-restassured/blob/main/src/main/java/com/orangehrmlive/qa/pages/JobDetailsPage.java): `src/main/java/com/orangehrmlive/qa/pages/JobDetailsPage.java`

### API workflows

- [Create employee](https://github.com/ahmed-9595/hybrid-automation-framework-selenium-restassured/blob/main/src/main/java/com/orangehrmlive/qa/api/EmployeeAPI.java): `src/main/java/com/orangehrmlive/qa/api/EmployeeAPI.java`
- [Personal details API](https://github.com/ahmed-9595/hybrid-automation-framework-selenium-restassured/blob/main/src/main/java/com/orangehrmlive/qa/api/PersonalDetailsAPI.java): `src/main/java/com/orangehrmlive/qa/api/PersonalDetailsAPI.java`
- [API request setup](https://github.com/ahmed-9595/hybrid-automation-framework-selenium-restassured/blob/main/src/main/java/com/orangehrmlive/qa/api/ApiBase.java): `src/main/java/com/orangehrmlive/qa/api/ApiBase.java`

### Shared infrastructure

- [Configuration](https://github.com/ahmed-9595/hybrid-automation-framework-selenium-restassured/blob/main/src/main/java/com/orangehrmlive/qa/utils/ConfigUtils.java): `src/main/java/com/orangehrmlive/qa/utils/ConfigUtils.java`
- [Properties loader](https://github.com/ahmed-9595/hybrid-automation-framework-selenium-restassured/blob/main/src/main/java/com/orangehrmlive/qa/utils/PropertiesUtils.java): `src/main/java/com/orangehrmlive/qa/utils/PropertiesUtils.java`
- [Shared session data](https://github.com/ahmed-9595/hybrid-automation-framework-selenium-restassured/blob/main/src/main/java/com/orangehrmlive/qa/utils/TestSessionData.java): `src/main/java/com/orangehrmlive/qa/utils/TestSessionData.java`
- [JSON data loader](https://github.com/ahmed-9595/hybrid-automation-framework-selenium-restassured/blob/main/src/main/java/com/orangehrmlive/qa/utils/JsonUtils.java): `src/main/java/com/orangehrmlive/qa/utils/JsonUtils.java`
- [Element actions](https://github.com/ahmed-9595/hybrid-automation-framework-selenium-restassured/blob/main/src/main/java/com/orangehrmlive/qa/utils/ElementActions.java): `src/main/java/com/orangehrmlive/qa/utils/ElementActions.java`

### Reporting

- [Allure reporting](https://github.com/ahmed-9595/hybrid-automation-framework-selenium-restassured/tree/main/.allure/allure-2.20.1): `.allure/allure-2.20.1`

### Other components

- **Test runner**
- **Browser**
- **OrangeHRM**

## Connections

- Test runner → Test setup: starts tests (evidence: `README.md`)
- Test setup → Login and session: logs in
- Test setup → Create employee: creates employee (evidence: `README.md`)
- Test setup → PIM employee search: opens employee (evidence: `README.md`)
- API test cases → Create employee: tests creation (evidence: `README.md`)
- API test cases → Personal details API: tests details (evidence: `README.md`)
- UI test cases → Contact details: tests contact (evidence: `README.md`)
- UI test cases → Job details: tests job (evidence: `README.md`)
- Driver factory → Browser: creates driver
- Login and session → Browser: uses driver
- Login and session → Configuration: reads URL (evidence: `src/main/java/com/orangehrmlive/qa/pages/LoginPage.java`)
- Login and session → Element actions: uses actions (evidence: `src/main/java/com/orangehrmlive/qa/pages/LoginPage.java`)
- Login and session → Shared session data: stores cookie (evidence: `src/main/java/com/orangehrmlive/qa/pages/LoginPage.java`)
- PIM employee search → Element actions: uses actions (evidence: `src/main/java/com/orangehrmlive/qa/pages/PIMPage.java`)
- Contact details → Element actions: uses actions (evidence: `src/main/java/com/orangehrmlive/qa/pages/ContactDetailsPage.java`)
- Job details → Element actions: uses actions (evidence: `src/main/java/com/orangehrmlive/qa/pages/JobDetailsPage.java`)
- Create employee → JSON data loader: loads payload (evidence: `src/main/java/com/orangehrmlive/qa/api/EmployeeAPI.java`)
- Create employee → Shared session data: stores IDs (evidence: `src/main/java/com/orangehrmlive/qa/api/EmployeeAPI.java`)
- Personal details API → JSON data loader: loads payload (evidence: `src/main/java/com/orangehrmlive/qa/api/PersonalDetailsAPI.java`)
- Personal details API → Shared session data: reads IDs (evidence: `src/main/java/com/orangehrmlive/qa/api/PersonalDetailsAPI.java`)
- Create employee → API request setup: builds request (evidence: `src/main/java/com/orangehrmlive/qa/api/EmployeeAPI.java`)
- Personal details API → API request setup: builds request (evidence: `src/main/java/com/orangehrmlive/qa/api/PersonalDetailsAPI.java`)
- API request setup → Configuration: reads API URL (evidence: `src/main/java/com/orangehrmlive/qa/api/ApiBase.java`)
- API request setup → Shared session data: reads cookie (evidence: `src/main/java/com/orangehrmlive/qa/api/ApiBase.java`)
- Configuration → Properties loader: loads properties (evidence: `src/main/java/com/orangehrmlive/qa/utils/ConfigUtils.java`)
- Create employee → OrangeHRM: sends API request (evidence: `src/main/java/com/orangehrmlive/qa/api/EmployeeAPI.java`)
- Personal details API → OrangeHRM: sends API request (evidence: `src/main/java/com/orangehrmlive/qa/api/PersonalDetailsAPI.java`)
- Browser → OrangeHRM: drives UI
- UI test cases → Allure reporting: reports results (evidence: `README.md`)
