Case Study: User Change Password Automated Test

Completing this simple automated test well is not as easy as some might think.

Zhimin Zhan

--

A repost of my daughter’s article with permission. I added the review part. This is also included in my “How to in Selenium WebDriver” series.

This article will provide four approaches to One Test Automation Scenario Interview Question that Most Candidates Failed.

“Change a User’s Password”

Table of Contents:
· Be aware of Side-Effect of Test Execution
· 1. Change the password back
· 2. Starting with a newly created user
· 3. Save the password-change status into a file
· 4. Database Reset
· Review (by Zhimin)

Be aware of Side-Effect of Test Execution

Unlike Unit Testing, functional testing may have side effects, that is, changing the state of the application or certain data. This test case falls into that category.

After a user changed his password successfully, we cannot use the old password to log in again. The below video (animated GIF) shows the execution of running a change password test twice, then failing the second time.

--

--