Movatterモバイル変換


[0]ホーム

URL:


Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Sign up
Appearance settings

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.

NotificationsYou must be signed in to change notification settings

aeshamangukiya/hybrid-qa-automation-framework

Repository files navigation

Built with Java, Selenium WebDriver, TestNG, Rest Assured, JDBC, Maven, Log4j2 & Extent Reports


Overview

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.


Key Features

  • 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.)

Tech Stack

TechnologyPurpose
JavaCore programming language
SeleniumUI automation
Rest AssuredAPI testing
JDBCDatabase testing and validation
TestNGTest orchestration
MavenBuild and dependency management
Log4j2Logging and debugging
Extent ReportsRich HTML reporting

Getting Started

  1. Clone the Repository:

    git clone https://github.com/aeshamangukiya/AutomationPractice.git# orgit clone git@github.com:aeshamangukiya/AutomationPractice.git
  2. Run Tests:

    mvn cleantest

Project Structure

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.md

Database Testing

1.Database Utility Classes

  • DatabaseConnectionManager.java → Manages DB connections using constants
  • DatabaseUtils.java → Execute queries & print results (TABLE, RAW, JSON, ROW)
  • QueryBuilder.java → Centralized SQL query generator

2.Assertions

  • DatabaseAssertions.java → Custom TestNG assertions for DB validation

3.Sample DB Test (TS_DB_001_UserTableValidation.java)

@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 Testing with Rest Assured

  1. 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()));}

  1. Location:
test/java/tests/api/users/GetUsersAPITest.java

  1. Extend with:
  • JSON Schema validation
  • Token authentication
  • Data-driven APIs using Excel or JSON

Naming Conventions

ComponentConventionExample
Packages/FolderscamelCasedbtests,dataProviders
ClassesPascalCaseConfigReader.java,LoginTest.java
Methods/VarscamelCasegetUserDetails(),isActive
Fileskebab-casestyle.css
Assetssnake_caseasset_1.svg

Parallel Execution

Configure viatestng.xml:

<suitename="RegressionSuite"parallel="methods"thread-count="5">

Use with Selenium Grid for remote browsers.


Reporting & Logging

  • ExtentReports: Saved in /reports
  • Screenshots: On failure in /screenshots
  • Logs: Module-specific under /logs
  • Log4j2: Config in resources/log4j2.xml

Retry & Listeners

  • Retry failed tests using RetryAnalyzer
  • Custom TestNG listeners: screenshots, logs, reports

Contact & Credits

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

Stars

Watchers

Forks

Packages

No packages published

Languages


[8]ページ先頭

©2009-2025 Movatter.jp