What you will learn in BDD in Action, Second Edition
Behavior-Driven Development for the whole software lifecycle
Chapter by chapter
Chapter 8: From executable specifications to automated acceptance tests
What you learn in chapter 8 →Chapter 13: BDD and executable specifications for microservices and APIs
What you learn in chapter 13 →Chapter 14: Executable specifications for existing systems with Serenity/JS
What you learn in chapter 14 →Concepts explained in this book
- behavior-driven developmentBDD is a collection of collaborative practices for discovering business needs and obtaining automated feedback that implemented features meet agreed expectations.
- acceptance criteriaAn acceptance criterion is a condition that a feature or user story must satisfy to be accepted as complete.
- featureA software feature is a distinct capability or behavior provided by a software system.
- scenario keywordThe Scenario (or Example) keyword is a Cucumber syntax keyword that introduces an executable behavior scenario.
- business goalA business outcome is a measurable result that an organization seeks to achieve through a project or solution.
- executable specificationAn executable specification is a business-readable description of expected software behavior that can be directly transformed into or executed as an automated check.
- scenarioA scenario is a concrete description of system behavior under specified conditions, typically expressing an example that can be evaluated or automated.
- acceptance testingAn acceptance test verifies that software satisfies agreed behavioral and business requirements.
- user storyA user story is a concise requirement describing a capability from the perspective of a user or other stakeholder.
- screenplay patternScreenplay is an actor-centric test-automation pattern that structures behavior around actors performing reusable tasks through abilities and interactions while answering questions about system state.
- living documentationLiving documentation is documentation generated from executable specifications so that it reflects and verifies the implemented behavior of software features.
- business ruleA business rule is a constraint, policy, or decision rule that governs how a business process or system should behave.
- page objectA page object is a test automation abstraction that encapsulates a web page's structure and interaction details while exposing readable operations and state.
- actorAn actor is a person, system, or process that interacts with the system under test and pursues goals through activities and abilities.
- shared understandingA common and sufficiently detailed interpretation of requirements, behavior, and value held by the people collaborating on a product.
- taskA Screenplay task is a reusable actor-behavior abstraction representing a meaningful activity, composed from interactions or other tasks.
- business valueBusiness value is the measurable benefit that a software product or capability provides to an organization.
- step definitionA step definition is an executable mapping that connects a human-readable behavior-specification step to code that performs or verifies the corresponding application interaction.
- requirements discoveryA requirements discovery workshop is a collaborative meeting in which stakeholders and delivery-team members elicit, clarify, and explore software requirements.
- requirementsA requirement is a stated capability, condition, or constraint that a software system is expected to satisfy.
- unit testUnit testing is the evaluation of individual software components in isolation from the rest of the application.
- feature fileA feature file is a plain-text Gherkin document that describes one software feature and its scenarios.
- capabilityA capability is an ability that enables users or stakeholders to achieve a goal or fulfill a task independently of a particular implementation.
- WebElementA web element is an individual element in a web document that can be located and interacted with through browser automation.
- pirate canvasA Pirate Canvas is a planning framework that applies Pirate Metrics to analyze ecosystem growth constraints, opportunities, assumptions, and potential products or services.
- outside-in developmentOutside-in development is an implementation approach that starts with externally visible behavior or acceptance outcomes and progressively develops the internal components and behavior needed to support them.
- glue codeGlue code is integration code that connects executable behavior specifications or test steps to application code and services.
- retentionA retention metric measures the extent to which users or customers continue returning to or using a product, service, or program.
- business taskA business task is a cohesive user-oriented activity that contributes to a business goal and can be composed into a user journey.
- web application testingA web test verifies the behavior of a web application through browser-based or web-level interactions.
- acquisition metricAn acquisition metric measures how effectively a product or service attracts new users or customers.
- activation metricAn activation metric measures the extent to which newly acquired users begin engaging with and recognizing value in a product, service, or program.
- SeleniumThe WebDriver API is the programmatic interface for controlling browser sessions and interacting with web pages through WebDriver.
- specification by exampleExample-driven development is a software development approach that uses concrete examples to guide understanding, specification, and implementation.
- Given/When/Then formatGiven-When-Then notation is a structured scenario format for expressing preconditions, an action or event, and the expected outcome.
- evaluation suiteA test suite is a collection of tests organized to evaluate software behavior against defined expectations.
- XPathAn XPath expression is a path query that selects nodes in a structured document such as an HTML or XML document.
- deliverableA deliverable is an application capability or other outcome produced by a delivery team to support a desired behavior change.
- journey mapA Journey Map is a visual planning artifact that organizes actors, goals, workflows, scenarios, outcomes, and business rules for a system.
- feature mappingFeature mapping is a collaborative requirements technique for exploring and organizing a software feature's behavior, flows, variations, and examples.
- CucumberCucumber is a tool that executes behavior specifications written in a human-readable, structured format as automated tests.
- cucumber expressionA Cucumber expression is a pattern notation for matching Gherkin steps and converting captured text into parameters for step definitions.
- product visionA project vision statement is a concise declaration of the intended value and measurable outcome of a project.
- GherkinGherkin is a human-readable structured language for expressing software behavior specifications as features and scenarios.
- Page Element Query LanguageThe Page Element Query Language is Serenity/JS's portable query syntax for locating page elements and deriving information from them.
- database tableA table is a structured arrangement of related values in rows and columns that can represent complex scenario data.
- pirate metricsPirate metrics, also called AARRR, are a startup and product measurement framework organized around acquisition, activation, retention, revenue, and referral.
- workflowA business process is an organized sequence of activities that produces a business result.
- PageElementPageElement is a Serenity/JS web API abstraction representing an element located within a web page and supporting composable interactions and questions.
- test-driven developmentTest-driven development is a software development technique in which automated tests are created before the implementation they verify.
- callbackA hook is a framework callback method that runs before or after a specified software execution event.
- automation solutionA test automation system is a supporting software system that integrates automated tests, execution frameworks, libraries, and glue code to verify and document the behavior of another system.
- stepA step is an individual Gherkin statement representing a precondition, action, or expected outcome in a scenario.
- real optionsReal options is a decision-making principle that preserves the ability to defer or abandon a commitment until better information is available, while recognizing that options have value and expire.
- password-strength algorithmA password-strength algorithm is an algorithm that evaluates the resistance of a password to guessing or cracking.
- referralReferral is the metric measuring how effectively users introduce other people to an organization's products or services.
- returnReturn is a Pirate Metric measuring the financial or broader ecosystem benefits generated by customers and their activity.
- impact mappingAn impact map is an iterative visual document representing relationships and assumptions between business goals and the capabilities or deliverables intended to support them.
- epicAn epic is a high-level software or business deliverable representing a broad capability needed to address a business problem or achieve a goal.
- customer journeyA user journey is the sequence of interactions and experiences through which a user pursues a goal with a product or service.
- abstractionAbstraction is the software design practice of separating an interface or high-level behavior from the details of its implementation.
- interactionA web interaction is a Screenplay-compatible operation that performs an action through a web interface without exposing the underlying browser-automation tool.
- feedbackFeedback is information about observed results or understanding that guides subsequent decisions, actions, or improvements.
- component testingA component test evaluates an individual software component or UI component in isolation from parts of the wider system.
- epic landscapeAn Epic Landscape is a breadth-first view of the epics and capabilities needed to address business problems and achieve business goals.
- Example MappingExample Mapping is a collaborative BDD technique for exploring rules, examples, and questions about a requirement.
- JSON path languageA JSONPath expression is a query expression for selecting or evaluating values within JSON data.
- data attributeAn HTML data attribute is a custom data-* attribute for storing additional information on a standard HTML element.
- HTML id and name attributesHTML id and name attributes are element attributes that provide identifying or form-related names in an HTML document.
- link text selectorA link text selector locates a hyperlink by matching the text displayed for that link.
- nested lookupA nested lookup locates a descendant element by searching from an already located parent element.
- CSS selectorA CSS selector is a pattern for selecting elements in a web document based on element names, classes, attributes, relationships, and other criteria.
- happy pathA happy path scenario is a scenario in which valid inputs and expected conditions lead to a successful outcome without exceptional behavior.
- REST AssuredREST Assured is a Java library for testing and validating REST-based HTTP APIs through programmatic requests and response assertions.
- personaA persona is a detailed representation of a typical user, including characteristics such as goals, abilities, background, and motivations.
- notepadA notepad is an actor-associated store for retaining static or dynamically resolved information during Screenplay interactions.
- custom parameter typeA custom parameter type is a user-defined Cucumber parameter type that recognizes text in a step and converts it into a specified object or value.
- counterexampleA counterexample is a concrete case showing where a proposed rule or expected behavior does not apply or produces an incorrect result.
- getText methodThe getText method is a WebDriver operation that retrieves the text content of a web element.
- pirate metricA pirate metric is an individual stage or dimension in the Pirate Metrics framework.
- taggingA tag is a label attached to a requirement or other item to support classification, organization, and reporting.
- last responsible momentThe last responsible moment is the latest point at which a decision can be made without jeopardizing the ability to deliver the required outcome.
- Serenity/JSSerenity/JS is a JavaScript and TypeScript acceptance-testing framework for writing, executing, and reporting automated tests.
- abilityAn ability is a Screenplay capability that enables an actor to interact with a system through a particular mechanism, such as a browser or API.
- assumptionAn assumption is an unverified belief about goals, actors, behavior, or solution effects that underlies a project plan.
- questionA web question is a Screenplay-compatible query that retrieves information about the state of a system through its web interface.
- blended testingBlended testing is a testing approach that combines interchangeable implementations of actor-facing tasks across different levels of abstraction.
- reuseCode reuse is the practice of applying existing software code in multiple contexts instead of duplicating its implementation.
- Serenity BDDSerenity BDD is a test automation and reporting framework that supports behavior-driven development specifications.
- test dataTest data is data prepared or managed to establish conditions for executing and verifying software tests.
- deliberate discoveryDeliberate Discovery is an approach for generating information through investigation and experimentation so that design and implementation decisions can be made deliberately.
- attemptsToattemptsTo is a Screenplay API method that directs an actor to perform a sequence of interactions.
- why stackA why stack is an iterative questioning technique that traces a requested feature through successive reasons until it reaches an underlying business goal or value.
- testAn automated test is a software-based check that runs without manual execution to determine whether behavior meets specified expectations.
- WaitUntilWaitUntil is a Serenity BDD Screenplay interaction that pauses execution until a specified condition is satisfied.
- collaborative conversationsCollaborative conversations are structured discussions among business, development, and testing participants to clarify goals, outcomes, assumptions, and expected behavior.
- user-interaction testingA UI test verifies software behavior through its user interface rather than through internal program interfaces.
- QuestionAdapterA QuestionAdapter is a proxy that presents static, dynamic, or asynchronously resolved data through a consistent Screenplay API.
- domain layerA domain layer is the architectural layer of a test automation system that models the activities required to complete specified business workflows.
- waitWait is a Serenity BDD waiting utility that pauses execution until an arbitrary function has completed or a supplied condition is met.
- unhappy pathAn unhappy path scenario is a scenario in which invalid inputs, exceptional conditions, or failures produce behavior other than the normal successful outcome.
- uncertaintyUncertainty is incomplete or evolving knowledge about what a software system should accomplish and how it should be built.
- product backlogA product backlog is an ordered collection of proposed work items, such as features, requirements, and improvements, for a product; it may be maintained electronically.
- business flow layerA business flow layer is a high-level test-code layer that expresses user tasks and system workflows in business terms while delegating application interactions to lower-level components.
- castThe Cast interface is the Serenity/JS contract responsible for providing actors configured with their abilities and initial state.
- @serenity-js/web@serenity-js/web is the Serenity/JS module that provides Screenplay-compatible abstractions for interacting with and querying web interfaces.
- Question.fromObject APIQuestion.fromObject is a Serenity/JS API operation that combines static, dynamic, or partially dynamic object properties into a QuestionAdapter.
- TestcontainersTestcontainers is an open-source library that provides lightweight, disposable containerized dependencies for automated tests.
- element selectorAn element selector is a locator that identifies a web element in a document or user interface.
- Ensure.thatEnsure.that is a Serenity/JS interaction that verifies an expectation about a value or state.
- expectationAn expectation is a declarative condition that evaluates whether an observed value or state satisfies a specified criterion.
- @serenity-js/assertions@serenity-js/assertions is a Serenity/JS module providing assertions and expectations for verifying application state in automated tests.
- synchronization statementA synchronization statement coordinates test execution with an asynchronous system condition or elapsed duration.
- verification taskA verification task is a reusable test activity that checks whether an application state or outcome satisfies business-specific expectations.
- strategic planningStrategic planning is a recurring process for turning strategic business opportunities and challenges into a prioritized set of deliverable software features.
- regular expressionA regular expression is a pattern notation for matching and extracting text according to specified character and repetition rules.
- specification layerA specification layer is the architectural layer of a test automation system that expresses important workflows, business rules, and usage examples in stakeholder-readable form.
- multi-tier applicationLayered architecture is a software architecture pattern that organizes responsibilities into layers with controlled dependencies between them.
- continuous integrationContinuous integration is a development practice in which changes are integrated into a shared codebase frequently and validated automatically.
- Cucumber EventListenerA Cucumber EventListener is a plugin interface whose implementation registers handlers for events published during a Cucumber test run.
- tag expressionA Cucumber tag expression is a boolean expression used to select scenarios or features based on their tags.
- Companion Page ObjectsCompanion Page Objects are reusable Screenplay-style page-object abstractions published alongside UI components to encapsulate interactions and enable test-code reuse.
- structured conversationA structured conversation is a deliberately guided discussion that establishes a shared understanding of business rules, examples, and expected behavior.
- interaction classAn interaction class is a reusable test-automation component that represents an actor's interaction with an application through a particular technology.
- measurable business goalA measurable business goal is a desired organizational outcome stated with observable quantities or time conditions that allow achievement to be assessed.
- backlog refinement meetingBacklog refinement is the activity of clarifying, splitting, estimating, and reordering upcoming backlog items.
- PageElementsPageElements is a Serenity/JS abstraction representing a collection of web elements and exposing queries over that collection.
- big-picture scenarioA big-picture scenario is a high-level scenario that represents an overall business flow while abstracting away detailed inputs and implementation steps.
- integration layerAn integration layer is the architectural layer of a test automation system that translates domain activities into low-level interactions with external system interfaces and manages their clients.
- test runnerA test runner is a tool or framework component that discovers, schedules, and executes automated tests.
- locator strategyA locator strategy is an approach for identifying target elements in a web document so automated tests can interact with them.
- soap opera personaA soap opera persona is a lightweight user representation introduced incrementally as stories and scenarios reveal more about the character.
- speculate phaseThe Speculate phase is the initial BDD phase in which teams hypothesize features that could help achieve organizational goals.
- examples tableAn example table is a tabular Gherkin data structure whose rows supply parameter values for repeated scenario executions.
- steel threadA steel thread is a minimal, end-to-end implementation path that exercises the essential workflow of a system before broader functionality is developed.
- scenario outlineA scenario outline is a Gherkin construct that defines a parameterized scenario whose placeholders are replaced with values from an examples table for repeated execution.
- microservice architectureMicroservice architecture is an application architecture in which independently deployable services implement separate business capabilities and communicate through defined interfaces.
- MavenMaven is a build automation and project management tool widely used for Java projects.
- organizational agilityAn Agile organization is an organization that structures its work and decision-making around iterative delivery, adaptation, and feedback.
- documentationTechnical documentation is information describing software behavior, implementation intent, interfaces, or operation for technical practitioners.
- customer journey mappingJourney mapping is a collaborative technique for representing how actors use a system to achieve goals and for identifying important scenarios and priorities.
- FluentWaitA fluent wait is a configurable synchronization technique that repeatedly checks a condition at specified intervals while handling selected waiting behavior.
- portabilityTest portability is the property of test automation code that allows it to operate across different contexts or integration tools with limited change.
- declarative programmingDeclarative programming style expresses desired results or relationships without specifying every execution step.
- imperative programmingImperative programming style expresses computation as ordered commands that change program state.
- parameter type annotationThe ParameterType annotation is a Cucumber annotation that identifies a method defining a custom parameter type.
- shared business languageA shared business language is a common vocabulary and expression style that lets business and technical team members describe software behavior and needs consistently.
- domain conceptA business domain is the area of organizational activity, knowledge, and processes that a software solution addresses.
- business problemA business need is a required improvement or capability arising from an organization's goals or difficulties.
- ExpectedConditionsExpectedConditions is a Selenium utility class providing predefined predicates for common browser-state conditions.
- system-level verificationA system-level test evaluates behavior with the system assembled at a level that represents a complete or substantially complete deployed system.
These guides are generated from the text of Manning books by Manning's knowledge graph and link to the sections they draw on. The full books are available on liveBook and at manning.com.
