Skip to content

nuqayah/turath-testing

Repository files navigation

Multi-Website Test Suite

This repository contains automated tests for multiple websites using Playwright and pytest:

Setup

  1. Create a virtual environment (recommended):
python -m venv venv
source venv/bin/activate  # On Linux/Mac
# or
.\venv\Scripts\activate  # On Windows
  1. Install dependencies:
# Install main dependencies
pip install .

# Install development dependencies (optional)
pip install ".[dev]"
  1. Install Playwright browsers:
playwright install

Running Tests

To run tests for a specific website:

# For Nuqayah
pytest --website=nuqayah

# For Turath
pytest --website=turath

Additional options:

  • Run with HTML report:
pytest --website=nuqayah --html=report.html
  • Run in headed mode (to see the browser):
pytest --website=nuqayah --headed
  • Run a specific test:
pytest --website=nuqayah test_nuqayah.py::test_homepage_title

Project Structure

  • conftest.py: Contains shared fixtures and configuration for all websites
    • Website selection via --website parameter
    • Browser and page management
    • Automatic base URL navigation
  • test_nuqayah.py: Test cases for Nuqayah website
  • test_turath.py: Test cases for Turath website
  • pyproject.toml: Project configuration and dependencies

Test Coverage

Nuqayah Website

  • Homepage title verification
  • Navigation links
  • Project section content
  • Social media links
  • Contact section

Turath Website

  • [TODO: Add specific test coverage for Turath]

Development

To run all code quality checks:

Notes

  • Tests are written in Arabic to match the website's content
  • The browser is configured to use Arabic locale
  • Each test automatically returns to the base URL after completion

About

No description, website, or topics provided.

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Contributors 2

  •  
  •