Set up Running Automated UI tests on your First day at work: Part 3

Get productive with a good testing IDE, such as TestWise, for developing and debugging automated Selenium/Appium/API tests.

Courtney Zhan
5 min readMar 27, 2022

In Part 1 of this series, I showed you how to create a simple Selenium Test with TestWise Ruby edition; Part 2 showed developing/running tests without TestWise, from the command line or in Visual Studio Code. In this article, I will show the setup, a combination of Part 1 and 2, that I use every working day: TestWise Standard Edition.

TestWise Ruby Edition works, but it is only available for Windows. It nicely includes all the necessary packages but does not give you control over versions. Furthermore, it might not be transparent when upgrading (ChromeDriver, testing libraries or language runtimes such as Ruby and Python).

Installation

We will need to install TestWise Standard Edition, Ruby, ChromeDriver & Testing Libraries.

  • TestWise Standard Edition
    To install the Standard Edition, click the red ‘Download Now’ button for your OS (link).
    Run the executable (.exe for Windows, .dmg for macOS), and TestWise will be installed in a matter of minutes.
  • Ruby
    RubyInstaller for Windows with Devkit, such as ‘Ruby+Devkit 2.7.5–1 (x64)’, and run the installer. For macOS or Linux, use the usual package installer.
  • ChromeDriver, required for driving Chrome.
    Download the version that matches your browser.
  • Testing Libraries (called gems in Ruby)
    Install selenium-webdriver , rspec , …, etc. with the command like below
    gem install selenium-webdriver

See this article below for more details instructions for the installation of Ruby, ChromeDriver, the testing libraries and how to do execute RSpec tests on the command line.

Verify Installation

Now that we’ve installed all the components make sure they are in the right place so that tests can be executed. Luckily, TestWise can verify this for us.

Launch TestWise. Go to Settings, then the Frameworks tab and click Detect. This will check your versions of test frameworks and verify they can be found on your device.

Detect whether Ruby can be accessed in TestWise. Settings highlighted in red, Frameworks tab highlighted in orange and successfully detected Ruby version highlighted in green.

If a Ruby version can successfully be detected (i.e. there is a number and not a ‘?’), then success! If not, check and edit the ‘Execution Path’ under the “Execution” tab and relaunch TestWise if necessary.

The Execution Path setting in TestWise

TestWise Features

In Part 2 of this series, we covered how programming editors can be used for writing (and running) automated tests. So why would we need a specialised IDE like TestWise?

TestWise is:

  • Simple and easy to use
  • Code library & snippets
  • Keeping a browser open
  • Running selected test steps against the current browser

Simple and Easy

Different from programming editors, such as Visual Studio Code, TestWise was created from the ground up exclusively for developing/debugging automated functional tests. This makes it easy for less-technical team members such as manual testers and business analysts to get involved with automated testing, which many software projects thought was not possible.

Can you imagine a business analyst or customer to run test automated tests in Eclipse or Visual Studio? Think about it, it does not that be that complex. Autotmated testing is just another way ‘using’ the app. With TestWise, the learning curlve is reduced to a matter of seconds.

For example, running a test case is as easy as: open and run.

Running a test with a single button!

Code Library & Snippets

TestWise features a script library with common and useful commands. See the below screenshot for a selection of scripts.

Code Library can be accessed by the icon highlighted in red. The library is featured in the orange highlighted panel and code snippets can be inserted from the green highlighted ‘Insert’ button.

This is a beneficial feature for beginners to automated testing. It is quick to look up what you are trying to achieve (e.g. selecting from a dropdown/combo box by label) and inserting it. The script library also includes more advanced and uncommon scripts like “wait until” and accepting JavaScript dialogue boxes.

You may have noticed that there are also ‘Code Snippets’ at the bottom of the Script Library panel. These are shortcuts you can use the ‘Tab’ key to expand to complete commands.

These snippets can increase your efficiency (dfei is much easier to type than the full driver.find_element(:id, "")). Code snippets can be found via the code library.

Keep the browser open on executing a single test case

One other feature that is extremely helpful, is that the browser can stay open after executing a single test case.

As in the previous GIF (pasted below for convenience), we only ran one test. And we can see that once the test completes, the browser window remains open.

The browser does not close when a single test is run

This feature is helpful when writing the tests. It means you can continue and do manual work without needing to open a browser and manually repeat the steps yourself.

This is especially helpful for debugging. For instance, if a button you are trying to click failed; you can verify xpath you are using, by inspecting the open browser. I have personally found this to be very useful when debugging tests and is essential to TestWise’s most important feature — running selected test steps against the current browser.

Running selected test steps against the current browser

I will go into more detail for this feature in a different article (it’s that good). But the crux of this feature is that it enables you to run any test steps on a currently open browser. This means you won’t have to restart the test from the beginning and focus on particular test steps to ensure they are working as intended.

Closing

Hopefully this article has gotten you started on using TestWise Standard Edition; and gives some more insight into how useful a specialised IDE can be when writing, running and debugging automated tests.

--

--

No responses yet