As there are numerous programming exercises in this class, knowledge of Java is required. This course also presumes a familiarity with Scrum.
This course is a hands-on workshop intended to teach participants the fundamentals of automated testing of a software application. The course will look at the processes and tools used to in automated testing, as well as the different types of testing that can be done. A strong focus of the course is when and how to use automation in testing.
The class begins with an overview of Acceptance Test-Driven Development and Behavior-Driven Development. Participants are taught to move from User Stories to Specification by Example, and then to use these examples in the creation of test cases.
Throughout the course, we use the Cucumber tool and Gherkin language. Participants learn how to create executable acceptance tests that are the actual requirements. From there, the steps in the feature are converted into Java step definitions.
Participants will work numerous examples in which they create and execute acceptance tests for existing web sites and API’s. Special web sites built specifically to be tested are used in this course. As part of the exercises, participants will learn to refactor both their test code and production code, create a Domain-Specific Language, and learn to use the Page Object Model pattern.
The course also covers Unit Testing with JUnit. Students will create Unit Tests from the requirements for a given object. They will first create tests from a business perspective, and then learn how to augment that test suite with tests developed from a testing perspective.
The final topic is Continuous Integration (CI). Students will work with Jenkins, a CI tool, and experience the impact of CI on testing and test strategies.
The course is intended for testers, developers, quality engineers and managers who want a practical and hands-on course in software test automation. As programming exercises are included in the course work, a knowledge of Java is necessary.
Upon completion of this course, participants will be able to:
- Describe the ATDD, BDD, and TDD processes
- Explain different types of requirements, and the approaches to testing each
- Describe the types of tools available for test automation
- Write requirements in Gherkin that are executable
- Create step definitions for the Gherkin requirements and use them to test production code
- Refactor tests including using patterns (Page Object, eg) and the DRY principle
- Use JUnit to create unit tests
- Understand and demonstrate techniques for testing leaf and non-leaf objects
- Create a Domain-Specific Language
- Test web based applications using Selenium Web Driver
- Exploit automated testing for data-driven, multi-platform and cross-browser testing
- Use test automation for implementing continuous integration
Overview of JUnit
Testing techniques with JUnit
Tools for Automated Testing
ATDD Process: Discuss, Distill, Develop, Demo
Red – Green - Clean
Understanding Roles and Responsibilities
ATDD/BDD Work Process Flow and integration with tools
ATDD Best Practices
Writing Test Cases with Cucumber and Gherkin
Gherkin Syntax – Keywords
Features and Feature Files
Writing Test Cases as Gherkin Scenarios
Create Multiple Scenarios for a Single Feature
Good/Bad Practices – DSL
Automated Test Steps
Java Runner Class
Creating step definitions – code for automated tests
Refactoring Step Definitions
Testing Web Apps with Selenium
Selenium and Selenium Web Driver
Class Exercise 1: Web Navigation with Selenium
Class Exercise 2: Links and Buttons
Class Exercise 3: Text Fields
Class Exercise 4: Refactoring tests
Class Exercise 5: Pop ups
Class Exercise 6: Items in a list
Page object pattern
Class Exercise 7: Page Object Pattern
Multi-platform and cross browser testing
Testing an API
Structure of a Unit Test
Creating Unit Tests
Class Exercise: From User Story to Acceptance Criteria to Unit Tests
Designing for Testability
Mocks and stubs
Branches and Merges
Continuous Integration and automated testing
CI environments - Jenkins
Developing a plan for using Automated testing in your daily work