Case Study: Simulate Two Users with Selenium Automation Scripts

An impressive demonstration of a typical enterprise business process scenario with automation scripts.

Zhimin Zhan

--

This article is included in my “How to in Selenium WebDriver” series.

This article will show the execution of a Selenium WebFriver script to test/showcase a typical business web app. I will explain some automation techniques along the way.

Typically, a business app has two types of users: client and business user (owner and staff). There are business interaction processes between these two users. For example, in my WhenWise booking app, after a client makes a booking on the app, a business user can view the booking details.

A client makes a booking on his mobile, and the business owner views the booking details.

Hence, to develop a true end-to-end automated test, a test automation engineer needs to drive two browser windows (which is not possible with Cypress) to simulate two users. With the help of Selenium WebDriver, it is an easy job.

“You cannot use Cypress to drive two browsers at the same time.”
the offical Cypress Doc

Let’s see the action first (execution time: 32 seconds, the below is an animated GIF. A video version can be found towards the end of the article).

--

--

Zhimin Zhan

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