Software Testing Social Network

Free Software Testing Tutorial and Quality Assurance Portal

Home Featured Articles Testing Tools IBM Rational Rational Robot Complete tutorial Rational Robot Part3

Complete tutorial Rational Robot Part3

Rational Robot - Running the Test Script

Playback on the same build

•To get a feel of how the test script is executed, let us run the test script on the same build that we recorded on.

•During playback, Do NOT touch the keyboard or mouse. Any keystroke/mouse-click could disrupt playback.

•To begin, click the Playback Script button on the Robot Toolbar.


•Select the “Order Item” Script from the list that pops up and click OK.

 

•Next the Specify Log Information window pops up. Here you can specify the Build and the log to store to. Since this is our first build, leave the defaults and hit Okay.

•

•Now sit back and watch the playback. Notice how much faster a computer can perform the playback compared to a manual playback.

Test Log - Viewing the Results:

•After Completion of the playback, Rational TeshManager opens up and displays the Test Log.


•Since we ran the test on the same build, as we can expect, both the verification points passed.

Running the Test Script - Playback on a faulty build

•Suppose after a week, we are given a new build of Classics Online to test. We want to be able to run the same script on the new build. This is known as regression testing.

•For the tutorial, we are provided with two other build, ClassicsB and ClassicsC.

•Let us take a quick look at ClassicsB:

ClassicsB is almost the same as our first build except that two bugs have been introduced. Without manually going through it, lets see if Robot catches them.

•Open up the script we had before, and edit the Start Application to ClassicsB.exe instead of ClassicsA.exe as shown.

 

 

•Now run the script again by hitting the “Playback Script” button on the Robot toolbar. Select the OrderItem script and click OK.

•This time on the “Specify Log Information” window, change the name of the build to Build 2 and the Log Folder to Default.




•Run the script. After a while a Network Error window pops up. This is one of the bugs mentioned earlier. Resist the urge to interact, and wait for Robot to take care of it.

 

•Once again TestManager pops open the Test Log.

•Notice that this time we have a warning called “Unexpected Active Window”.

This is Robot’s way of telling us about the Network Error window that popped up. Double clicking on it brings up a screenshot.

•Also, notice that our second Verification Point failed! To see what caused this failure, double click on it.

•This brings up a window displaying Order Status Window. The baseline that we captured while recording our script as well as the new capture that took place while running the script are shown for comparison.



•As you can see, the program ordered a copy of Bach instead of Beethoven. This is a bug in the program that would have been hard to find using manual testing.

Resilience to Change

•What would happen if we changed the arrangement of the window in Classics Online? Like moved the panels around or gave new captions to the buttons?

•Would Robot still be able to locate the right buttons and run the script?

•The answer is YES! Robot actually keeps track of the object names, not their properties like location/text,  so it will be able to run the same script even after such changes.

•This resilience to change is a key capability in regression testing that minimizes maintenance to test scripts.

•To test this out for yourself, run the script again on the third build, “ClassicsC.exe”. This is a bug-free build, with a slightly better looking interface and the buttons have different text on them.


Comments (0)Add Comment

Write comment
You must be logged in to post a comment. Please register if you do not have an account yet.

busy