Wednesday, May 28, 2008

GUI Application to Test

Let's start with something easy. We have a Windows GUI application that looks like this:


The application contains a text box, two buttons, and a list box. It simply adds a text from text box as the last item to the list box (exe, source).

The testing steps might be as follows:
  1. Run the application.
  2. Check the 'New listbox item' fields is empty.
  3. Check the list box contains three rows with texts: 'This is', 'GUIAT', 'demo.'.
  4. Enter a text (e.g. 'new line') into text box, press 'Add Item' button. Verify your text ('new line') appears as the fourth line/item in the list box.
  5. Press 'Quit' button. Verify the application terminates.
Any record/play testing tool can do the test up to point 4. There it cannot verify whether the text was added to the correct place in the list box. These tools also cannot handle moving 'Add Item' button closer to the text box. They would then click to empty place. Sure there are more sophisticated tools that can handle the above problems. But I do not know about any for free.

Next time we try some dead ends from my beginnings :-)

Thursday, May 22, 2008

The beginning

Testing GUI application can be tedious work. Usually, you have to manually click through the interfaces. The first round is fun, the second is OK, and from the third round on it is boring.

When I joined Radiant, I started to think about automation. I searched on Internet but I did not find anything satisfying. All tools were basically record/play applications. That is not sufficient for testing. There are many concerns, for example:
  • How do you verify the test result?
  • How easy can you change the script (add testing of a new field, new form, etc.)
  • Scalability - how easy can you join basic scripts and create bigger (regression) script?
  • How the test application works with your amended components?
  • etc.
I know the testing tool cannot do everything. So I set up several goals I'd like to achieve:
  • Allow to control GUI application.
    That means to start it, navigates through it, close it. To know its status.
  • Allow to read values from the screen.
    You have to know what is on the screen to be able to test it.
  • Allow to set values.
    Also, you have to be able to set/write values into the application to be able to test it.
  • Easy to create.
    Testers are not experienced programmers. The tool must be easy to use. Anybody, who knows what a program is, should be able to write a test script.
  • Easy to maintain.
    When the tested application changes, amending a test script should not be necessary or be a piece of cake.
  • Scalability.
    Joining test scripts together, creating regression scripts.
In next few weeks, you'll find out on this blog how I succeed in this task.