RoutineBot – Simple Interface Test Automation Samples

There are few simple interface testing samples available in setup package. For details check \Samples\ directory of installation folder.

More script samples are available in the online help for RoutineBot sytax.

Please note: these tests contains some system-specific information such as fixed paths to script files and screen samples of WinCalc, which might also be different on your system. If you will install RoutineBot in the “C:\program files\RoutineBot\” folder and you are running WinXP then scripts most likely will be executed normally.

Test batch file

In the samples folder we have placed a batch file which allows to automate testing with many scripts. Here it is:

@echo off
CLS

echo ————————–
echo Test 1 – Multiply values
call calc-button-click.bat
echo Test 1 result:
type res1.txt
echo ————————–

echo Test 2 – Summarize values
call calc-test.bat
echo Test 2 result:
type res2.txt
echo ————————–

pause

once quality assurance engineer run this file, the scripts will be executed one by one, here is what should be outputted:

Calc Button Click Test

This test will run Windows calculator and click there some buttons to multiply two numbers. Then it will check if result is what was expected and will close with “passed” message. Check the list commands supported in RoutineBot.

  • You can check the content of the script by unzipping calc-button-click.zip file.

The script text is:

Execute(‘C:\WINDOWS\system32\calc.exe’);
MouseFocuse(‘2button.bmp’,10000);
MouseClick;
MouseFocuse(‘multbutton.bmp’,10000);
MouseClick;
MouseFocuse(‘5button.bmp’,10000);
MouseClick;
MouseFocuse(‘equalbutton.bmp’,10000);
MouseClick;
MouseFocuse(‘multresult.bmp’,10000);
KillProcess(‘C:\WINDOWS\system32\calc.exe’);

  1. The script runs run cacl.exe
  2. The script searches for the image of “2” button and clicks this button
  3. The script searches for the image of “*” button and clicks this button
  4. The script searches for the image of “5” button and clicks this button.
  5. The script searches for the image of “=” button and clicks this button.
  6. The script searches for the resulted image, if found – execution successful if not found then execution failed.
  7. The script kills the calc.exe process.

To execute this script you should pass its name as a parameter to the Interpreter.exe. RoutineBot can generate the batch file with necessary parameters automatically, here is how the calc-button-click.bat looks like:

The most important are script name “calc-button-click.zip” and the -messagefile (which is res1.txt for this script) values.

Other samples

Posted in Samples
Tags: ,

Leave a Reply

Your email address will not be published. Required fields are marked *

*

Example: GUI test with RoutineBot

RoutineBot is testing GUI, trying to enter various values into the text fields and processing warning messages that tested program shows.

Gui Test Automation

GUI Testing TipsCheck out our GUI Test Automation tips.
Test Automation Step-by-Step
Learn more than 99% users know about test automation! Subscribe to maillist now! Learn how to create scripts that will do routine job for you.

Email: