BDD To The Bone: Acceptance Testing with Behave and Selenium

Learn how to ensure the right thing is built by applying Behavior-Driven Development with Behave and Selenium, a browser automation tool, for end-to-end acceptance testing and executable specifications.

Key takeaways
  • Don’t waste time building the wrong thing; use acceptance testing to ensure the right thing is built.
  • Behavior-Driven Development (BDD) involves describing requirements in natural language and writing tests to validate them.
  • Selenium can be used to drive a web browser for testing.
  • Gherkin is a language used to express requirements; it’s testable and transferable.
  • Understand requirements early on to avoid misunderstanding and rework.
  • Acceptance testing involves end-to-end testing; focus on behaviors, not code.
  • Selenium provides access to HTML elements and can handle JavaScript interactions.
  • BDD helps create executable specifications that can be run.
  • Use Gherkin to create a shared vocabulary with non-technical stakeholders.
  • Gherkin can be used to test acceptance criteria.
  • Selenium provides reporting capabilities and error handling.
  • Test-driven development (TDD) involves writing tests before writing code. *Bot>”)