- Notifications
You must be signed in to change notification settings - Fork0
A Hybrid Test Automation Framework for UI, API & DB testing, built with Java, Selenium, Rest Assured, TestNG, JDBC, Maven & Log4j2. It supports POM, data-driven testing, parallel execution, logging, reporting, and CI/CD integration for scalable and reliable automation.
aeshamangukiya/hybrid-qa-automation-framework
Folders and files
| Name | Name | Last commit message | Last commit date | |
|---|---|---|---|---|
Repository files navigation
This is anEnd-to-End Hybrid Test Automation Framework designed for comprehensive testing acrossUI,API, andDatabase layers of a web application.
The framework is developed usingJava,Selenium,Rest Assured,JDBC,TestNG,Maven, andLog4j2, enabling teams to write, manage, and execute reliable automated test cases efficiently.
It supportsUI, API, and Database validations, following best practices likePage Object Model (POM) and emphasizingmodularity,scalability, andmaintainability. With integrated logging, parallel execution, and rich HTML reporting, this framework offers a robust solution for automation testing and continuous integration pipelines.
- End-to-End UI, API & DB Test Automation
- Modular and Scalable Architecture
- API Testing with Rest Assured for request/response validation
- Database Testing using JDBC for query execution and result validation
- Parallel Execution Support using TestNG and Maven Surefire
- Page Object Model (POM) design pattern for UI automation
- Data-Driven Testing with Excel, JSON, or Property files
- Cross-Environment Execution via configuration files
- Detailed Logging usingLog4j2
- Rich HTML Reports (ExtentReports or Allure)
- CI/CD Integration Ready (Jenkins, GitHub Actions, etc.)
| Technology | Purpose |
|---|---|
| Java | Core programming language |
| Selenium | UI automation |
| Rest Assured | API testing |
| JDBC | Database testing and validation |
| TestNG | Test orchestration |
| Maven | Build and dependency management |
| Log4j2 | Logging and debugging |
| Extent Reports | Rich HTML reporting |
Clone the Repository:
git clone https://github.com/aeshamangukiya/AutomationPractice.git# orgit clone git@github.com:aeshamangukiya/AutomationPractice.gitRun Tests:
mvn cleantest
Click to expand
📁 src/├── 📁 main/│ ├── 📁 java/│ │ ├── 📁 pageBase/│ │ │ └── BasePage.java│ │ ├── 📁 pageObjects/│ │ │ ├── 📁 pages/│ │ │ │ ├── 📁 accounts/│ │ │ │ │ ├── LoginPage.java│ │ │ │ │ └── ProfilePage.java│ │ │ │ └── 📁 common/│ │ │ │ └── Dashboard.java│ │ ├── 📁 db/│ │ │ ├── DatabaseConnectionManager.java│ │ │ ├── DatabaseUtils.java│ │ │ └── QueryBuilder.java│ │ ├── 📁 utilities/│ │ │ ├── ConfigReader.java│ │ │ ├── WaitUtil.java│ │ │ └── WebDriverUtil.java│ │ ├── 📁 constants/│ │ │ ├── FrameworkConstants.java│ │ │ └── Messages.java│ └── 📁 resources/│ └── log4j2.xml📁 test/├── 📁 java/│ ├── 📁 apiTests/│ │ └── GetUsersAPITest.java│ ├── 📁 dbtests/│ │ ├── DatabaseAssertions.java│ │ └── TS_DB_001_UserTableValidation.java│ ├── 📁 data/providers/│ │ └── DataProviderUtil.java│ ├── 📁 testBase/│ │ └── BaseTest.java│ └── 📁 listeners/│ ├── TestListener.java│ └── ExtentReportListener.java├── 📁 resources/│ └── config.properties📁 testXML/└── testng.xml📁 testData/└── accounts/ └── login/ └── LoginTestData.xlsx📁 reports/└── ExtentReport.html📁 screenshots/└── LoginPage_YYYY_MM_DD_HH_MM_SS.png📄 pom.xml📄 README.mdDatabaseConnectionManager.java→ Manages DB connections using constantsDatabaseUtils.java→ Execute queries & print results (TABLE, RAW, JSON, ROW)QueryBuilder.java→ Centralized SQL query generator
DatabaseAssertions.java→ Custom TestNG assertions for DB validation
@Test(priority =1)publicvoidTC_DB_001_VerifyUserExists() {Stringquery =QueryBuilder.getUserById(1);List<Map<String,Object>>result =DatabaseUtils.executeQuery(query);DatabaseAssertions.assertNotEmpty(result,"User should exist in DB");DatabaseAssertions.assertRowCount(result,1,"Expected exactly one user");DatabaseAssertions.assertColumnValue(result,"idemployee","1","User ID mismatch");}
- API test sample (GetUsersAPITest.java):
@Testpublic voidverifyGetUsersAPI() {given() .baseUri("https://reqres.in").when() .get("/api/users?page=2").then() .statusCode(200) .body("data",not(empty()));}
- Location:
test/java/tests/api/users/GetUsersAPITest.java
- Extend with:
- JSON Schema validation
- Token authentication
- Data-driven APIs using Excel or JSON
| Component | Convention | Example |
|---|---|---|
| Packages/Folders | camelCase | dbtests,dataProviders |
| Classes | PascalCase | ConfigReader.java,LoginTest.java |
| Methods/Vars | camelCase | getUserDetails(),isActive |
| Files | kebab-case | style.css |
| Assets | snake_case | asset_1.svg |
Configure viatestng.xml:
<suitename="RegressionSuite"parallel="methods"thread-count="5">
Use with Selenium Grid for remote browsers.
- ExtentReports: Saved in /reports
- Screenshots: On failure in /screenshots
- Logs: Module-specific under /logs
- Log4j2: Config in resources/log4j2.xml
- Retry failed tests using RetryAnalyzer
- Custom TestNG listeners: screenshots, logs, reports
- Maintained by: Aesha Mangukiya
- Email:aeshamangukiya1@gmail.com
- GitHub:GitHub: aeshamangukiya
About
A Hybrid Test Automation Framework for UI, API & DB testing, built with Java, Selenium, Rest Assured, TestNG, JDBC, Maven & Log4j2. It supports POM, data-driven testing, parallel execution, logging, reporting, and CI/CD integration for scalable and reliable automation.
Topics
Resources
Uh oh!
There was an error while loading.Please reload this page.