Skip to main content

Framework E2E para testing de APIs REST con Playwright

Project description

๐ŸŒฑ socialseed-e2e

PyPI Python CI Docs License Downloads

The ultimate E2E testing framework for REST APIs - Built for developers and AI agents

One-liner: Test your REST APIs with 10x less code using intelligent scaffolding, automatic test discovery, and stateful test chaining. Perfect for both manual testing and AI-generated test suites.

๐Ÿ“š Full Documentation | ๐Ÿš€ Quick Start | ๐Ÿ“– Installation


๐ŸŽฏ What is socialseed-e2e?

socialseed-e2e is a service-agnostic End-to-End (E2E) testing framework designed to make API testing effortless, scalable, and maintainable. Built with an hexagonal architecture that decouples the core engine from service logic, it enables both developers and AI agents to write reliable tests with minimal boilerplate.

Key Differentiators

  • ๐Ÿค– AI-Native Architecture: Structured protocols (IServicePage, ITestModule) designed for automated test generation
  • โšก 10x Less Code: Stateful test chaining and automatic discovery eliminate boilerplate
  • ๐Ÿงช Built-in Mocking: Flask-based mock API for testing without external dependencies
  • ๐Ÿ”ง Zero Configuration: Sensible defaults with YAML/JSON override support

๐Ÿ—๏ธ Architecture

Hexagonal Design

socialseed-e2e/
โ”œโ”€โ”€ core/                    # Service-agnostic engine (stable, tested)
โ”‚   โ”œโ”€โ”€ base_page.py        # HTTP abstraction layer (Playwright)
โ”‚   โ”œโ”€โ”€ config_loader.py    # Configuration management
โ”‚   โ”œโ”€โ”€ test_orchestrator.py # Test discovery & execution
โ”‚   โ”œโ”€โ”€ interfaces.py       # Protocols for AI/codegen
โ”‚   โ””โ”€โ”€ loaders.py          # Dynamic module loading
โ”œโ”€โ”€ services/               # Your service implementations
โ”‚   โ””โ”€โ”€ users-api/
โ”‚       โ”œโ”€โ”€ users_api_page.py
โ”‚       โ”œโ”€โ”€ data_schema.py
โ”‚       โ””โ”€โ”€ modules/
โ”‚           โ”œโ”€โ”€ 01_login_flow.py
โ”‚           โ”œโ”€โ”€ 02_register_flow.py
โ”‚           โ””โ”€โ”€ 03_profile_flow.py
โ””โ”€โ”€ templates/              # Scaffolding templates

High-Level Flow

graph TD;
    subgraph "AI Agent Layer"
        A[AI Agent / LLM] -- "Generates/Heals" --> B[Test Modules]
    end

    subgraph "SocialSeed E2E Framework"
        B -- "Uses" --> C[Service Page Classes]
        C -- "Extends" --> D[Core BasePage]
        D -- "Orchestrates" --> E[Playwright Engine]
    end

    subgraph "Target Infrastructure"
        E -- "REST / JSON" --> F[Microservices]
    end

    G[YAML/JSON Config] -.-> D

โœจ Key Features

  • ๐Ÿ”ฅ Service-Agnostic Core: Test any REST API without framework modifications
  • ๐ŸŽฏ Playwright Integration: Rock-solid HTTP testing with browser-like reliability
  • ๐Ÿ“ Smart Scaffolding: e2e new-service and e2e new-test commands
  • ๐Ÿ” Auto-Discovery: Tests automatically found and executed
  • ๐ŸŽจ Rich CLI Output: Beautiful terminal reports with tables and progress
  • ๐Ÿ”ง Environment Support: Dev, staging, production configurations
  • ๐Ÿ“Š Test Orchestration: Run tests in logical order with state sharing
  • ๐Ÿ—๏ธ Hexagonal Architecture: Clean separation of concerns
  • ๐Ÿค– AI-Ready: Perfect for automated test generation workflows
  • ๐Ÿงช Built-in Mock API: Flask-based mock server for testing without dependencies
  • ๐Ÿ“ˆ Coverage Reports: Automatic coverage tracking with codecov.io integration
  • โšก State Chaining: Share state between tests naturally

๐Ÿš€ Quick Start

# Install
pip install socialseed-e2e
playwright install chromium

# Initialize project
e2e init my-api-tests
cd my-api-tests

# Create service and test
e2e new-service users-api
e2e new-test login --service users-api

# Run tests
e2e run

๐Ÿ“š Complete Quick Start Guide โ†’


๐Ÿ“ฆ Installation

pip install socialseed-e2e
playwright install chromium

For development:

git clone https://github.com/daironpf/socialseed-e2e.git
cd socialseed-e2e
pip install -e ".[dev]"
playwright install chromium

๐Ÿ“– Detailed Installation โ†’


๐Ÿงช Testing

The framework includes 420+ tests organized for maintainability:

# Run all tests
pytest

# Run by type
pytest -m unit                    # Unit tests
pytest -m integration             # Integration tests
pytest -m cli                     # CLI tests

# With coverage
pytest --cov=socialseed_e2e --cov-report=html

๐Ÿ“š Testing Guide โ†’


๐Ÿšฆ Project Status

Current (v0.1.0)

  • โœ… Core Framework: Complete and tested (86.39% coverage)
  • โœ… CLI Commands: init, new-service, new-test, run, doctor, config
  • โœ… Configuration: YAML/JSON with environment variables
  • โœ… Mock API: Flask-based server for integration testing
  • โœ… CI/CD: GitHub Actions configured (CI, Release, Docs)
  • โœ… Documentation: Complete guides hosted on GitHub Pages

In Progress

  • ๐Ÿšง HTML reports with detailed metrics
  • ๐Ÿšง Parallel test execution
  • ๐Ÿšง Better authentication handling
  • ๐Ÿšง WebSocket support

Planned

  • ๐Ÿ“‹ Plugin system for custom extensions
  • ๐Ÿ“‹ Docker integration
  • ๐Ÿ“‹ Visual regression testing
  • ๐Ÿ“‹ Performance testing metrics
  • ๐Ÿ“‹ GraphQL and gRPC support

๐Ÿค Contributing

We welcome contributions from developers and AI agents!

Quick Start for Contributors

git clone https://github.com/daironpf/socialseed-e2e.git
cd socialseed-e2e
pip install -e ".[dev]"
pytest  # Run tests
# Make changes
pytest  # Verify
# Submit PR

๐Ÿค– AI Contributors

This project recognizes AI agents as legitimate co-authors:

  • OpenCode AI Agent - Framework architecture, core implementation, CLI, templates, documentation
  • Claude (Anthropic) - Documentation, feature suggestions, bug fixes

See AI_CONTRIBUTORS.md for full details and contribution philosophy.


๐Ÿ“š Documentation

All documentation is hosted on GitHub Pages and automatically deployed on every push to main:

๐Ÿ”— https://daironpf.github.io/socialseed-e2e/

Documentation Sections

Local Documentation

pip install ".[docs]"
cd docs && make html
open _build/html/index.html

๐Ÿ—บ๏ธ Roadmap

v0.2.0 (Next)

  • HTML reports with detailed metrics
  • Parallel test execution
  • Better authentication handling
  • WebSocket support

v0.3.0 (Planned)

  • Plugin system for custom extensions
  • Docker integration
  • Visual regression testing
  • Performance testing metrics

v0.4.0 (Future)

  • GraphQL support
  • gRPC testing support
  • AI-powered test healing
  • Advanced visual testing

๐Ÿ’ฌ Community


๐Ÿ“œ License

MIT License - see LICENSE file for details.


Built with โค๏ธ by Dairon Pรฉrez Frรญas (@daironpf) and AI co-authors
For developers and AI agents who believe in better testing

Project details


Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

socialseed_e2e-0.1.0.tar.gz (151.5 kB view details)

Uploaded Source

Built Distribution

If you're not sure about the file name format, learn more about wheel file names.

socialseed_e2e-0.1.0-py3-none-any.whl (43.9 kB view details)

Uploaded Python 3

File details

Details for the file socialseed_e2e-0.1.0.tar.gz.

File metadata

  • Download URL: socialseed_e2e-0.1.0.tar.gz
  • Upload date:
  • Size: 151.5 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? Yes
  • Uploaded via: twine/6.1.0 CPython/3.13.7

File hashes

Hashes for socialseed_e2e-0.1.0.tar.gz
Algorithm Hash digest
SHA256 06c1293ab0037ff074f328d0fa274121778f9aba49c40a0b7fb0793739c02069
MD5 e385e0bfb3eb98849c681007f6391e46
BLAKE2b-256 c680d0ada116147765209217e572fc38bc60a544982531e5d8a47b447c8f79b1

See more details on using hashes here.

Provenance

The following attestation bundles were made for socialseed_e2e-0.1.0.tar.gz:

Publisher: release.yml on daironpf/socialseed-e2e

Attestations: Values shown here reflect the state when the release was signed and may no longer be current.

File details

Details for the file socialseed_e2e-0.1.0-py3-none-any.whl.

File metadata

  • Download URL: socialseed_e2e-0.1.0-py3-none-any.whl
  • Upload date:
  • Size: 43.9 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? Yes
  • Uploaded via: twine/6.1.0 CPython/3.13.7

File hashes

Hashes for socialseed_e2e-0.1.0-py3-none-any.whl
Algorithm Hash digest
SHA256 098e4a445c974604c18146b5a82e96f07633d5ec03ddbff18cdb85ed6f7576dd
MD5 01c87fd86eee6759c863a8d46f5f7a77
BLAKE2b-256 b9333a045582d86de8da5516a788f5bc91f43ac5f69a0c8f178831111aa26d05

See more details on using hashes here.

Provenance

The following attestation bundles were made for socialseed_e2e-0.1.0-py3-none-any.whl:

Publisher: release.yml on daironpf/socialseed-e2e

Attestations: Values shown here reflect the state when the release was signed and may no longer be current.

Supported by

AWS Cloud computing and Security Sponsor Datadog Monitoring Depot Continuous Integration Fastly CDN Google Download Analytics Pingdom Monitoring Sentry Error logging StatusPage Status page