Implementing ATDD with Cucumber and Java

PT20163
Training Summary
Acceptance Test Driven Development (ATDD) has become a standard development technique used by Agile teams to work through a collaborative process to develop a set of acceptance tests that describe how the system under development should behave. These tests are written in a special language called Gherkin and executed using the Cucumber program. This course focuses on the process of writing the executable step definitions in Java for the Cucumber program so that the acceptance tests can be run automatically, in much the same way JUnit runs unit tests automatically. All of the theory presented in this course is reinforced with examples, real world case studies, hands on exercises and projects. The course assumes that the acceptance tests have been written and validated and walks through the process of writing and testing the automation code and then implementing the step definitions to run the tests through several different kinds of interfaces.
Prerequisites
Students should be at least intermediate level Java programmers and should have some working familiarity with a Java IDE and test automation framework like JUnit or TestNG. The course uses Eclipse as the Java IDE and JUnit as the test framework.
Duration
2 Days/Lecture & Lab
Audience
The course is appropriate anyone who is involved in the implementation of automated ATDD tests.
Course Topics
How Gherkin works: Gherkin syntax and Step Definitions
  • Agile automated testing – testing through interfaces
  • Cucumber architecture and functionality
  • How Cucumber executes Gherkin via Step Definitions
  • The three stage test automation model: tests, interface and application
  • Testing the tests with a test interface and application mock
  • Verification of the step definition logic
  • Building the test class around the step definition
  • Using JUnit assertions for test evaluation
  • Handling complex data with Data Tables and Java Collections
  • Using Selenium to test through a web interface
  • The Page Object Pattern
  • Testing through Web Services
  • Selective Scenario execution
  • Cucumber reporting and formatting
  • Responding to changes in an interface or the acceptance tests

Related Scheduled Courses