Automate visual testing
RoutineBot is a visual test automation software that provides a user with the opportunity to create and execute tests based on image patterns.
Key Benefits of RoutineBot:
- Allows you to automate visual testing by two methods – manual script design or automatic script recording;
- Can automate a variety of events - mouse events (clicking, moving), keyboard events (entering text), taking screenshots, loading and saving data, downloading files, working with applications and windows;
- Supports wide range of functions to log events which includes advanced htm log with screenshots of test cases;
How to Test “Hello World” Application with RoutineBot
Manual testing: testing engineer needs to open the application, pass certain parameters and click certain buttons, then make sure that the expected results exist.
With RoutineBot: testing engineer creates image patterns and writes scripts that will click certain buttons, then check if expected results were obtained.
In terms of time and money, manual testing is faster, but it should be considered an expenditure, as you need a testing engineer each time a test is performed. Automated testing should be considered an investment, although you spend more time on designing test script, it can be used in the future.
Example: “Hello World!”
This is the application that we want to test. If you click on the “Say Hello!” button, it should show some text.
We need to take a snapshot of the screen and then crop the image and save it with the button:
Cropped image will be saved under the “Hello” name:
Now, we assign the “MouseFocus” event to this image in order to make RoutineBot find the image pattern on the screen and focus in on it:
MouseFocuse(‘hello.bmp’,10000); // MouseFocuse event will try to find “hello” image
Then, we need to add the “MouseClick” action, so that RoutineBot does not just focus, but clicks the button:
Now, we need to add the expected pattern:
Now, we will improve our code to add more opportunities to the log event which will help us debug the application. The resulted code is:
if result=1 then begin
LogMessage(‘hello word test – passed’); // we are adding message into default log
ShowHint(‘Passed!’); // we are showing hint in the system tray
LogMessage(‘hello word test – failed’);
LogImageUnderCursor(100,100); // if execution failed we want to know what image was actually under cursor