Member-only story
Web Test Automation Workbook #05: Multi-Login Tests (RSpec Syntax Framework)
Learn the RSpec syntax framework in minutes.
5 min readDec 2, 2022
This article is one of the “Web Test Automation with Selenium WebDriver Workbook” series, a set of bite-size exercises. Try to find 20 minutes to read and do the exercise on your computer.
Learning Objectives
- Understand Test Syntax Frameworks
- Learn RSpec Structure
before(:all), before(:each), after(:each), after(:all)
in RSpec- Navigate to a URL in Selenium,
driver.get
- Execute all test cases in a test script file
Test Case 05
Test Design
There will be three test cases. We can build from the test script file from the previous exercise.
- Update to use an invalid username.
- Remove the assertion.
- Change the test case to ‘Login 1’ or alike
- Copy-n-paste to create two other test cases, “Login 2” and “Login 3”.
Essentially, there are three similar test cases, for each test case:
- Navigate to the login URL,
https://travel.agileway.net/login