Skip to content

Instantly share code, notes, and snippets.

@mrtns
Last active August 29, 2015 13:58
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save mrtns/10081393 to your computer and use it in GitHub Desktop.
Save mrtns/10081393 to your computer and use it in GitHub Desktop.
BDD Implementation Patterns Workshop

Abstract

Behaviour Driven Development, like any other dogma in software development, is a complicated beast. It's proselytized by the zealots, and abdicated by the trolls. The practical reality is somewhere in between. And the best we can do is arm ourselves with understanding.

BDD finds itself at the intersection of a lot of different disciplines. The majority of those are non-technical. This workshop will focus on the technical aspects. Having a solid understanding of these will allow practicioners to focus instead on the really important parts, instead of getting caught up in implementation details.

Syllabus

BDD: An Overview

  • the different areas of BDD

The Anatomy of a BDD toolset

  • Description
    Defining the Software Under Test
  • The site, the app
  • The pages, the screens
  • The users, personas
  • The PageObject pattern
  • Specification
    Defining the Behaviours of the Software Under Test
  • The stories
  • The scenarios
  • The steps to reproduce each scenario
  • Driver
    Driving the Software Under Test
  • APIs for Web Browsers, Native Applications, HTTP Network Services
  • The Selenium WebDriver API
  • Execution
  • The test runner
  • The execution of the specifications: take the specs and send instructions to the driver
  • The coordination of execution state (the context): e.g. current site, current page, current user, current spec, current step, current driver, etc.
  • The collection of the specification results
  • Documentation
  • presenting specifications
  • tying specification to execution result over time

The Tooling Landscape

  • plain text (gherkin) vs programmatic DSLs
  • Look at StoryTeller (.NET), SpecFlow (.NET), WebChauffeur (.NET), Appium (Any), Cucumber (Ruby), RSpec (Ruby), Watir-WebDriver (Ruby), Selenium WebDriver (Any), SlimerJS (JavaScript), CasperJS (JavaScript), Capybara (Ruby), FluentAutomation (.NET)
  • Look at how each framework treats Definition, Specification, Driver, and Execution concerns

Back to the DSL

  • Integrating Description, Specification, Driver, and Execution Context DSLs
  • Writing Specifications Imperatively vs Declaratively
  • Advanced test data setup scenarios
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment