Download presentation
Presentation is loading. Please wait.
Published byNancy Washington Modified over 9 years ago
1
SpecFlow & Gherkin Behavior Driven Development
2
Definitions Behavior Driven Development SpecFlow Structure Gerkin Demo Agenda
3
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 ?
4
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 4 What is Behaviour-Driven Development
5
5 Use in Test-First Approaches
6
6 Development iteration cycle
7
7 SpecFlow Structure
8
Business readable domain specific language Represents tests in natural language, not code Line-oriented Uses indentation to create structure Keywords +40 spoken languages 8 What is Gherkin ?
9
Top level grouping Contain one or more scenarios Contain logically related test scenarios Represent small, discrete features of the system 9 Features
10
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 10 Scenarios
11
Set up initial state : Given Perform action(s) : When Check end state : Then 11 Scenario steps keywords
12
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 12 Tags
13
13 Demo
14
https://github.com/techtalk/SpecFlow/wiki/Documentation https://github.com/cucumber/cucumber/wiki/Gherkin http://docs.behat.org/guides/1.gherkin.html http://dannorth.net/introducing-bdd/ 14
Similar presentations
© 2025 SlidePlayer.com. Inc.
All rights reserved.