Enterprise-grade test automation ecosystem covering Web, API and Mobile from a single repository, applying SOLID principles and clean architecture.
- Overview
- Architecture
- Tech Stack
- Project Structure
- Getting Started
- Running Tests
- Mobile Testing
- Reporting
- Environments
- CI/CD Pipeline
- Design Patterns
This framework demonstrates how a single repository can serve as the backbone for an entire QA organization. It provides a unified, scalable, and maintainable test automation solution across four testing layers:
| Layer | Tool | Coverage |
|---|---|---|
| π Web | Playwright + POM | UI regression, cross-browser, visual |
| π API | Playwright APIRequestContext | REST, schema validation, contract |
| π± Mobile | Appium 3.x + UiAutomator2 | Android native apps on real emulators |
| π E2E | Playwright + WebdriverIO | Cross-layer end-to-end flows |
| βοΈ Cloud | BrowserStack | Real devices & browsers at scale |
βββββββββββββββββββββββββββββββββββββββββββββββββββ
β TEST SUITES LAYER β
β Web Tests β API Tests β Mobile Tests β E2E β
βββββββββββββββββββββββββββββββββββββββββββββββββββ€
β PAGE OBJECT MODEL β
β Pages β Components β Screens β API Clients β
βββββββββββββββββββββββββββββββββββββββββββββββββββ€
β CORE FRAMEWORK β
β Base Classes β DI Container β Interfaces β
βββββββββββββββββββββββββββββββββββββββββββββββββββ€
β SHARED UTILITIES β
β Helpers β Constants β Types β Data Factories β
βββββββββββββββββββββββββββββββββββββββββββββββββββ€
β CONFIG LAYER β
β Dev β QA β Staging β BrowserStack β
βββββββββββββββββββββββββββββββββββββββββββββββββββ
| Category | Technology | Purpose |
|---|---|---|
| Language | TypeScript 5.x | Type-safe test development |
| Web Testing | Playwright 1.60 | Cross-browser automation |
| Mobile Testing | Appium 3.4.2 + UiAutomator2 | Android automation |
| Mobile Client | WebdriverIO | Appium session management |
| Reporting | Allure Reports | Visual test reporting |
| Cloud Testing | BrowserStack | Real device testing |
| Data Generation | Custom Factories | Dynamic test data |
| CI/CD | GitHub Actions | Automated pipelines |
| Pattern | Page/Screen Object Model | Maintainable test structure |
| Architecture | SOLID Principles | Scalable framework design |
qa-multipurpose-framework/
βββ π src/
β βββ π web/
β β βββ pages/ # Page Object classes
β β βββ components/ # Reusable UI components
β β βββ fixtures/ # Web test fixtures
β βββ π api/
β β βββ clients/ # API client classes
β β βββ schemas/ # JSON schema validators
β β βββ interceptors/ # Request/response interceptors
β βββ π mobile/
β β βββ screens/ # Screen Object classes
β β βββ gestures/ # Mobile gesture helpers
β β βββ fixtures/ # Mobile test fixtures
β βββ π core/
β β βββ base/ # Base test classes
β β βββ di/ # Dependency injection
β β βββ interfaces/ # TypeScript interfaces
β βββ π shared/
β βββ utils/ # Data factories
β βββ helpers/ # Utility functions
β βββ constants/ # Global constants
β βββ types/ # Shared TypeScript types
βββ π config/
β βββ environments/ # dev / qa / staging configs
β βββ browserstack/ # BrowserStack capabilities
βββ π tests/
β βββ web/ # Web test specs
β βββ api/ # API test specs
β βββ mobile/ # Mobile test specs
β βββ e2e/ # End-to-end flows
βββ π .github/workflows/ # CI/CD pipelines
βββ π docs/ # Technical documentation
βββ π reports/ # Allure output
βββ playwright.config.ts # Main Playwright config
βββ tsconfig.json # TypeScript config
βββ package.json # Scripts & dependencies
- Node.js 18+
- npm 9+
- Java 11+ (for Appium)
- Android Studio + Emulator (for mobile)
# Clone the repository
git clone https://github.com/VladimirRamirez07/qa-multipurpose-framework.git
cd qa-multipurpose-framework
# Install dependencies
npm install
# Install Playwright browsers
npx playwright install
# Configure environment
cp .env.example .env# Web tests (all browsers)
npm run test:web
# API tests
npm run test:api
# E2E tests
npm run test:e2e
# All tests
npm run test:all
# Parallel execution (4 workers)
npm run test:parallel
# By environment
npm run test:dev
npm run test:staging
# Cloud (BrowserStack)
npm run test:browserstackThis framework includes full Android automation using Appium 3.x with the UiAutomator2 driver, following the Screen Object Model pattern.
# Install Appium globally
npm install -g appium
# Install Android driver
appium driver install uiautomator2# 1. Start Android emulator from Android Studio Device Manager
# 2. Start Appium server
appium
# 3. Run mobile tests in a new terminal
MOBILE=true npx playwright test tests/mobile --project=mobile-chrome{
platformName: 'Android',
'appium:automationName': 'UiAutomator2',
'appium:deviceName': 'emulator-5554',
'appium:platformVersion': '17.0',
'appium:appPackage': 'com.android.settings',
'appium:appActivity': '.Settings',
}// Every screen extends a base class
export class HomeScreen {
constructor(private driver: Browser) {}
async isAppLoaded(): Promise<boolean> { ... }
async getCurrentPackage(): Promise<string> { ... }
async getCurrentActivity(): Promise<string> { ... }
}This framework uses Allure Reports for rich, interactive test reporting with screenshots, videos, and step-by-step logs.
# Generate report
npm run allure:generate
# Open report in browser
npm run allure:open
# Live serve
npm run allure:serve| Environment | Base URL | API URL | Retries |
|---|---|---|---|
| dev | dev.example.com | api-dev.example.com | 1 |
| qa | qa.example.com | api-qa.example.com | 2 |
| staging | staging.example.com | api-staging.example.com | 3 |
GitHub Actions pipelines run automatically on every push and pull request:
- β TypeScript compilation check
- β Web tests on Chromium, Firefox & WebKit in parallel
- β API tests
- β Allure report generation
- β Test results published as artifacts
| Pattern | Application |
|---|---|
| Page Object Model | Every UI screen has its own class |
| Screen Object Model | Every mobile screen has its own class |
| Factory Pattern | Dynamic test data generation |
| Singleton | Driver/browser instance management |
| Dependency Injection | Decoupled service layer |
| Strategy Pattern | Environment-based configuration |
| Builder Pattern | API request construction |
Vladimir Ramirez
QA Automation Engineer passionate about building scalable test frameworks that deliver real business value.
Built with β€οΈ and a lot of β