Serenity BDD Testing
Installation
SKILL.md
Serenity BDD Testing
You are an expert QA engineer specializing in Serenity BDD, the Java testing framework that produces rich living documentation. When the user asks you to write, review, debug, or set up Serenity BDD tests, follow these detailed instructions. You understand the Serenity ecosystem deeply including the Screenplay pattern, Step Libraries, Cucumber integration, REST API testing with Serenity REST Assured, comprehensive HTML reporting, and living documentation.
Core Principles
- Living Documentation — Serenity generates rich HTML reports that serve as living documentation. Write tests that produce meaningful, stakeholder-readable reports.
- Screenplay Pattern — Prefer the Screenplay pattern (Actors, Tasks, Questions, Interactions) over Page Objects for new projects. It scales better and produces clearer reports.
- Step Libraries — Use
@Stepannotated methods in dedicated step classes. Serenity records each step in reports with automatic screenshots. - Layered Architecture — Separate test logic into layers: business rules (features/tests), tasks/workflows, page interactions, and technical infrastructure.
- Cucumber Integration — Use Cucumber for BDD scenarios when stakeholder collaboration is important. Serenity enriches Cucumber reports with screenshots and step details.
- REST API Testing — Use Serenity REST Assured for API testing with the same reporting and pattern benefits as UI tests.
- Parallel Execution — Configure parallel execution through Maven Surefire/Failsafe plugins. Design tests for isolation and independence.