Skip to content

A comprehensive boilerplate repository for various automation testing frameworks and tools. This repository provides ready-to-use templates and utilities for web, mobile, and API testing using popular automation frameworks.

Notifications You must be signed in to change notification settings

FlamingoLindo/Automation-Boilerplate

Folders and files

NameName
Last commit message
Last commit date

Latest commit

Β 

History

12 Commits
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 

Repository files navigation

Automation Testing Boilerplate

A comprehensive boilerplate repository for various automation testing frameworks and tools. This repository provides ready-to-use templates and utilities for web, mobile, and API testing using popular automation frameworks.

πŸš€ Features

  • Multi-Framework Support: Selenium, Appium, Playwright, and Robot Framework
  • Python & TypeScript: Support for both Python and TypeScript/JavaScript
  • Utility Libraries: Reusable components for common automation tasks
  • Test Reporting: HTML reports with pytest-html integration
  • Cross-Platform: Works on Windows, macOS, and Linux
  • Page Object Model: Structured test architecture patterns

πŸ“ Project Structure

Automation-Boilerplate/
β”œβ”€β”€ AppiumTest/              # Mobile app testing with Appium
β”œβ”€β”€ PlaywrightTest/          # Web testing with Playwright (TypeScript)
β”œβ”€β”€ SeleniumTest/            # Web testing with Selenium (Python)
β”œβ”€β”€ RobotFrameworkTest/      # Keyword-driven testing with Robot Framework
β”œβ”€β”€ PyUtils/                 # Python utility classes and helpers
β”‚   β”œβ”€β”€ Appium/              # Appium-specific utilities
β”‚   └── Selenium/            # Selenium-specific utilities
β”œβ”€β”€ reports/                 # Test execution reports
β”œβ”€β”€ requirements.txt         # Python dependencies
β”œβ”€β”€ pytest.ini               # pytest configuration
└── README.md

πŸ› οΈ Supported Testing Frameworks

1. Selenium WebDriver (Python)

  • Location: SeleniumTest/
  • Purpose: Web browser automation
  • Features: Cross-browser testing, page object model, pytest integration

2. Appium (Python)

  • Location: AppiumTest/
  • Purpose: Mobile application testing (iOS/Android)
  • Features: Native, hybrid, and web mobile app testing

3. Playwright (TypeScript)

  • Location: PlaywrightTest/
  • Purpose: Modern web testing framework
  • Features: Auto-wait, browser contexts, parallel execution

4. Robot Framework

  • Location: RobotFrameworkTest/
  • Purpose: Keyword-driven testing
  • Features: Human-readable test cases, extensive library ecosystem

πŸ”§ Prerequisites

For Python-based frameworks

  • Python 3.8+
  • pip (Python package manager)

For Playwright

  • Node.js 14+
  • npm or yarn

For Mobile Testing (Appium)

  • Android SDK (for Android testing)
  • Xcode (for iOS testing on macOS)
  • Appium Server

πŸ“¦ Installation & Setup

1. Clone the Repository

git clone <repository-url>
cd Automation-Boilerplate

2. Python Dependencies

pip install -r requirements.txt

3. Playwright Setup

cd PlaywrightTest
npm install
npx playwright install

4. Robot Framework Setup

Robot Framework dependencies are included in requirements.txt.

πŸš€ Quick Start

Running Selenium Tests

# Run all Selenium tests
pytest SeleniumTest/

# Run specific test file
pytest SeleniumTest/test_01.py

# Run with HTML report
pytest SeleniumTest/ --html=reports/selenium-report.html

Running Appium Tests

# Ensure Appium server is running first
pytest AppiumTest/

# Run specific test
pytest AppiumTest/test_app_01.py

Running Playwright Tests

cd PlaywrightTest

# Run all tests
npx playwright test

# Run tests with UI mode
npx playwright test --ui

# Generate test code
npx playwright codegen https://example.com

Running Robot Framework Tests

# Run all Robot Framework tests
robot RobotFrameworkTest/Tests/

# Run specific test file
robot RobotFrameworkTest/Tests/test.robot

# Run with custom output directory
robot --outputdir reports RobotFrameworkTest/Tests/

🧰 Utility Libraries

PyUtils Package

The PyUtils package contains reusable components:

  • person.py: Person data model for test data
  • address.py: Address data model for test data
  • Selenium/: Selenium-specific utilities (login, logout)
  • Appium/: Appium-specific utilities (login, logout)

πŸ“Š Test Reporting

Python Tests (pytest-html)

  • HTML reports are generated in the reports/ directory
  • Configure in pytest.ini file
  • Includes test results, logs, and screenshots

Playwright Tests

  • Built-in HTML reporter
  • Trace viewer for debugging
  • Screenshot and video capture on failures

Robot Framework Tests

  • log.html, report.html, and output.xml files
  • Detailed execution logs with screenshots

πŸ”§ Configuration

pytest Configuration (pytest.ini)

[pytest]
addopts = --html=reports/test-report.html --self-contained-html
testpaths = 
    AppiumTest
    SeleniumTest
python_files = test_*.py

Playwright Configuration (playwright.config.ts)

Located in PlaywrightTest/playwright.config.ts - configure browsers, timeouts, and reporters.

πŸ” Debugging Tips

Playwright

# Run in headed mode
npx playwright test --headed

# Debug mode
npx playwright test --debug

# Trace viewer
npx playwright show-trace trace.zip

Python Tests

# Verbose output
pytest -v

# Stop on first failure
pytest -x

# Run specific test method
pytest SeleniumTest/test_01.py::test_method_name

About

A comprehensive boilerplate repository for various automation testing frameworks and tools. This repository provides ready-to-use templates and utilities for web, mobile, and API testing using popular automation frameworks.

Topics

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published