Windows GUI Functional Testing Tool - QAuto Prototype - Platform / Language Independent
I am glad to announce the release of the prototype for QAuto - the Windows GUI Functional Testing Tool. This only works on Microsoft Windows.
Tested on XP. But you can try on Vista. Also, you need to have MFC dlls already installed on your machine.
It is platform / language independent. What does it mean? It means - it does not matter if you are testing desktop application or web application or Java app or .NET app; or what language was used to write the app - C++, VB, Java, C# etc.
What is its biggest drawback? It has one - it works with windows raw co-ordinates. That means, if your window has changed position - your test would fail. Language and platform independence comes at a price.
How does it work? It works with low level mouse and keyboard input recording and playback. It generates a human readable script that you can tweak around to insert Wait and Snapshot commands.
Why did I develop it? I wanted a simple and fast GUI functional testing tool to test the desktop software products that we develop for our client. There are very good tools out there - but they are expensive and what is more important is that we use custom Windows and the off-the-shelf tools do not work very well with those. To get them to work, we would need highly experienced testers who would be able to customize and write test scripts.
QAuto is very simple to use. It records and plays back keyboard and mouse events. The premise is - if it cannot play back - the test has failed. You can also take snapshots of the entire desktop to manually verify if the UI shows what you expected. At some point we can put in a pixel matching functionality - but that is for later. This is only a prototype.
A small note on how QAuto can be used for regression testing by developers. The process is simple. Developers can share a common LAN area where all test cases are stored. Developers have their own copy of QAuto. When they fix bugs or develop some functionality, they can enter (means, record) a corresponding test case in QAuto. So, the number of test cases keeps growing. The developer then executes (plays back) the n+1 test cases in QAuto with a single mouse click to do regression testing before committing code in source control. QAuto is very fast - the playback can finish in seconds whereas the recording could have taken minutes. Simple and highly effective. In the presence of a test team, the test lead can manage (add/edit/delete) the test cases.
Need to know more? Ask me.
You can download it here - but be warned, it is a prototype and there is no help file. So, please follow these basic steps:
Please Note - If you do not have MFC dlls on your machine - then you can download the full installer here.
Preliminary steps
1. Download and install it. Or, download the full installer with MFC dlls here.
2. Run it.
3. Click on ‘Options’ button and set the Test Case and the Results folders.
How to record?
1. Run QAuto.
2. Click on ‘Record’ button. Select a suitable test and description. Click OK to start recording.
3. Whatever actions (mouse and keyboard) you do now on your entire screen will be recorded.
4. Hit the Pause/Break key on your keyboard to stop recording.
5. Your test case will be stored and you can see it by expanding the test cases tree.
6. You can see the recorded script by double clicking on the test name in the test cases tree.
How to playback?
1. Run QAuto.
2. Select a test on the test cases tree on the right pane and click ‘Playback’
3. When playback is going on - do NOT touch your keyboard and mouse.
4. When the playback is over, you can see whether test passed or failed. The result will also be stored in your results folder (that you have already set using the options button).
5. Note that you can run full suite of tests by clicking on a test case node (rather than an individual test case). In that case, QAuto will run all test cases under that node and under the sub nodes. How do you get a node? You have to manually create a sub folder under your master test cases folder (that you set using the Options). Test cases can go under that folder and you can see this reflected in the tree.
When you Record a test case, you can select a sub node and that will store the test case under that sub node. You can also manually move files around in your hard disk and that will be reflected by QAuto when you click the “Refresh Test Cases” button or you restart QAuto.
Other stuff
1. Often, you need to introduce Wait manually in your recorded script. That is because QAuto plays back very fast. So fast, that the system does not get time often to bring up a window (when QAuto expects it). That causes the test to fail and that is spurious. So, you need to use the Wait command in your script.
In a line by itself type in Wait(1000) to make QAuto pause for 1 sec. The Wait command takes in a number denoting the milliseconds to wait.
2. Also, you need to take a snapshot of the screen (screen capture) at specific points of QAuto run. This is so that you can manually verify window contents so that you can tick off tests as passed. How to do that? Use the Snapshot command. Snapshot command takes a name (no extension). For example:
Snapshot(abcd) will take a screen capture (entire windows desktop) and store as abcd.png image file.
Insert Snapshot commands at the points you wish to capture screenshots.
3. How long will QAuto wait for window to appear before prompting you to abort / retry test? This is set using the Waiting Time value in the Options. You can set a value from 0 to 10. A value of 0 means that QAuto will prompt immediately if it cannot detect an expected window when playing back. However, it is prudent to set a value of 3 or more for Waiting Time.
4. This is a bit advanced. Click on Options button to bring up the Options window. You will see a Sync Fine Tune slider. When QAuto plays back mouse and keyboard events, sometimes the windows for which it is meant - does not receive it. This is because of playback speed. However, you can make the event insertions in the system slower by increasing the Sync Fine Tune value. The higher the value - more accurately the playback will happen (and correspondingly slower). This varies from system to system - so I have put it as an option.


Recent Comments