Fog Creek Software
Discussion Board

Automated Testing of GUI's : in idea

A frequently noted problem with automated testing is testing the GUI.

But, shouldn't the GUI be capable of 100% control from the keyboard (with all those hotkeys we're supposed to put in buttons, etc.).

And, if you're not, you certainly could be doing that.

In that case, the GUI would be driven completely by SENDKEYS or something similar.

You'd still have a probem with EVALUATING the results, but you could supply data that would make an nice easy to spot pattern.

E.g.., list boxes would fill up with :

Or maybe

Or something similar, so visual checking is fairly easy.

Mr. Analogy
Tuesday, July 27, 2004

And the point is???

Tuesday, July 27, 2004


Tuesday, July 27, 2004

Winrunner is expensive, but good.

And the point of testing a GUI is NOT to test that all your hot-key navigation works, but that a user can 'click' on things and get them to work.

Sure, one of the ways of doing an automated unit test is to define some other interface 'inside' the one needed, and test that one.  (For instance, testing the hot-key navigation, instead of actual mouse clicks).

This works great, on occasion, but it depends on how much of the actual interface you are slicing off.  And even so, you really want to test the ENTIRE interface, mouse clicks and all, at some point.

Tuesday, July 27, 2004

I used to use Visual Test to do what you are describing. That used to be a $500 program, but it was bought by Rational, who was bought by IBM, and the latest version is called Rational Robot and runs $4000 per seat. The copy of VT5 that I have works with VB6, and tests the UI rather well, but is not good at testing NT services, web pages or db interaction.

You could "train it" by placing it in record mode and record mouse movement and clicks, and then edit what you get for the rest of your test.

Oh, look what google dredged up from the past:

Tuesday, July 27, 2004

NUnit Forms ( looks promising.

John Rusk
Tuesday, July 27, 2004

Can you do drag and drop with the keyboard?

What about mouse over a toolbar button and a tooltip?

What about if there's a bug which only applies if it's done with the mouse? For something like a drawing program, the code path for mouse and keyboard will probably not  be identical.

S. Tanna
Wednesday, July 28, 2004

*  Recent Topics

*  Fog Creek Home