+ All Categories
Home > Documents > SpecFlow & Gherkin Behavior Driven Development. Definitions Behavior Driven Development SpecFlow...

SpecFlow & Gherkin Behavior Driven Development. Definitions Behavior Driven Development SpecFlow...

Date post: 23-Dec-2015
Category:
Upload: nancy-washington
View: 227 times
Download: 2 times
Share this document with a friend
15
SpecFlow & Gherkin Behavior Driven Development
Transcript

 SpecFlow & Gherkin

Behavior Driven Development

• Definitions• Behavior Driven Development• SpecFlow Structure• Gerkin• Demo

Agenda

• Open source tool for « bridging the communication gap between domain experts and devlopers »

• Allows non-technical people to write behavior / acceptance tests for a system

• Enables these acceptance tests to be automated

What is SpecFlow ?

• Outside-in software• Helps document what the system should do• Validates that the right system is being built• Product owner point of view• Written in non-technical format• Pass/fail• When automated, become « living documentation »• Usually execute a vertical slice through the system (!= unit test)• Shared team understanding of what’sbeing built• Helps define what « done » means

What is Behaviour-Driven Development

Use in Test-First Approaches

Development iteration cycle

SpecFlow Structure

• Business readable domain specific language• Represents tests in natural language, not code• Line-oriented• Uses indentation to create structure• Keywords• +40 spoken languages

What is Gherkin ?

• Top level grouping• Contain one or more scenarios• Contain logically related test scenarios• Represent small, discrete features of the system

Features

• Concrete examples of expected system behaviour• Each scenario describes a particular situation• Each scenario should be independent and isolated• Can represent: happy paths, error paths, edge cases

Scenarios

• Set up initial state : Given• Perform action(s) : When• Check end state : Then

Scenario steps keywords

• Mark features and scenarios with arbitrary tags• Map to unit test framework « categories »• Scenarios « inherit » features tags• Can have multiples tags• Tags specified using @• @ignore is a special case

Tags

Demo


Recommended