Skip to content

Python (Playwright & Pytest) UI automation framework paired with Terraform infra on GCP Cloud Run. Docker‑ready and CI/CD via GitHub Actions.

Notifications You must be signed in to change notification settings

taurus5650/playwright_pytest_terraform_gcp

Repository files navigation

Automation UI - Playwright, Terraform, Google Cloud

Table of Contents

Stack

  • Language: Python 3.12+ (Poetry for dependency management)
  • Testing: Playwright, Pytest, Allure
  • Test data: https://automationexercise.com/
  • Service: Flask (exposes /test_target to run tests)
  • Container: Docker / docker‑compose (for dev mode)
  • Cloud: Google Cloud Run + Artifact Registry
  • IaC: Terraform
  • CI/CD: GitHub Actions

Project Structure

.
├── api
├── config
│   ├── prod.ini
│   ├── test.ini
│   └── uat.ini
├── conftest.py
├── database
├── deployment
│   ├── Dockerfile
│   ├── docker-compose-dev.yml
│   └── terraform
├── flask_app
│   └── trigger_automation.py
├── base
│   ├── api_request.py
│   ├── config.py
│   ├── mongo_database.py
│   └── playwright_driver.py
├── makefile
├── page
│   ├── home_page
│   ├── login_page
│   └── signup_page
│   └── ...
├── poetry.lock
├── pyproject.toml
├── pytest.ini
├── readme
├── readme.md
├── test_suite
│   ├── user_team
│   ├── xxx_team
│   └── z_repo_unit
└── utils
    └── logger.py

Quick Start

DEV Mode

$ make run-dev-docker

Setup Github Action, Terraform, Google Cloud

Kindly ref. https://github.com/taurus5650/terraform_gcp_practice_step_by_step

Operation

  • If PROD (everyone able to trigger the automation UI feature)
curl --location 'https://playwright-terraform-service-6vveicetna-de.a.run.app/test_target' \
--header 'Content-Type: application/json' \
--data '{
    "path": "user_team",
    "env": "test"
}'

prod-request.png prod-log.png

  • If DEV mode (development by SDET)
curl --location 'http://localhost:9180/test_target' \
--header 'Content-Type: application/json' \
--data '{
    "path": "user_team",
    "env": "test"
}'

dev-mode-log.png

About

Python (Playwright & Pytest) UI automation framework paired with Terraform infra on GCP Cloud Run. Docker‑ready and CI/CD via GitHub Actions.

Topics

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published