Member-only story

Web Test Automation Workbook #05: Multi-Login Tests (RSpec Syntax Framework)

Learn the RSpec syntax framework in minutes.

Zhimin Zhan
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.

  1. Update to use an invalid username.
  2. Remove the assertion.
  3. Change the test case to ‘Login 1’ or alike
  4. 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:

  1. Navigate to the login URL, https://travel.agileway.net/login

--

--

Zhimin Zhan
Zhimin Zhan

Written by Zhimin Zhan

Test automation & CT coach, author, speaker and award-winning software developer. Help teams succeed with Agile/DevOps by implementing real Continuous Testing.

Responses (1)