End to end or acceptance tests are very important for every application. The code can work perfectly but user still can see blank screen on a site. How to avoid this? This training teaches how to drive browsers via Selenium WebDriver; how to test complex UIs, and deal with single page applications. We will also cover ATDD and BDD practices to write specification and tests before the actual code. As a primary tool for web testing we use Codeception which allows to write tests effectively in by implementing high-level API. Such tests are easy to write, read and maintain. We will also cover how to manage data inside a test.
Target Audience:
Engineers
Workshop agenda:
General overview
The purpose of automated testing
Testing styles: blackbox and whitebox testing
Levels of testing: acceptance, functional, integration, unit.
Business specification to drive a test
Behavior Driven Development (BDD)
Basics of browser testing
Selenium WebDriver and other testing tools.
Acceptance Testing Inside a Browser
Getting started with Codeception
Using WebDriver module
Writing basic test scenario
Locating elements on page
Locator strategies (CSS, XPath)
Performing assertions
Waiting for elements to appear
Refactoring
Using PageObject pattern
Moving out common actions to Actor
Reusing session between tests
Multi-session browser testing
Grouping actions into StepObjects
Tips & Tricks
Using headless browsers for speed
Writing readable test scenarios
Managing test data
Reporters (XML, HTML, Allure)
Extending Codeception
Parallel execution