Write and maintain Behavior-Driven Development tests with Gherkin and Cucumber. Use when defining acceptance scenarios, writing feature files, implementing step definitions, running Three Amigos sessions, or diagnosing BDD test quality issues. Keywords: bdd, gherkin, cucumber, given when then, feature files, step definitions, acceptance criteria, three amigos, example mapping.
Does it follow best practices?
Evaluation — 96%
↑ 1.04xAgent success when using this tile
Validation for skill structure
A development team has written comprehensive Gherkin scenarios for their order processing system, but they need to implement the corresponding step definitions. The scenarios were created collaboratively with business stakeholders and use natural business language that needs to be translated into executable code.
The challenge is to create step definitions that maintain the business meaning while implementing the actual test logic. The team wants to ensure that future changes to the underlying system implementation won't break the scenarios, and that the step definitions can be reused across similar scenarios.
Create the following deliverables:
The following files are provided as inputs. Extract them before beginning.
=============== FILE: inputs/features/order-processing.feature =============== Feature: Order Processing
Scenario: Process standard order Given a customer has items in their cart When they complete the checkout process Then the order should be confirmed And payment should be processed And inventory should be updated
Scenario: Handle insufficient inventory Given a customer selects an out-of-stock item When they attempt to complete checkout Then they should see an inventory warning And the order should not be processed
Scenario: Process expedited shipping Given a customer selects expedited shipping When they complete checkout with valid payment Then the order should be marked for priority processing And shipping should be scheduled within 24 hours
=============== FILE: inputs/existing-steps.js =============== const { Given, When, Then } = require('@cucumber/cucumber');
// Example of existing step that should NOT be replicated Given('I click the submit button and validate the form', function() { // This is BAD - too implementation specific });