How I may help
LinkedIn Profile Email me!
Call me using Skype client on your machine

Reload this page IBM Rational Robot Test Automation Architecture

Here are my notes summarizing stacks of manuals and web pages on the Windows-based software testing tool Robot from Rational.comA website external to this site. Rational was an independent corporation (NASDAQ:RATL) until IBM acquired it on December 2002.

The word robot is a contraction of the word "robotovat", which was coined by Czechoslovian Karel Capek to mean "to work very hard".

Sound: Steve Martin's “:Excuuuuse Meeee”

 

Topics this page:

  • Functionality Summary
  • Product History
  • Product Integration
  • Installation
  • Product Invocation
  • Test Assets
  • Data Management
  • Fee-Based Offerings
  • Get Certified in this
  • User Groups
  • Utilities
  • Your comments???
  •  

    Site Map List all pages on this site 
    About this site About this site 
    Go to first topic Go to Bottom of this page

    Search

    Set screen Product Functionality Summary

      Robot automatically plays back scripts that emulate user actions interacting with the GUI of applications under test (AUT). The validity of the AUT is determined by comparators at Verification Points, when objects of the AUT are compared against a baseline of what is expected.

      Robot records several types of scripts:

      • SQABasic scripts (using MS-Basic language syntax) capture the commands equivalent to each user action.
      • RobotJ scripts (using Java language syntax) These are compiled into .class files containing java bytecode.
      • Virtual User (VU) scripts (using C language syntax) capture entire streams of conversations HTML, SQL, Tuxedo, CORBA Inter-ORB IIOP, and raw Sockets Jolt protocols sent over the network. These are compiled into dynamic-link library (.dll) files and linked into a .obj compiled from a .c source file which calls the .dll file.

      Both types of scripts can be initiated from the Test Manager product. VU scripts are executed from a schedule. A separate IBM product, Rational Suite Performance Studio (LoadTest.exe), plays back Virtual User (VU) script commands to determine an application's performance speed and to detect contention problems caused by multiple users performing actions simultaneously.

      Captured scripts typically need to edited to:

      • Add for, while, and do-while loops to simplify repetitive actions.
      • Add conditional branching.
      • Modify think time variables.
      • Respond to runtime errors.
      • Store and retrieve test data to/from datapool files.

      There are several ways to create Robot scripts. Scripts can read and write to datapools.

      As scripts run, Log records are generated into Log Files used to trace script execution conditions.

     


    Go to Top of this page.
    Previous topic this page
    Next topic this page

    Set screen Product History

      The product name Robot was created after Rational purchased SQA TeamTest v6.1. Before that the product was named PLA. This is the reason for references to “SQA” and “PLA” within the product. Thus, Robot scripts are in Rational's SQABasic languageanother page on this site, which is based on an early version of Microsoft's Visual Basic language.

      Robot 7.1 was released Feburary, 1999.

      Robot 2002.5.20 is my most current release. It has conflicts with McAfee. So uninstall McAfee and re-install it after Robot. Yes. A hassle. The suite version also includes the RobotJ product, which is based on the Java platformanother page on this site.

      Because RobotJ is based on Java, it is not capable of recording and playing back actions against Windows system menus such as the Control Panel. RobotJ cannot record and playback applications running under Purify and Quantify. Also, RobotJ does not work with the Unified Change Management (UCM) edition of ClearCase datastore VOBs. ClearCase uses a new type manager in folder /lib/mgrs/map (installed from the RobotJ ClearCase Server Extension setup) to recognize RobotJ test object maps. So they should be in a separate VOB than other assets.

     

      RobotJ documentation is only available online (not on the installation CD).


    Go to Top of this page.
    Previous topic this page
    Next topic this page

    Set screen Product Integration

      The Robot “classic” product based on SQABasic for VB apps costs $3,954, which includes first year maintenance of $659. It is part of the Rational Suite TestStudio (formerly Test Studio Suite). With a retail price of $4,819 (which includes first year maintenance of $799), the package includes several products:

      • Most importantly, RobotJ for testing web and Java apps (with IBM JRE 1.3.0 as the default JRE) Its scripts are compiled because they are based on Javaanother page on this site rather than SQABasic. This architecture now enables Robot to run on Red Hat Linux. So to ensure cross-platform compatibility, record asterisk and plus symbols using the numeric keypad because those center keys don't play back in Linux.

        Setup automatically enables Java environments installed (which means it's best if you install Java before Robot).

        SiteCheck (rtstch.exe) checks for broken links and other web site management tasks. This is mentioned in the Using Rational SiteCheck documentation.

      • Robot scripts can automatically add defects to Rational's ClearQuest defect trackinganother page on this site product using the ClearQuest 7 API. However, I don't recommend this because most failures need to be analyzed.

      • Robot scripts can be played back from within Rational's Purify, PureCoverage, and Quantify products.

      • others... ClearCase LT, Requisite Pro, SoDA, Rose, etc.

        Using Rational LoadTest, VU Language Reference

      NetDeploy, SiteLoad are part of the Content Studio.

      Rational assembled these together from acquisitions of independent companies during the early 90's. This was done with their Best Practices for software development, called the Rational Unified Process (formerly known as the Rational Objectory Process).

     


    Go to Top of this page.
    Previous topic this page
    Next topic this page

    Set screen Installation

      Classic Robot

      The Robot installer creates Environment Variable RATL_RTHOME pointing to (by default) folder C:\Program Files\Rational\Rational Test. The sqabas32 subdirectory under this folder contains the SQAUTIL.sbl .sbh and .sbx files.

      Robot Administrator icon Robot Project icon The Robot Administrator is used to define project folders. Each project folder contains a sqabas32 subdirectory to hold Robot Test Script icon utility test scripts. The is is the folder shown in menu Tools > General Options ... > Preferences tab SQABasic Path field.

      When Robot starts, the project selected from the Rational Test Login contains a .rsp file which points to the folder used by the File > Open > Script dialog. This dialog does not permit switching to other folders.

      Reminder Robot looks for files in the active project's sqabas32 directory before it looks in the directory specified by RTHOME.

      Environment variable DDE_RUNTIME points to the production RUNTIME location.

      Caution! IF you selected Java or installed a Java JDK after installing Robot, you must run the Java Enabler again, or risk getting script errors at seemingly random points in your script.

      RobotJ

      Before using RobotJ, create a Datastore to hold scripts. Also Enable JRE Environments, and Configure (Add) Applications for Testing, and from within menu Window Preferences, select Rational RobotJ, Operating Systems and set Foreground Lock Timeout to "0". In Logging, select whether the log viewer is displayed after script playback. In Playback, Recognition Scores, define the threasholds. The default 10,000 value means that one important property can be wrong.

      If you must, change default colors in Message Preferences.

     


    Go to Top of this page.
    Previous topic this page
    Next topic this page

    Set screen Product (Agent Program) Invocation

      Robot "classic" runs as rtrobo.exe in folder x:\Program Files\Rational\Rational Test. By default it is invoked from Start > Program Files > Rational Suite TestStudio > Rational Robot. It takes several seconds to load. Its command-line parameters:
      script name
      /user user
      /password password
      /project full path to project
      /play
      /log log name
      /logfolder log folder name
      [/purify]
      [/quantify]
      [/coverage]
      [/close]
      [/nolog]

      Since v8.1:
      /build build name

      RobotJ runs as rtivory.exe in the RobotJ/hsher/ folder and invoked from Start > Program Files > Rational Suite TestStudio > Rational RobotJ

      RobotJ uses Rational RobotJ Enabler (rtprvd.exe) to intercept application calls and inject interrupts for TestManager. It is invoked automatically on startup from Program Files > Rational Suite TestStudio > Rational Test > Rational Test Agent


      This does not come up if you have Rational Test Administrator loaded.

     

      Paul Downes library file Robot.zip provide these command-line functions:
      '# SetRobotCmdLine Create Robot command-line string
      '# SetRegistryAutoLogon Set registry to automatically logon user
      '# SetRegistryRunOnce Set registry to run Robot on restart/reboot
      '# SetTestLogOptions Set Robot test log options
      '# GetSQAVersion Return the Rational/Robot version
      '# GetOSVersion Return the OS version
      '# GetSQAEnvironment Returns an array (data-type) of environment settings
      '# GetSQAEnv wrapper for GetSQAEnvironment to get individual settings
      '# GetScriptName Returns the current script
      '# GetUser Returns the user login ID
      '# GetRobotFileName Wrapper for GetModuleFileName API function
      '# GetApplicationPath Get full path & file name for exe from registry
      '# SetRobotExePath Sets path & file name for Robot exe in registry
      '# SQABasicRTLib Update "runtime" libs on a PC from a "Master" library


    Go to Top of this page.
    Previous topic this page
    Next topic this page

    Set screen Test Assets

      The assets of an automated test include on this pagethe AUT, on this pagepasswords, on this pagerequirements, on this pagescripts, on this pagedata pools, on this page log files, on this page baselines , each explained below:

      Set screen The Application Under Test (AUT)

      The URL to the website's start page or location of application .exe built for testing.

      Set screen Passwords

      A password and product license key is needed to invoke Robot.

      Rational Suite Version 2001A or later can run for 3 days while the computer is disconnected from the Rational License Server on the network.

      Set screen Requirements

      To encourage a methodical approach to testing, scripts are attached under a specific Requirement Hierarchy of the AUT This is done using Rational TestManager

     

      RobotJ documentation is only available online (not on the installation CD).

      Rational provides the “Classics Online” music store application as a sample AUT.


    Go to Top of this page.
    Previous topic this page
    Next topic this page

      Set screen Robot Scripts

      Classic Robot scripts can be created several ways:

      • Robot can automatically create SQABasic scripts by capturing user actions.
        • Menu selections replayed using statements such as
            Menu "File->SaveAs"
        • Mouse clicks are replayed using statements such as
            PushButton Click, "Text=OK"
            RadioButton Click, "name=radio3"
            CheckBox Click, "name=checkStudent"
            ComboBox Click, "name=comboCountry", Coords="25,10"
            EditBox Click, "name=txtQty"
        • Keyboard entries are replayed using InputKeys commands.
          • Alt-P = "%P"
          • Ctrl-P = "^P"
          • Shift-P = "?P"

        Text is automatically inserted at the top of scripts during recording from default Template File   Testproc.tpl in folder TMS_Scripts\SQABas32.

        Robot SQABasic scripts are also automatically generated by Rational's TestFactory product after it "maps" the application's objects by examining its programming source code.

        TestFactory is part of Rational's TestStudio Suite of products which include Purify, Visual Quantify, and PureCoverage. Getting Started

        Using Rational TestFactory

        SQABasic Scripts can be read by humans because commands in scripts refer to the names of objects rather than their crytic screen coordinates. Recorded scripts are Human-readable can also be changed manually by a programmer from within Robot or with any ASCII text editor.

        • SQABasic scripts have a file extension of .rec
        • VU scripts have a file extension of .s
      • Watch files have an file extension of .wsh.

      • Enablers allow Robot to detect the properties of objects in the underlying application. This means that objects can be specified for testing even if they are not visible in the application's interface.

      • Rational Robot can also record detailed mouse movements and keyboard actions in a low-level script stored in binary ASCII format. Before playback, Robot must convert scripts into machine instructions.
      • Compilation of SQABasic GUI scripts creates a file with the same file name as the script source file, but with a file extension of .sbx. Robot automatically recompiles such files when it detects that its script file has changed since the date stamps of its compiled sbx file. This is why you can remove the compile button from the toolbar.
      • Compilation of .c VU files creates an .exe file. This process refers to .h header files installed by default in folder \rational\rational test\include.

     

     
    Go to Top of this page.
    Previous topic this page
    Next topic this page

      Set screen Datapools

      Datapools hold variable data values that scripts can draw from during playback. This allows for varying test data during the execution of the same script file. To create a new datapool, use the Rational TestManager product menu Tools->Manage Datapools. Edit fields in them, and Import/Export command-delimited data with them.

    • Up to 150 Datapool column names can be specified and stored in a datapool specification (.spc) file. Rational provides files of commonly used standard data types (such as first and last names, company names, cities, and numbers). Values for a special/custom data type defined by users can be generated using Robot's "Manage Data Types" Tool.
    • Datapool values are comma-separated-value text records written to files with a .csv file extension. Up to 2 billion rows can exist in each .csv file. This allows data to be imported from an Microsoft Excel Workbook.
    • Datapool files are stored in the folder named Datapool for each project. Datapool scriptsanother page on this site

    • Robot displays object data in a Data Grid from which a subset could be used to perform verification.

    • Custom verification points are executed from .dll files Identification method tells Robot how to identify the values to compare during record and playback.


    Go to Top of this page.
    Previous topic this page
    Next topic this page

      Set screen Log Files

      By default, each time that Robot runs a script, it creates a Log file to store the results it generates. This can be turned off by clicking the log button on the toolbar.
    • Log Output can be suspended and resumed within a script using commands
      SQASuspendLogOutput
      SQAResumeLogOutput
    • Additional log record entries can be created from a script using commands such as:
      SQALogMessage sqaNone, "End of test script.", ""
      Idea Issue the log message before taking action so that it appears even if the action fails.
    • Groups of Log files are organized into Log folders. Logs for a particular run could be stored under a specific build -- a version of the application-under-test. These folders could be sorted sequentially by Build name or in Build State order (Available, Rejected, Pending Validation, Scheduled, etc.)
    • Robot logs are read by Rational's LogViewer program. By default, the Rational TestManager displays the log after the run ends.
    • The result variable has a value of either "Pass" or "Fail". At Script End, the result for the entire script is marked "Fail" if any step failed.
    • Custom queries can be defined to provide filtered views of only the data desired - sorted in the key order desired.
    • Idea Log messages contain the line number of the script file having difficulty.
    • A log record can be the basis for filling out the TeamTest defect form in ClearQuest, Rational's e-mail enabled and Web-accessible defect tracking and change request management system. A ClearQuest database could physically be an MS-Access, Sybase SQLAnywhere, or other ODBC-compliant database such as MS-SQL or Oracleanother page on this site.

     


    Go to Top of this page.
    Previous topic this page
    Next topic this page

      Set screen Compare Baseline vs. Actual

      A Baseline defines the expected state of object properties during a test. Baseline data files are created from a baseline build of an application. Baselines are compared against actual data files created while executing subsequent builds of that application. Baseline files are located in the Cases directory. Baslines use these functions made available by including Rational's SqaUtil library:
      SQAEnvCreateBaseline
      SQAEnvCreateCurrent
      SQAEnvCreateDelta

    • Rational provides various comparators to display the baseline and actual files appropriate for Object Properties, Alphanumeric text, Grids, and Images.
      • The Image comparator can use masks to hide the underlying masked area from comparison when scripts are played back.
      • The object comparator:
      • In the RobotJ Verification Point Comparator:
        Load Verification Baseline to Edit
        Replace Baseline with actual values


    Go to Top of this page.
    Previous topic this page
    Next topic this page

    Set screen VU Script Bank Data

      VU scripts can store a series of integers or strings into environment variables Escape_seq and Logout_seq.

      The arithmetic operator (+ ) creates a union of bank expressions.


    Go to Top of this page.
    Previous topic this page
    Next topic this page

    Set screen Test Data Management

    • Each test asset is grouped under a specific Project.
      • A Test Suite is a group of script segments.
      • Robot scripts are stored with file extensions of .sbs.
      • The SQAGetDir()   command retrieves the current project directory.
      • Test assets can be imported and exported between projects.

    • Project data are physically contained within a Rational repository, which really is a folder on a local machine or server.
      • The Rational Administrator program creates and manages Rational repositories.
        It is used to create and manage projects which contain logical datapools within physical datastores. Security control information such as users and groups reside by project.

      In RobotJ, when an object changes, both old and new versions of that object need to be unified.

    • Rational's TestManager program (rtmanager.exe) creates and manages test assets such as test documents
      • A test plan (created using MSWord) defines a testing project so it can be properly measured and controlled.
      • Requirements in TestManager are stored as a Rational RequisitePro database. A single test procedure cannot be linked with more than one requirement.
      • The full version of RequisitePro provides traceabilty, change notification, and other features.
        RequisitePro 7 User's Guide


    Go to Top of this page.
    Previous topic this page
    Next topic this page

    Set screen Fee Based Offerings

     

     
    Go to Top of this page.
    Previous topic this page
    Next topic this page

    Set screen Utilities/Products

      NO LONGER AVAILABLE: Spyder, a defect tracking system which reads and writes information from SQA repositories. A much more affordable option than purchasing numerous SQA Manager licenses from Rational.

      Caution!Background processes can kill (crash) Robot during playback. If you must have MS Word running, go to Word's Tools menu, click Options, click the "Save" tab and uncheck both "Allow background saves" and "Save AutoRecovery info every:".

     

     
    Go to Top of this page.
    Previous topic this page
    Next topic this page

    Set screen Getting Certified in Robot

     

     
    Go to Top of this page.
    Previous topic this page
    Next topic this page

    Set screen User Support Groups

     

      A website external to this site rational.com/ruc
      Rational's International User Conference:
      August 24-28, 2003 at the Gaylord Palms Resort at 6000 W. Osceola Parkway, Orlando, Florida

     
    Go to Top of this page.
    Previous topic this page
    Next topic this page

    Portions ©Copyright 1996-2010 Wilson Mar. All rights reserved. | Privacy Policy |


    How I may help

    Send a message with your email client program


    Your rating of this page:
    Low High




    Your first name:

    Your family name:

    Your location (city, country):

    Your Email address: 



      Top of Page Go to top of page

    Thank you!