Repurposing Automated Scripts for Live Demonstrations

Transform Selenium automated test scripts to automation scripts

Courtney Zhan
3 min readOct 29, 2022

Recently, I did a presentation for a university course’s project (part-time study). To demonstrate more app features within a limited time (4 minutes), I decided to use an automated script to assist in showcasing the app.

This article will show how I flipped the automated test scripts into showcase scripts for a demo. I already created a set of automated test scripts along with development.

Regression test report on testwisely.com

Why use automated scripts for demonstration purposes

  1. Faster than doing it manually
  2. Reliable
  3. Talk with ease (highlighting the key points)

Converting existing automated script into demo script

I already had working automated test scripts. It was easy to convert them into automation scripts for demo purposes.

1. Create a new folder called showcase

2. Copy your test script over to the showcase folder

New folder called `showcase`, I started with `01_login_add_review_spec.rb` which started as a copy of login_spec.rb

3. Remove assertions from the showcase script
The showcase is just an automated script to drive the browser. We don’t need to assert text/behaviour as it’s not a test script.

4. Update/combine test scripts into the showcase script
For demonstration purposes, sometimes you want to show more than one functionality. For mine, I combined two test scripts: “logging in” and “leaving a course review” into a single showcase script.

My first showcase script, shows multiple pages and functionality

Running your script

The script’s execution speed might be too quick to see details or for you to talk about.

You have two options:

  1. Use sleep to add specific delays to the script
    Not recommended. This is time-consuming and changes the script in many places.
  2. Set a delay between operations with a supported tool
    In TestWise (a testing IDE)’s settings, you can set a delay. In this case, I set it to 0.3 seconds. This means there is a 0.3 second wait between each step. This will effectively slow down the execution speed and easier for the audience to follow.

Furthermore, in the same setting dialog, I ticked the "Highlight web control during execution" option. TestWise will highlight the controls in yellow to make them obvious in demonstrations.

Below is a screencast (1min 13 seconds) of my project demonstration using the above showcase scripts & execution delay:

The demonstration went quite well, the tutor was quite impressed and asked me what the script was written in. In case you are wondering the same, the answer is raw Selenium in Ruby, running in TestWise.

--

--

No responses yet