Framework E2E para testing de APIs REST con Playwright
Project description
๐ฑ socialseed-e2e
The ultimate E2E testing framework for REST APIs - Built for developers and AI agents
โก๏ธ NEW v2.0: AI-First design with automatic error prevention, camelCase serialization support, and zero-config setup for Java backends
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 - ๐ง .agent Awareness: Automatically generates AI documentation (
.agent/) for self-guided test generation by LLMs - โก 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
๐ 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 โ
๐ค Workflow with AI Agents
socialseed-e2e is designed to be the first AI-Native Testing Framework. When you initialize a project with e2e init, a .agent/ folder is created with specific instructions for LLMs (Claude, GPT-4, etc.).
How to use it:
- Initialize: Run
e2e initin your project root. - Prompt your Agent:
"Read the documentation in the
.agent/folder to understand the testing framework. Then, scan my API controllers in../src/controllers/and generate the corresponding E2E tests following the framework patterns." - Execute: Run
e2e runto verify the generated tests.
The .agent folder contains:
AGENT_GUIDE.md: โญ START HERE - Complete guide with error prevention patterns, camelCase serialization, and common pitfalls to avoidFRAMEWORK_CONTEXT.md: Architecture and core concepts.WORKFLOW_GENERATION.md: Step-by-step guide for generating tests.EXAMPLE_TEST.md: Gold standard code examples.
๐ก๏ธ AI-First Error Prevention (v2.0)
The framework now includes automatic safeguards for AI-generated code:
- โ
Absolute imports only - No more
ImportErrorfrom relative imports - โ CamelCase serialization - Automatic Pydantic aliases for Java backends
- โ
Dependency management -
requirements.txtincludes email-validator - โ
Method naming -
do_*prefix prevents attribute/method conflicts - โ Header handling - Manual authentication management (no missing methods)
- โ
Verification script - Run
python verify_installation.pyto check setup
Result: AI agents can generate working E2E tests with minimal or no human intervention.
๐๏ธ 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-serviceande2e new-testcommands - ๐ 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
๐ฆ 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
- โ AI-Ready: Perfect for automated test generation workflows
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!
- ๐ Contributing Guidelines - How to contribute
- ๐ค AGENTS.md - Guide for AI agents
- ๐ AI_CONTRIBUTORS.md - Recognition for AI contributions
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. this list need updates
๐ Documentation
All documentation is hosted on GitHub Pages and automatically deployed on every push to main:
๐ https://daironpf.github.io/socialseed-e2e/
Documentation Sections
- Installation Guide - Detailed setup instructions
- Quick Start - Get running in 15 minutes
- Configuration - Complete e2e.conf reference
- Writing Tests - Patterns and best practices
- CLI Reference - All commands and options
- API Reference - Framework API documentation
- Testing Guide - Pytest configuration and execution
- Mock API - Built-in Flask mock server guide
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
- GitHub Discussions: Join the conversation
- Issues: Report bugs or request features
- Documentation: https://daironpf.github.io/socialseed-e2e/
๐ 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
Built Distribution
Filter files by name, interpreter, ABI, and platform.
If you're not sure about the file name format, learn more about wheel file names.
Copy a direct link to the current filters
File details
Details for the file
socialseed_e2e-0.1.2.tar.gz.File metadata
File hashes
c21494250985438e416f8457c2cb4a64b3ff71a0ea56904f2765d6c9cc2a5810f147f17ce9c50115ac7648b03cd92221414c2bf4b41044e67ea756331aeb5fc925e8c6184459853ac44b18622ae55963See more details on using hashes here.
Provenance
The following attestation bundles were made for
socialseed_e2e-0.1.2.tar.gz:Publisher:
Attestations: Values shown here reflect the state when the release was signed and may no longer be current.release.ymlon daironpf/socialseed-e2e-
Statement type:
-
Predicate type:
-
Subject name:
-
Subject digest:
-
Sigstore transparency entry: 917889437
- Sigstore integration time:
Source repository:https://in-toto.io/Statement/v1https://docs.pypi.org/attestations/publish/v1socialseed_e2e-0.1.2.tar.gzc21494250985438e416f8457c2cb4a64b3ff71a0ea56904f2765d6c9cc2a5810-
Permalink:
-
Branch / Tag:
-
Owner: https://github.com/daironpf
-
Access:
Publication detail:daironpf/socialseed-e2e@b17e9f7ba44db89462634753eb9e36a73f242cc5refs/tags/v0.1.2publichttps://token.actions.githubusercontent.comgithub-hostedrelease.yml@b17e9f7ba44db89462634753eb9e36a73f242cc5push