Book Image

Selenium Essentials

By : Prashanth Sams
Book Image

Selenium Essentials

By: Prashanth Sams

Overview of this book

Table of Contents (12 chapters)

Behaviour-Driven Development


Behaviour-Driven Development (BDD) is a part of the successful Agile methodology that creates a mutual understanding between business analysts, testers, and developers. It is a practice extended from the Test-Driven Development (TDD) and Acceptance-Driven Development (ATDD) approaches. Acceptance tests enclose business logic with procedural steps and tasks that fully rely on the software requirements, that is, they determine whether or not the given test scenarios meet with the requirements. The BDD scenarios are easy to understand and are reusable, especially their maintenance which is effortless in any time period. They can be parameterized using tables as a data source; on the other hand, multiple scenarios let you handle end-to-end tests as well. Refer to the following scenario:

Scenario: User authentication

Given I am at the login page
When I enter valid credentials
Then I should log in

Gherkin-based frameworks such as Cucumber and JBehave are fairly attractive...