Successfully reported this slideshow.
We use your LinkedIn profile and activity data to personalize ads and to show you more relevant ads. You can change your ad preferences anytime.

Using Specflow for BDD

884 views

Published on

How to start using specflow for Behavior Driven Development.

Published in: Technology

Using Specflow for BDD

  1. 1. Using Specflow for BDD
  2. 2. Specflow Installation Demo
  3. 3. Gherkin Language
  4. 4. Features Contain One or more scenarios Group/Contain logically related scenarios Represent small, discrete features of the system
  5. 5. Features Start with “Feature:” keyword Followed by feature name/terse description Optional free text description Feature: Brush Teeth Brushing teeth is good because it helps keep them clean
  6. 6. Feature As a ….. I want ….. So that ….. In order to … as a ….. I want
  7. 7. Scenarios Concrete examples of expected system behaviour Each scenario describes a particular situation Each scenario should be independent and isolated from other scenarios Can represent - Happy Paths - Error Paths - Edge Cases Start with “Scenario:” keyword Followed by title Scenario: Successful Brushing
  8. 8. Scenario Steps
  9. 9. Tags Mark features and scenarios with arbitrary tags Map to unit test framework “categories” Scenarios inherit feature tags Can have multiple tags Tags specified using @ @ignore is a special case
  10. 10. Using Data Tables in Steps Allow tabular data to be passed to individual step Useful for specifying large data rather than multiple steps
  11. 11. Scenario outlines
  12. 12. Background Provides context (state setup) to the scenarios in a feature Executed before any scenario
  13. 13. Coding the Automated Steps Demos
  14. 14. Coding the automated steps
  15. 15. Linking TFS with SpecFlow

×