Skip to content

longautoqa/e2e-automation-playwright

Folders and files

NameName
Last commit message
Last commit date

Latest commit

Β 

History

57 Commits
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 

Repository files navigation

Playwright E2E Testing Project

This repository contains end-to-end tests built with Playwright and TypeScript.
The tests are executed via both Jenkins pipeline and GitHub Actions

πŸš€ Overview

A comprehensive testing framework that

  • Combines API, E2E, Visual testing in one solution
  • Integrated with CI/CD pipelines and automated reporting systems.

Sensitive Data Management

⚠️ IMPORTANT: Sensitive variables should be stored in CI/CD environments, not in local .env files

The following sensitive variables should be stored as secrets in your CI/CD environments (GitHub Actions/Jenkins) and NOT committed to version control:

Required Sensitive Variables

  • CUSTOMER_01_EMAIL - First customer account email
  • CUSTOMER_01_PASSWORD - First customer account password
  • CUSTOMER_02_EMAIL - Second customer account email
  • CUSTOMER_02_PASSWORD - Second customer account password
  • ADMIN_EMAIL - Admin account email
  • ADMIN_PASSWORD - Admin account password

Note: These are default test credentials provided by the website (practicesoftwaretesting.com) for automated testing purposes. They are not real user accounts and are publicly available, which is why they are stored in .env files for development convenience.

Screenshots

image image image image image image

✨ Features

  1. All-in-one Testing Solution:
  • 🌐 UI Testing: End-to-end user interface tests
  • πŸ”Œ API Testing: Backend API validation
  • πŸ‘οΈ Visual Testing: Screenshot comparison and visual regression
  1. Robust CI/CD Integration
  1. Advanced Testing Capabilities:
  • βš™οΈ Dynamic test parameterization (environments, test types, workers...)
  • πŸ“† Scheduled test runs (daily regression tests)
  • πŸ” Automated PR validation jobs, eg: Eslint, Synk
  • πŸ”” Slack notifications for trigger test / test results
  • πŸ“ Run smoke test whenever a PR is merged to web-app
  1. πŸ”Œ Integrate between Github & Slack
  • Notify channel when a PR is created / merged / closed
  1. πŸ“Š Test reports
  • Test reports are automatically generated
  • Download generated test reports
  • View summary test reports (passed, failed, flaky tests)
  • View test report details via Jenkins, Github Actions

πŸ› οΈ Tools & Technologies

  • Playwright - Modern web testing framework
  • TypeScript - Typed JavaScript programming language
  • GitHub Actions - Cloud-based CI/CD platform
  • Jenkins - Self-hosted automation server
  • Ngrok - Secure tunneling for local Jenkins exposure
  • ESLint - JavaScript linting utility
  • Prettier - Code formatting tool
  • Makefile - Task automation and build configuration

🧰 Prerequisites

  • Node.js (version 20 or higher)

βš™οΈ Installation

  1. Clone the repository:
git clone https://github.com/longautoqa/e2e-automation-playwright.git
  1. Navigate to project directory:
cd e2e-automation-playwright
  1. Install dependencies:
npm ci

Local Development

Maintain code quality with pre-commit checks

npm run format

⚑ How to run E2E tests

By default, tests will run in staging (QA) environment

Environment support

  • Development
  • Staging (QA)
  • Production (Release)

Basic command

TEST_ENV={env} TEST_TYPE=${project_type} WORKERS={number} make test

Execute tests

API Tests

TEST_ENV=${env} WORKERS=4 make api-test

UI Tests

TEST_ENV=${env} WORKERS=4 make e2e-test

Visual Tests

TEST_ENV=${env} WORKERS=4 make visual-test

Regression Tests

TEST_ENV=${env} WORKERS=10 make regression-test

Count Tests

To count how many test specs & tests in your project

make count-tests

🀝 Contributing

Contributions are welcome! Please feel free to submit a Pull Request.

⭐ Support

If you find this project useful, please consider giving it a star on GitHub!

Releases

No releases published

Packages

No packages published

Contributors 2

  •  
  •