Feature specifications

A template for writing well-structured feature specifications using Gherkin Given-When-Then style, covering both UX and assembly-level testing scenarios.

Start by creating your 3.6 Feature specifications. Our initial list is essentially our catalogue of product features (expressed when we defined our capabilities & features and the key results that clearly state how we will measure success).

Feature specification

User experience or UX feature testing

FEATURE: User Account
AS A Customer
I WANT TO create a user account with the bank
SO THAT I can have a central location to view my loans and payment information
Clear business value

ACCEPTANCE CRITERIAUse consistent language
  • The following fields must be populated: first name, last name, phone number, email, SSN

    • Account created without all required fields
    • Account created with all required fields
  • ”Create account” button is displayed only if all fields are populated

SCENARIO: Account created without all required fields

GIVEN I am a new customer
AND I am on the “Create New User Account” screen
WHEN I populate the following data |firstName | lastName | email | phone | | Sally | Hanson | sally@boss.com | +1 123-456-7890 | Specific example
AND I click “Create Account” Use “AND” for multiple steps
THEN then “Create Account” button is inactive, and nothing happens

SCENARIO: Account created with all required fields Alternate test

GIVEN I am a new customer
AND I am on the “Create New User Account” screen
WHEN I populate the following data |firstName | lastName | email | ssn | phone | | Sally | Hanson | sally@boss.com | 1234 | +1 123-456-7890 | Specific example
AND I click “Create Account” Use “AND” for multiple steps
THEN the information entered is saved and my user account is created

Assembly level testing

FEATURE: Underwrite a loan
AS A Bank Manager
I WANT TO find out any fraudulent activities
SO THAT I can ensure the customer is not a fraud
Clear business value

ACCEPTANCE CRITERIAUse consistent language
  • No fraud detected; borrower passes fraud checks OR
  • Fraudulent activities are detected; borrower fails fraud checks

SCENARIO: No fraud detected; borrower passes fraud checks

GIVEN I receive a <borrower_prequalification_requested> event
AND the borrower has a borrowerID of <uuid>
AND the borrower is not a fraud
WHEN the event contains the following information | correlationID | uuid | ssn | birthdate | income | amount | | <uuid> | uuid | 1234 | 10/12/1990 | 60000 | 2500 | Specific example
AND I emit a <fraud_not_detected> event
THEN the event contains the following information | correlationID | borrowerID | ssn | birthdate | prequal_amount | | <uuid> | uuid | 1234 | 10/12/1990 | 2500 |

SCENARIO: Fraudulent activities are detected; borrower fails fraud checks Alternate test

GIVEN I receive a <borrower_prequalification_requested> event