Screenwright¶
A Python Screenplay pattern framework with cinematic test reporting.
Screenwright brings the Screenplay pattern to Python, giving your BDD acceptance tests a clean, maintainable architecture and generating beautiful, interactive HTML reports styled with Material Design 3.
Key Features¶
- Screenplay pattern -- Actors perform Tasks through Abilities and ask Questions about system state. No more fragile Page Object Models.
- Cinematic test reports -- Every test run produces a rich HTML report with neon-glow aesthetics, animated actor timelines, and full event narration.
- pytest-bdd integration -- Screenwright plugs into pytest as a first-class plugin. Write
.featurefiles, define step functions, and get reports automatically. - Material Design 3 theming -- Customize every color, font, and animation timing through a simple YAML theme file. Set one primary color and the entire tonal palette is generated for you.
- Event sourced internals -- Every action, question, and outcome is captured as an immutable domain event, giving you a complete audit trail of each test scenario.
Quick Start¶
Install Screenwright:
Write a feature file, implement steps using the Screenplay pattern, and run your tests:
Open screenwright-report/index.html to view your cinematic test report.
Next Steps¶
- Installation -- prerequisites and install options
- Your First Test -- a complete working example
- Screenplay Pattern Overview -- understand the concepts
- Theming Your Report -- customize your report's look and feel