Agile, Automated GUI Testing software (AGT)

(Note: This article was written in 2010.)

If you happen to be looking for something to do this Memorial Day weekend, here's an early release of my free (GPL) Agile GUI Testing software (AGT).

In short, just download the file below, and when you un-tar it, it will create a "scripts" folder. That folder contains our GUI testing software, along with two sample scripts. If you'd like to see how the sample scripts work, they are shown in this two-minute YouTube video (Agile GUI testing, basic demo).

Open source

The first thing to say about our Agile GUI Testing (AGT) that it is free, open source software. The software is available in the Downloads section below, and I'll be hosting the source on a SVN or Git source code control site soon.

Agile GUI Testing software

Our Agile GUI Testing (AGT) software consists of two main parts. First, there is a GUI application named AGT Recorder that lets you record your interactions with the GUI application you're testing. The aim of the recorder is to let you record your interactions with any application as rapidly as possible (web application, client/server, whatever).

The Recorder creates a plain-text script file that can then be played by the AGT Player. The GUI Testing Player plays back scripts that you've recorded. Besides being plain text, the scripts themselves are actually ... drumroll ... Ruby programs!

(Pause to let that sink in.)

Okay, I lied ... they’re really JRuby programs.

(Additional pause.)

Because they are Ruby/JRuby programs, they are:

  1. Plain text, meaning that you can edit them and customize them to your heart's content.
  2. You can also take advantage of the power of the Ruby syntax to do, well, anything you want.
  3. Finally, because they are JRuby programs, you also have all the power of the Java language at your fingertips as well.

Given Ruby and Java as my languages, I don't think the scripting language will be lacking any power. (And that has nothing to do with me, but the fact that you can do an awful lot with Java, Ruby, and JRuby.)

Motivations

In short, the motivations for writing this GUI testing software are as follows:

  1. To make it as easy as possible to perform GUI tests on software applications.
  2. To make it fast to start testing GUI applications, and fast to modify your GUI test scripts.
  3. To support multiple platforms.
  4. To provide a simple-yet-powerful scripting language.
  5. To let you run a series of GUI tests in succession. In this way, you can have a system dedicated to constantly running your GUI tests, and to notify someone as soon as something breaks.
  6. To depend on "timing" and x/y coordinates as little as possible.

I'll try to explain more about each of these design goals as I go along, but if you have experience with automated GUI testing systems, your probably aware of many of these needs already.

Warning!

Please be very careful when using this GUI testing software!

Running an automated robot on any computer system is a dangerous thing to do. You can easily type or click in the wrong place, which can wreak all sorts of havoc on your computer. If possible, use a test computer, especially one that has a user account with very limited privileges on the computer and network.

I have not tested this yet on Windows or Linux, so if something appears very wrong, quit using the software, and please let me know about the problem. (I'll get to Windows and Linux as soon as I can.)

I think this software can be very useful, but as mentioned, it can also be very dangerous.

Requirements: JRuby and Java

As mentioned in earlier Agile GUI Testing articles (Sample GUI testing script, and eXtreme Software GUI testing), you'll need JRuby to run this software. If you don't already have JRuby installed, just download it from the JRuby.org website, and install it as described there.

You'll also need a version of Java installed ... probably Java 1.5 or newer ... I need to check on the exact requirements. Hopefully most systems have Java installed these days. You just need the JRE, not the full-blown JDK/SDK.

Download my GUI testing software

As mentioned above, to experiment with our GUI testing software, just download the file below, and when you open it, it will contain a "scripts" folder, which contains at least the following files:

3ChromeOpenDDAndOma.rb
4TypeIntoTextEdit.rb
AGTImageRecognition.rb
AGTKeys.rb
AGTPixelColorValidator.rb
AGTPlayer.jar
AgileGuiTesting.rb
README
doc/

(The actual list of files being distributed will change a lot, and this list probably won't be in sync.)

Here's the filie to download:

Hopefully the README file, the two sample scripts (3ChromeOpenDDAndOma.rb, 4TypeIntoTextEdit.rb), and the Rdoc documentation in the "doc" folder will be enough to get you started.

Agile GUI Testing: Demo videos

Again, here's a link to the demo videos on YouTube that show how the two supplied scripts should work:

That second video really starts to show some of the things we can do with our GUI testing software.

Summary: GUI testing software

Again, please be very, very careful with this software, and just take baby steps until you understand what it's doing, and you see that everything is working properly on your computer system.

Also, note that the AGT Recorder is not in this release. I'll get to it as soon as I can.

Add new comment

The content of this field is kept private and will not be shown publicly.

Anonymous format

  • Allowed HTML tags: <em> <strong> <cite> <code> <ul type> <ol start type> <li> <pre>
  • Lines and paragraphs break automatically.
By submitting this form, you accept the Mollom privacy policy.