In this video, Meaghan Lewis explains the value of adding structure to WebDriver tests by using the help of the libraries rspec-expectations and rspec-core.
- [Instructor] To confirm that the user is signed up,…we'll want to add a final step in our test verifying this.…When I sign up manually, I see that after submitting…the form, a banner shows up on the home page…to notify me that I have signed up successfully.…I'm going to use that banner in an assertion…to confirm that it appears after sign-up.…In order to write assertions, we need the help…of another Ruby library, since this is not something…that is provided either natively in Ruby, or by…Selenium WebDriver.…
There are multiple libraries that exist…to help us write assertions.…The one I will use is called RSpec.…RSpec is a behavior driven framework for Ruby,…and offers multiple libraries that can be used to work…either together or independently.…We're going to use two different libraries to add…structure to our test, starting with RSpec Expectations.…This library provides an API to express expected outcomes.…There are multiple ways to express outcomes,…by equivalence, by identity, by comparisons,…and so on.…
Find out how to set up the test-writing framework, WebDriver, and Selenium Grid, which allows you to distribute the testing load and run tests against a remote server. Learn best practices to write effective tests using variables and functions, and to organize tests into suites that can scale over time. Instructor Meaghan Lewis—a QA engineer at GitHub—also explains the test pyramid paradigm, which details an ideal way to balance unit, integration, and UI testing.
- Setting up Selenium WebDriver
- Using the Selenium grid to distribute the testing load
- Setting up a hub and nodes
- Writing clean test code
- Organizing a test suite