The business flow layer expresses how users achieve business goals through readable, high-level tasks and workflow steps. It describes what the user does, not detailed application implementation. section 9.3.2
A strong business flow layer:
- Maps each acceptance-test scenario step to one or more business tasks, such as registering for an account or applying for insurance. section 9.3.2
- Keeps glue code readable by naming actions in business terms instead of exposing clicks, links, fields, or other interface details. section 9.3.2
- Delegates execution to lower-level tasks and interaction components, which may use web pages, REST APIs, database queries, message queues, or email-testing services. section 9.3.3
- Changes when the application workflow changes, while core business goals and constraints remain more stable. section 9.3.2
Account registration
A readable step such as “When Jane registers for a new account” can orchestrate navigation, registration-detail entry, and terms-and-conditions confirmation without describing browser clicks. The same pattern supports insurance applications and checks such as confirmation emails or account balances. section 9.3.2 section 9.3.3
@When("{actor} registers for a new account")
public void registersForANewAccount(Actor theTraveler) {
theTraveler.attemptsTo(
Navigate.toTheFrequentFlyerRegistrationPage(),
EnterRegistrationDetails.using(travelerDetails),
Confirms.termsAndConditions()
);
}
Shows a business-language step delegating registration to named tasks through the Screenplay pattern. section 9.3.2
