Home
Rational Robot User's Guide
Contents
1. JavaSplitPane Contents Captures and displays the current scroll value for the pane JavaTable Contents Captures and displays each cell in the table JavaTableHeader Contents Displays each column header in the table JavaPanel Contents Captures and displays the data sensitive objects in the JavaWindow object and its children A data sensitive object is a child or nested child of a selected object that contains dynamically generated data Examples include EditBoxes CheckBoxes and RadioButtons but not PushButtons JavaMenu Contents Captures and displays the menu header and items for JavaPopupMenu each menu Java Active State Menu Test Captures and displays the currently selected menu item Captures and displays the menu header and items for each menu along with accelerator keys and mnemonic specifiers Testing Properties of Java Components You can use the Object Properties verification point to test the properties of Java components Properties describe a component s characteristics such as its appearance state behavior and data The Rational Object Testing technology inspects and verifies all properties of the components in your application including hidden properties that cannot be tested manually To test the properties of Java components 1 Start recording in Robot For details see Recording a New GUI Script on page 2 15 Navigate to the page that contains the component you want to te
2. 0 000005 6 38 Defining a Client or Server Computer 0 000 6 39 Removing a Computer or Port 0 0 0 0 eee eee ee 6 41 Authenticating Logon Information 000 6 41 When to Modify the Authentication Datapool 6 42 Modifying the Authentication Datapool with TestManager 6 42 Modifying the Authentication Datapool During Recording 6 43 Unique Features of the Authentication Datapool 6 44 Managing Proxies erno os oF eb ON 8a ORR Qe Gee eee 6 44 Starting and Stopping Proxy Service 0055 6 44 Monitoring Proxy Activities 0 0 00 00 0000000 6 46 Deleting Client Server Pairs 0 0 0 0 00 000000 6 47 Deleting ay Proxy ieie ee le devctne a aes ade 6 47 Re Creating Proxies That Have Been Removed 6 48 7 Recording Sessions Recording a SESSION 42 45 02 058 dae sete ROAM AN eee 7 1 What You Can Record ina Session 0000004 7 2 Session File Types Generated After Recording 7 2 vii Rational Robot User s Guide Vili Where Files Are Stored 1 0 0 cece eee 7 2 Restoring Robot During Recording 00 7 3 Recording a Single Script in a Session 0000 e eee ee 7 3 Stop Recording and Generating Scripts 7 5 Using the Floating Toolbars 0 0 000004 7 5 If Problems Occur During Script Generation 7 6 Providing a Missing Password
3. 0 0c cece eee eee 7 24 Overwriting the Original Scripts but Keeping Their Properties7 25 Re r cording Scripts once Sek eed eee ae ete 7 25 Copyiie Scripts serso eco E A E whew eee 7 26 Deleting Scripts and Sessions 002 eee eens 7 27 Contents 8 Adding Features to Scripts Toolbars for Adding Features 6 0 0 0 cece eee 8 1 MEUMEPS 2 8 35 2 4 25 305 143 Sah SA ELS 8 2 How Timers Work nananana nananana urrara eee nee 8 2 Why Use Timers heine eyiini foie EEE E 8 3 Adding a Timer During Recording 0 8 3 Adding a Timer During Editing 0 8 3 Blocks erip tk oP ek ea ed Sh ERS 8 4 Why Use Blocks nos occ ec c nitti ni dead EE 8 5 Adding a Block fcc saya tee eae dna cae 8 6 Nesting Blocks ois nt reek tea a a n ei Ss 8 6 Synchronization Points sa eee 00 ce eee eee eee 8 8 How Synchronization Points Work 22 5 8 8 Why Use Synchronization Points 0000 8 9 Inserting Synchronization Points 000005 8 10 Scope of a Synchronization Point 005 8 12 Comments esea mee nn be ogee ek bot cee ane Se ee 8 13 Adding Comments During Recording 8 13 Adding Comments During Editing 8 13 Using the Insert Menu sis 5266 sg 5 Aaeseigs cok eesti runner 8 14 Part IV Playing Back GUI Scripts 9 Playing Back GUI Scripts Playback Phases i 85 oy Senet hed sacl tak we eh ete bee 9 1 Test Deve
4. This file is installed when you install Swing For example if you installed Swing 1 1 at the root of your C drive you would type the following jc swing 1 1 swingall jar Click OK Click OK Installing Swing Under Windows 98 To install the Swing foundation classes on a computer running Windows 98 1 2 Double click the file that you just downloaded to install Swing on your computer Edit the CLASSPATH environment variable in your workstation s autoexec bat file to include the path to the swingall jar file 14 9 Testing Java Applets and Applications Starting the Sample Java Applet Torun your default browser and load the sample Java applet gt Click Start gt Programs gt Rational Test Samples gt Java File Options Dialogs eer Try It Tree Grid and Buttons Text and Sliders Welcome to Rational Robot Use this applet with the Rational Robot Try It card Discover how easy it is to test the objects in your Java programs In minutes you ll understand the power behind Rational Robot s Object Testing as you record tests for all kinds of Java objects This Applet shows the testing of JFC objects such as JTree JTable JComboBox JSplitPane JTextArea JRadioButton Testing Data in Java Components Use the Object Data verification point to test the data in Java components For more information about verification points see Chapter 4 Creating Verification Points in
5. created with the lt SELECT gt tag where the size attribute is lt SELECT gt greater than one EditBox lt INPUT type Text gt Used for elements in forms lt INPUT type TextArea gt created with the lt INPUT gt tag where the type attribute is Text is for single line controls equal to Text or TextArea TextArea is for multiline controls HTMLLink lt A gt lt A gt Used for anchor elements HTMLImage lt IMG gt Used for server and client side image maps or images on a page 13 9 Testing HTML Applications 13 10 Continued Robot Object Type HTMLDocument HTML Element All text between lt BODY gt and lt BODY gt Description Used so that verification points can access all of the data on a page Individual elements are identified by tag and name or prefix HTMLTable All text between lt TABLE gt and lt TABLE gt Used to test tables Verification points act on the entire table When capturing object properties each cell appears as a separate subelement HTMLActiveX lt OBJECT gt Used to record against clicks on ActiveX controls embedded in the page HTML All other tags Used for all other tags when the tag has an ID or a name HTML can be used for example to identify and test a single paragraph on a page In this case you must manually insert an ID into the HTML source to tag the particular paragraph Supported Data Tests for HTML Testi
6. gt If you want Robot to automatically define unknown objects as Generic during recording click Tools gt GUI Record Options click the General tab and select Define unknown objects as type Generic For more information see Controlling How Robot Responds to Unknown Objects on page 2 7 If you know in advance that the application under test contains an object that Robot does not recognize you can map the class name of the object s window to a standard object type before recording Robot saves this custom class object type mapping in the project and uses it to identify the custom object during playback For more information see Mapping Object Types and Classes Before Recording on page 2 13 Switching to Low Level Recording i Robot has two recording modes gt Object Oriented Recording mode Examines objects in the application under test at the Windows layer during recording and playback Robot uses internal object names to identify objects instead of using mouse movements or absolute screen coordinates If objects in your application s graphical user interface GUI change locations your tests still pass because the scripts are not location dependent As a result Object Oriented Recording insulates the GUI script from minor user interface changes and simplifies GUI script maintenance Low level recording mode Tracks detailed mouse movements and keyboard actions by screen coordinates and exact timing U
7. By mapping a standard SQABasic object type such as a push button or Java panel to a custom Java component and by using the Java Open API to create a proxy interface for the custom component you can use Robot to test the custom component You map standard SQABasic object types with custom Java components in the Java Class Mapping tab of the Robot General Options dialog box as shown here Editor Preferences Object Mapping Java Class Mapping Java Class Mapping is used by Robot s Java runtime support to map Java components to standard Robot object types Warning Changes made here are shared by all users of the repository Changing these mappings may cause recorded scripts to playback incorrectly Java object JayvaCheckbox Java class names To display the Java Class Mapping tab in Robot gt Click Tools gt General Options Click the Java Class Mapping tab 14 13 Testing Java Applets and Applications For More Information About Java Support For information about mapping standard SQABasic object types to custom Java components click the Help button in the Java Class Mapping tab to display Robot Help for that topic or search the Robot Help index for Java Class Mapping tab For information about the Robot Java Open API open the online document overview summary htm By default this file is located in the following path Program Files Rational Rational Test JavaEnabler api You can also open this file thr
8. For information about recording GUI scripts and adding datapool commands to GUI scripts see the GUI recording section of the Using Rational Robot manual If you want to ensure that virtual testers retrieve a unique row of data from the datapool follow the guidelines listed in Rational TestManager User s Guide 10 25 Working with Datapools 10 26 gt gt gt Pat V Testing IDE Applications gt gt gt C HAPTER 11 Testing Visual Basic Applications This chapter explains how to test 32 bit Visual Basic applications with Rational Robot It includes the following topics gt About Robot support for Visual Basic applications gt Verifying that the Visual Basic extension is loaded About Robot Support for Visual Basic Applications Rational Robot provides comprehensive support for testing 32 bit applications built with Visual Basic version 4 0 through 6 0 Robot supports the testing of applications that you migrate from one Visual Basic version to another and allows for the reuse of scripts between Windows NT 4 0 Windows XP Windows 2000 and Windows 98 With its Object Testing technology Robot examines data and properties that are not visible to the user This means that Robot can do the following gt Recognize all Visual Basic objects including objects that have windows associated with them such as EditBoxes and objects that are painted on the containing form such as Labels gt Determine the names of
9. Manage Session Queries The Tools toolbar Some components also start automatically when you perform certain functions in another component Tasks You Can Perform with Robot and Its Components Tasks You Can Perform with Robot and Its Components The following table lists the tasks to perform which components to use and where to find more information To Use This See Component Plan tests and manage test assets TestManager TestManager Help Record GUI scripts Robot Chapter 2 Recording GUI Scripts Chapter 3 Adding Features to GUI Scripts Create verification points to test Robot Chapter 4 Creating Verification Points in the state of objects GUI Scripts Edit compile and debug scripts Robot Chapter 5 Editing Compiling and Debugging Scripts Supply data values to the Robot Chapter 10 Working with Datapools variables in a script during TestManager playback Play back GUI scripts Robot Chapter 9 Playing Back GUI Scripts Review and analyze test results TestManager TestManager Help and enter defects View and analyze the results of Object Properties Object Properties Comparator Help verification points Comparator Text Comparator Grid Comparator Image Comparator Text Comparator Help Grid Comparator Help Image Comparator Help Create and run queries to help TestManager TestManager Help you manage information in your projects Create and run reports to help TestMan
10. 00002 001 Admin WA Build tab Console tab NOTE The Build tab of the Output window shows compilation results when you compile or play back a script For information see Compiling Scripts and SQABasic Library Source Files on page 5 7 The Console tab of the Output window is reserved for your messages For information see the SQABasic Language Reference Recording GUI Scripts 14 Optionally change the script properties by clicking File gt Properties For information see Defining Script Properties on page 2 23 Restoring the Robot Main Window During Recording 2 18 y When you begin recording the Robot main window becomes minimized by default allowing you unobstructed access to the application under test At any time during recording you can restore the Robot window without affecting the script you are recording For example you might want to restore the Robot window to reset your recording options When Robot is minimized or is hidden behind other windows during recording you can bring it to the foreground in any of the following ways gt Click the Open Robot Window button on the GUI Record toolbar gt Click the Robot button on the Windows taskbar gt Use the hot key combination CTRL SHIFT F to display the window and CTRL SHIFT H to hide the window You can also use the standard Windows ALT KEY combination To change the default behavior of the Robot main window and the default hot keys
11. 1 Open the GUI Record Options dialog box See Setting GUI Recording Options on page 2 5 2 Click the Robot Window tab General Robot Window Object Recognition Order Durin Mie Bak Put Robot in background C Display script only Display menus and toolbars only gt Hot keys Hide Robot window CTRL SHIFT H Bring Robot to front CTRL SHIFT F Low level record toggle CTRL SHIFT R 3 Select an option under During record 4 Change the letter of a hot key under Hot keys 5 Click OK Recording a New GUI Script Using the GUI Record and GUI Insert Toolbars When you begin to record a GUI script Robot displays the floating GUI Record toolbar This toolbar gives you quick access to activities you might want to perform during recording If you click the rightmost button on the GUI Record toolbar the GUI Insert toolbar appears Use this toolbar to insert features such as verification points timers and comments into the script GUI Record Pause recording 1 a gl Display the GUI insert toolbar A a Open the Robot window Stop recording GUI Insert iUI Inse x Harem 7 Faw jE Ym og Pausing and Resuming the Recording of a Script During recording if you click an enabled Robot toolbar button or menu command for example Tools gt GUI Record Options Robot pauses the recording After Robot completes your action for example after you click OK in the dialog
12. 9 13 Playing Back GUI Scripts Start Application x Application name PO Browse Starts application using the During playback start application i G Usi i 4 tool selected in the GUI 2 A ae ag Playback Options dialog box Playback Options dialog box Demon yaa Under Rational Quantify Overrides the tool selected Under Rational PureCoverage in the GUI Playback Options dialog box Under Rational Purify with PureCoverage Data Under none If you select a diagnostic tool during recording that selection overrides the tool selected in the GUI Playback Options dialog box However instead of selecting a diagnostic tool during recording you can select Using settings from GUI Playback Options dialog box In that case you can specify the diagnostic tool for playback in the GUI Playback Options dialog box Setting the Diagnostic Tools Options To set options to specify the diagnostic tool to be used during playback 1 Open the GUI Playback Options dialog box See Setting GUI Playback Options on page 9 4 2 Click the Diagnostic Tools tab Then do the following Trap Diagnostic Tools Web Browser a Click the diagnostic tool under which the application should run The options are enabled if you have the tools C Rational Purify with coverage data installed Rational Quantify layback start applications under b Optionally change this C Rational PureCoverage value This mul
13. Do the following before you play back a script that include timers 1 2 4 Click Tools gt GUI Playback Options In the Playback tab clear Acknowledge results This prevents a pass fail result message box from appearing for each verification point You can still view the results in the log after playback In the Playback tab set the Delay between commands value to 0 This removes any extra Robot timing delays from the performance measurement If you need a delay before a single command click Insert gt Delay and type a delay value Click OK When you play back the script and view the log the elapsed time is displayed for each Stop Timer event For more information see Chapter 9 Playing Back GUI Scripts Inserting Comments Inserting Comments During recording or editing you can insert lines of comment text into a GUI script Comments are helpful for documenting and editing scripts Robot ignores comments at compile time To insert a comment into a script during recording or editing o0 1 Do one of the following Ifrecording click the Display GUI Insert Toolbar button on the GUI Record toolbar Ifediting position the pointer in the script and click the Display GUI Insert Toolbar button on the Standard toolbar CA 2 Click the Comment button on the GUI Insert toolbar and then do the following Type a comment 60 characters maximum EEN Comment This is a comment in the script Click OK to
14. FAR 52 227 19 or FAR 227 14 as applicable WARRANTY DISCLAIMER This document and its associated software may be used as stated in the underlying license agreement Rational Software Corporation expressly disclaims all other warranties express or implied with respect to the media and software product and its documentation including without limitation the warranties of merchantability or fitness for a particular purpose or arising from a course of dealing usage or trade practice gt gt Contents Preface Pone ENCE NT E E E E E E E ETN xv Other Resnice s oaee cet a e a een eee xV Contacting Rational Technical Publications xv Contacting Rational Technical Support xvi Part Introducing Rational Robot 1 Introduction to Rational Robot What Is Rational Robot 00 0 ec ees 1 1 Managing Rational Projects with the Administrator 1 2 Developing Tests in Robot 00 00 eee e eee eee 1 4 Creating Datapools srei snes ited SRN Ae tla eed es 1 6 Analyzing Results in the Log and Comparators 1 7 Managing Intranet and Web Sites with SiteCheck and Robot 1 8 Using Robot with Other Rational Products 1 10 Planning and Managing Tests in TestManager 1 10 Testing Applications with Rational TestFactory 1 11 Managing Defects with Rational ClearQuest 1 12 Collecting Diagnostic Information During Playback 1 12 Performa
15. NOTE Ifyou click OK in the Regenerate Test Scripts from Session dialog box the existing scripts in the session are destroyed If you then click Cancel in the Generating Scripts dialog box before the scripts are regenerated Robot generates empty scripts Accessing Script Properties from Session Properties While you are viewing a session s properties you can view and modify the properties of any script generated from the session To view script properties 1 In Robot click Tools gt Regenerate Test Scripts from Session 2 Click the name of the session whose properties you want to view Session names are the same as session file names but without the wch extension Click Properties Click the Contained Scripts tab Select the script whose properties you want to view or modify Click Properties The Script Properties dialog box appears Ie Os KO Be CU When you have finished viewing and editing properties click OK to save any changes in the Script Properties dialog box or click Cancel he Click Cancel to close the Session Properties dialog box In the Regenerate Test Scripts from Session dialog box click Cancel Coding a Script Manually The fastest and easiest way to generate a script is to record a session with Robot and generate the script automatically However you can open an empty script and add code to it for example if you are hand coding the script or if you are copying code from another script To
16. Notepad Enabled True True MaxButton True True MinButton True True re T Differences Object Window Caption Rdywrap txt Notepad Property BorderStyle Comparison failed Rdywrap txt Notepad im Z Properties in the baseline data file Properties in the actual data file Shows the differences between the baseline and actual files Click a difference to highlight it in the Properties list above Managing Intranet and Web Sites with SiteCheck and Robot You use Rational SiteCheck to test the structural integrity of your intranet or World Wide Web site SiteCheck is designed to help you view track and maintain your rapidly changing site What Is Rational Robot Use SiteCheck to gt Visualize the structure of your Web site and display the relationship between each page and the rest of the site Identify and analyze Web pages with active content such as forms Java JavaScript ActiveX and Visual Basic Script VBScript Filter information so that you can inspect specific file types and defects including broken links Examine and edit the source code for any Web page with color coded text Update and repair files using the integrated editor or configure your favorite HTML editor to perform modifications to HTML files Perform comprehensive testing of secure Web sites SiteCheck provides Secure Socket Layer SSL support proxy server configuration and support for multiple password
17. Start Application Start Java Application tart Browser Start Timer Stop Timer Call Script Comment Write to Log NOTE To successfully test the objects in Oracle Forms HTML Java Delphi C and Visual Basic 4 0 applications enable the applications before you start recording your scripts For information see Enabling LDE Applications for Testing on page 2 4 Starting Applications The following steps list the basic information you need to know to start an application 1 Do one of the following Ifrecording click the Display GUI Insert Toolbar button on the GUI Record toolbar Ifediting position the pointer in the script and click the Display GUI Insert Toolbar button on the Standard toolbar 2 Do one of the following To start most applications click the Start Application button You can specify that you want the application to start under Rational Purify Quantify or PureCoverage during playback For more information see the next section Starting Applications Under the Rational Diagnostic Tools Tostart a Java application that you want to start under Quantify or PureCoverage during playback click the Start Java Application button For more information see the next section Starting Applications Under the Rational Diagnostic Tools Tostartan HTML application click the Start Browser button For more information see Enabling HTML Testing in Robot on p
18. per script Plays back the script at a rate based on the average time it took to record and process all emulation commands All emulation commands use the same average think time delay This setting and the per command setting both run a script in roughly the same amount of time While playback timing is not as accurate on a per command basis with the per script setting it requires fewer commands to be inserted into the script As a result you can modify the script s average think time by editing one think average environment variable VU Think_avg or Visual Basic EVAR _Think_ avg Setting Script Generation Options Pacing Setting Meaning none Plays back the script on a per seript basis using the most recently set value for VU Think_avg or Visual Basic EVAR_Think_avg The default value is 5000 ms No think time commands are added to the script with this setting Pacing settings of per command and per script use a combination of think time and response time environment variables For more information see the VU Language Reference and the VB Language Reference NOTE If you set Playback Pacing to none the CPU User threshold ms and Think maximum ms options are disabled CPU User Threshold ms This option specifies the dividing point in milliseconds ms between CPU processing delays and delays due to user think time In TestManager reports delays that fall below the threshold you specify are considered CPU pro
19. 2 13 Recording a New GUI Script 0 0 000 eee eee eee 2 15 Restoring the Robot Main Window During Recording 2 18 Using the GUI Record and GUI Insert Toolbars 2 19 Pausing and Resuming the Recording of a Script 2 19 Defining Unknown Objects During Recording 2 20 Switching to Low Level Recording 00 2 21 Ending the Recording of a GUI Script 2 22 Defining Script Properties 00 eee eee eee 2 23 Coding a GUI Script Manually 0 000 0004 2 23 Testing Your Recorded Script 0 2 24 Playing Back the Script 0 00 0 0000 c ee eee eee 2 24 Editing and Compiling the Script 0000 2 24 Debugging the Script 0 00 cee eee eee 2 24 Creating Shell Scripts to Play Back Scripts in Sequence 2 25 Creating a Shell Script 0 0 00 eee 2 25 Playing Back a Shell Script 0 0 0 00 0000 eee 2 26 Contents 3 Adding Features to GUI Scripts Starting an Application 0 0 0 eee eee eee 3 1 Starting Applications 0 0 0 0 cece cee eee eee 3 2 Starting Applications Under the Rational Diagnostic Tools 3 3 Inserting a Call to Another Script 0 0 0 ee eee eee 3 5 Inserting Verification Points 0 cece eee ee eee ee 3 6 Tseri TiS ies chest hes ee elses le gle Seca erie ag eee lace Me tle 3 8 Uses for Timers 1 0 eee eee ee 3 9 Inserting a Eimer oo
20. 7 14 Choosing the Protocols to Include in a Script Including or Excluding Connections In the Manual Filtering dialog box tree each top level item expands to display the components of one or more connections Connection components can appear in the tree in any hierarchical order depending on the Sort Order setting If a top level item is marked for inclusion in the script that is being generated all requests associated with that item such as all HTTP connections are included in the script However you can then selectively exclude one or more of the individual connections By selecting items to include and exclude you can gt Include or exclude all requests associated with a protocol or just some of those requests by including or excluding client or server items below it gt Include or exclude all requests to a particular server or just some of those requests by including or excluding protocol or client items below it gt Include or exclude all requests from a particular client or just some of those requests by including or excluding protocol or server items below it To include or exclude the requests associated with an item in the tree 1 Click an item to include or exclude Any items hierarchically below it are also selected Click Include or Exclude Repeat the above steps until all items to include in the script are shaded in red and all items to exclude are clear white 4 Click OK Converting
21. Click Tools gt Session Record Options 2 Click the Generator per protocol tab Select HTTP at the Protocol section and then select one or more of the following a Allow partial responses Select this option to enable a script to play back successfully if the HTTP server responds with partial data during playback This generates a script that sets the TSS environment variable Http_control to HTTP_PARTIAL OK Leaving this box cleared enforces strict interpretation of recorded responses during playback b Allow cache responses 6 28 Setting Script Generation Options Select this option to enable a script to play back successfully if a response is cached differently during playback This generates a script that sets the TSS environment variable Http_control to HTTP_CACHE_OK Leaving this box cleared enforces strict interpretation of recorded cache responses during playback Allow redirects Select this option to enable a script to play back successfully if the script was directed to another HTTP server during playback or recording This generates a script that sets the TSS environment variable Http_control to HTTP REDIRECT OK Leaving this box cleared enforces strict interpretation of recorded redirects during playback Use HTTP keep alives for connections in a session with multiple scripts Generally leave this box cleared Selecting this option provides more accurate representation of keep alive behavior but at a cost if you
22. E testa Admin Admin E test5 Admin Admin test6 Admin Admin A 4 La OK Cancel Properties Help Click to change the prefix for script autonaming If you change the script autonaming prefix by clicking Options in the Record GUI dialog box changing the prefix and then clicking OK the name in the Name box changes immediately Controlling How Robot Responds to Unknown Objects During recording Robot recognizes all standard Windows GUI objects that you click such as check boxes and list boxes Each of these objects is associated with one of a fixed list of object types The association of an object with an object type is generally based on the class name of the window associated with the object 2 7 Recording GUI Scripts Robot also recognizes many custom objects defined by IDEs that Robot supports such as Visual Basic Oracle Forms Java and HTML For example if you click a Visual Basic check box Robot recognizes it as a standard Windows check box This mapping is based on the object s Visual Basic assigned class name of ThunderCheckBox These built in object mappings are delivered with Robot and are available to all users no matter which project they are using During recording you might click an object that Robot does not recognize In this case Robot s behavior is controlled by a recording option that you set You can have Robot do either of the following gt Open the Define
23. Oracle TUXEDO IIOP DCOM or API extension requests you must supply Robot with certain information Controlling the Values Accepted When an HTTP Script Is Played Back You can set recording options that control which status values are acceptable when a script that accesses a Web server is played back If you do not set any recording options the script plays back successfully only if the playback conditions exactly match the conditions during recording However you can set recording options so that a script plays back successfully even if gt The server responds with partial or full page data during record or playback gt The response is cached during record or playback gt The script is redirected to another http server during playback gt You are recording a number of HTTP scripts and plan to play them back in a different order 6 27 Setting Recording Options The following figure illustrates the Generator per Protocol tab when HTTP is selected Session Record Options 24 x General Method Method Network Method row Method Custom Generator Custom Generator Generator Filtering Generator per Protocol Protocol HTTP z MV Allow partial responses I Allow cache responses IM Allow redirects I Use HTTP keep alives for connections in a session with multiple scripts Correlate variables in response All z Cancel Help To expand the conditions under which a script plays back successfully 1
24. The Irrational Widget Co amp Fj Development amp f Documentation amp 2 Management Uneditable ComboBox simple v amp F Marketing Editable ComboBox amp oe One dy Object Finder tool TextArea TestTip Here is an e x lt was created with t he JFC class JT extArea Release the mouse button If the dialog box is still open click OK If the Object Data Tests dialog box appears select the data test to use and click OK For example to test that a particular element in a ComboBox is selected select the JavaActiveState data test To test all of the elements in a ComboBox select the Contents data test Object Data Tests Selected object ComboBox Index 2 Data test Contents gt Contents ava Active State E Cancel Recaptue Help 10 Complete the verification point as usual 14 11 Testing Java Applets and Applications Testing the Contents of a Java Panel 14 12 A feature unique to Java testing is the ability to collect and test the data for all the known components on a Java panel A panel is a container of components and other panels that you have grouped together To test the contents of a Java panel 1 Repeat steps 1 5 from the section Testing Data in Java Components on page 14 10 2 In the Select Object dialog box drag the Object Finder tool over the page until JavaPanel appears in the TestTip as described in
25. To copy a script in Robot 1 2 3 4 Click File gt Open gt Test Script Click the name of the script to copy and then click OK Click File gt Save As Type a name for the new script and then click OK The new script does not retain the properties of the original and is not associated with any session 7 26 Managing Scripts and Sessions Deleting Scripts and Sessions To delete a script and its properties 1 2 3 4 5 In Robot click File gt Delete Click the name of the script to delete To delete multiple scripts hold down the CTRL key and click each script Click OK Click OK when prompted to confirm the deletion Click Cancel to close the Delete Script dialog box If you delete all scripts in a session the session still remains To delete a session 1 er iS In Robot click File gt Delete gt Delete Session Click the name of the session to delete and then click Delete Click Contained Test Scripts When prompted to confirm the deletion select or clear the Delete scripts contained in the session check box as follows Select the check box to delete all of the session s scripts and properties in addition to deleting the session Clear the check box to leave the session s scripts and properties intact The scripts are no longer associated with this or any other session However you can still add the scripts to a suite Click Yes to confirm the deletion
26. and you want to start each one under a different tool When you started each application during recording you would select the appropriate tool When you played back the script the setting for each application would override the setting in the GUI Playback Options dialog box The tools options are enabled in the dialog box if the tools are installed When you are ready to play back the script you need to set some options in the GUI Playback Options dialog box For information see Setting the Diagnostic Tools Options on page 9 14 Specifying the Diagnostic Tool During Playback During playback you can use the Diagnostic Tools tab of the GUI Playback Options dialog box to specify the diagnostic tool that all applications in a script should start under For more information see Setting Diagnostic Tools Options on page 9 11 Inserting a Call to Another Script Trap Diagnostic Tools Web Browser Starts application under the selected tool or None if Using j settings from GUI Playback C Rational Purify Options dialog box was selected when the application was started during recording During playback start applications under Rational Purify with coverage data Rational Quantify Rational PureCoverage Set Timeout Multiplier value fi 0 V Show errors in the log I Show warnings in the log I Show informationals in the log It is useful to set the diagnostic tool option during playback if you want all app
27. click Yes to see a brief summary of the generated data lf There Are Errors If the datapool values are not successfully generated you are prompted to see an error report rather than a summary of the generated data To correct the errors 1 Click Yes to see the error report 2 After viewing the cause of the errors click Cancel 3 Correct the errors in the Datapool Fields grid Viewing Datapool Values To see the generated values close the Datapool Specification dialog box In the Configure Datapool in Test Script dialog box click Edit Existing Data Ifa datapool includes complex values for example embedded strings or field separator characters included in datapool values check the datapool values to make sure the contents of the datapool are as you expect 10 21 Working with Datapools Editing Datapool Column Definitions with Robot 10 22 To edit datapool column definitions in Robot you must begin in the Configure Datapool in Test Script dialog box This section provides the basic steps for editing datapool column definitions while in Robot For information about the Configure Datapool in Test Script dialog box see Step 1 Editing Datapool Configuration on page 10 14 To edit a datapool s column definitions while in Robot 1 If the script that accesses the datapool is not open for editing click File gt Open gt Test Script to open it Click Edit gt Datapool Information to open the Configure Datap
28. for example This is a VU comment In Visual Basic comments begin with a single quotation mark This is a Visual Basic comment In SQABasic comments begin with a single quotation mark or the rem statement This is an SQABasic comment Rem This is an SQABasic comment Adding Comments During Recording To insert a comment into a script during recording 1 Ifthe Session Insert floating toolbar is not already displayed click the Insert button on the Session Record floating toolbar 2 Click the Comment button at that point in the script where you want to insert the comment 3 Type your comment in the Comment dialog box 60 characters maximum and then click OK When you add a comment during recording the comment is reported as an annotation in the Annotations window Adding Comments During Editing To add a comment during editing type the comment directly into the script Comments that you type in manually during editing are not limited to the 60 character maximum that applies when you add comments during recording 8 13 Adding Features to Scripts Using the Insert Menu 8 14 The preceding sections describe how to use the Session Insert floating toolbar to add timers synchronization points blocks and comments to a script during recording During recording you can also use the Robot Insert menu to add these features If Robot is minimized while you are recording its default state click the Open
29. gt gt Robot automatically starts a timer at or near the beginning of the second block Timing continues on the first block in other words a stop timer command is not inserted for the first block The second block s name replaces the first block s name as the prefix for emulation commands Blocks If you have nested blocks and you click Stop Block gt Robot inserts a stop timer command to stop timing the current block gt The next block up in the hierarchy becomes the current block that is its name is used as the prefix for emulation commands Timing continues on this block plus other blocks that may be above it in the nesting hierarchy Example of Nested Blocks The following VU language example contains three blocks blockA blockB and blockc blockA begins with a Start Block command Start _Block blockA start_time blockA sai Perform transaction in blockA http _nrecv blockA022 100 411 8147 bytes http_disconnect img4_yahoo_com_80_5 blockB begins with a second Start Block command Start_Block blockB start_time blockB Perform transaction in blockB http _nrecv blockB012 100 5812 bytes http_disconnect D141_217_90_3 80 blockC begins with a third Start Block command Start_Block blockc start_time blockC Perform transaction in blockc http_nrecv blockc054 100 4577 bytes h
30. gt CHAPTER 14 Testing Java Applets and Applications Java is an object oriented programming language that lets you write programs to run on any computer that implements the Java Virtual Machine JVM This chapter describes how to use Robot to test both Java applets running in a browser and stand alone Java applications It includes the following topics gt gt gt gt gt About Robot support for Java Making Java applets and applications testable Setting up the sample Java applet Testing data in Java components Support for custom Java components Supported data tests for Java testing Testing properties of Java components Enhancing object recognition of Java components For a good introduction to Java concepts and terminology read the Java language overview at the following URL http java sun com docs overviews java java overview 1 html 14 Testing Java Applets and Applications About Robot Support for Java 14 2 Rational Robot provides comprehensive support for testing GUI components in both Java applets and stand alone Java applications With its Object Testing technology Robot examines the data and properties of Java components This means that Robot can do the following gt gt Determine the names of components in your program and use those names for object recognition Capture properties of Java components with the Object Properties verification point Capture data in Java co
31. gt Close 13 17 Testing HTML Applications Enhancing Object Recognition of HTML Elements 13 18 Robot uses recognition methods to identify HTML elements in the application under test These recognition methods are saved as arguments in scripts to help Robot identify these elements during playback For example Robot can identify a link by the visible text of the link that is the text that a user clicks If this text changes after a script has been recorded the script may fail when it is played back The best way to ensure that Robot recognizes this link is to assign it an ID that always remains the same even if the visible text changes for example See lt A HREF about htm ID about gt About Our Product lt A gt To enhance the recognition of image elements it is best to use either ALT tags or ID tags as shown in the following examples lt A HREF lookup htm gt lt img src lookpix gif border 0 alt Lookup a document gt lt A gt lt A HREF search htm gt lt img ID SearchButton src searchpix gif border 0 gt lt A gt For more information about recognition methods see the SQABasic Language Reference NOTE Settings in the Object Recognition Order tab of the GUI Record Options dialog box do not affect HTML recording When recording against HTML Robot always uses HTMLID if available and then name text and index recognition and ignores any settings in the Object Recognition Order tab gt gt
32. not the server s Start the client application and navigate to the point where recording begins On the proxy computer enable recording File gt Record Session With recording enabled each tester at each client computer performs the transactions to record When all transactions are complete stop recording on the proxy computer Choosing Proxy Recording To use the proxy recording method 1 2 Click Tools gt Session Record Options Click the Method tab and then click Proxy recorder Setting Recording Options 6 10 3 Click the Method Proxy tab to Create a proxy computer Identify client server pairs that communicate through the proxy After you set up your system for proxy recording record a trial script to make sure the proxy recording yields the results you expect NOTE If you perform proxy recording against an Oracle database the server should not be set up to redirect Consult your Oracle documentation for information Creating a Proxy Computer You create a proxy computer by mapping the proxy computer s address to the address of one or more servers Before you create a proxy computer be sure that gt The server s network name or IP address and port number are defined If they are not defined click Manage Computers to display the Manage Computers dialog box For information about how to define the server s network name and port number in this dialog box see Defining a Client
33. x001 EXPECT_ERROR 212 INSERT INTO mytable VALUES valuel value2 Robot records that error code 212 was returned from the SQL statement During playback TestManager expects the SQL statement to return the error code 212 If the SQL statement returns a different code during playback the Test Log window notes the discrepancy sqlexec x001 EXPECT ROWS 1 INSERT INTO mytable VALUES valuel value2 Robot records that one row was affected by the SQL statement During playback TestManager expects the SQL statement to affect one row If the SQL statement returns a different count during playback the Test Log window notes the discrepancy sqlexec x001 EXPECT _ERROR 212 EXPECT ROWS 0 INSERT INTO mytable VALUES valuel value2 Robot records that the SQL statement returned the error code 212 and that no rows were affected During playback TestManager expects the SQL statement to return error 212 and that no rows will be affected If the SQL statement returns different results during playback the Test Log window notes the discrepancy Because one SQL statement can return multiple error messages for example as a result of stored procedure execution EXPECT_ERROR is an array During playback if an error code is returned that is not one of the values specified in the array TestManager generates an error NOTE This option is not supported for VB scripts 6 19 Setting Recording Options 6
34. 11 Generating Unique Values from User Defined Data Types 10 12 Generating Multi Byte Characters 04 10 13 Using Datapools with Sessions 0 0000s eee eee 10 13 Creating a Datapool with Robot 2 0000 10 13 Editing Datapool Column Definitions with Robot 10 22 Editing Datapool Values with Robot 5 10 23 Using Datapools with GUI Scripts 00 00 eee 10 24 Accessing a Datapool from GUI and Session Scripts 10 25 Part V Testing IDE Applications 11 Testing Visual Basic Applications About Robot Support for Visual Basic Applications 11 1 Verifying That the Visual Basic Extension Is Loaded 11 3 12 Testing Oracle Forms Applications About Robot Support for Oracle Forms Applications 12 1 Making Oracle Forms Applications Testable 12 2 Installing the Rational Test Oracle Forms Enabler 12 2 Running the Enabler on Your Application 12 2 Verifying That the Oracle Forms Extension Is Loaded 12 7 Contents Recording Actions and Testing Objects 0005 12 7 Recording Actions 00 00 e cece ete e ee eee 12 7 Tesina Objects see sony eer gone ee oh tee le hod wanton 12 8 Testing an Object s Properties 00 0 c ee eee eee eee 12 10 Object Properties Verification Point 12 10 Object Scripting Commands 0 0000005 12 13 Tes
35. 20 Bind Output Parameters to VU Variables Select this check box to automatically script the VU expressions needed to contain the return values of output parameters This applies only to emulation commands that support output parameter binding currently the iiop_ invoke command Clearing this box shortens VU scripts but you have to manually script output parameter binding expressions and binding variable declarations for any output parameters of interest NOTE This option is not supported for VB scripts Playback Pacing Controls the script s playback speed by including or excluding think time delays in the script A think time delay includes both the time required for the user to think about and key in a request and the time required for the client to receive a response to the request Choose one of the following Playback Pacing settings Pacing Setting Meaning Plays back the script at a rate based on the actual time required to record and process each emulation command or DCOM method call For example if the think time delay for a VU emulation command is 16 703 ms during recording Robot adds the following line before that emulation command per command push Think avg 16703 This setting provides a realistic rate of playback on a per command basis reproducing delays in the same script locations as they occurred during recording However this setting adds more commands to the script than the per script setting does
36. 28 gt gt gt CHAPTER 5 Editing Compiling and Debugging Scripts This chapter explains how to edit print and compile GUI and virtual user scripts and how to debug GUI scripts It includes the following topics gt gt gt gt Editing the text of a script Adding a user action to an existing GUI script Adding a feature to an existing GUI script Working with low level scripts Saving scripts and SQABasic files Printing a script or SQABasic file Compiling scripts and SQABasic library source files Debugging GUI scripts Deleting scripts Editing the Text of a Script You can edit the text of any open script You might want to edit a script to change a command argument or to add conditional logic using the SQABasic language for GUI scripts or the VU language for virtual user scripts For information about these languages see the SQABasic Language Reference and the VU Language Reference The Rational Robot Edit menu commands use standard Windows mouse and pointer techniques for selecting text In addition you can use standard Windows shortcut keys instead of the mouse to select menu commands Shortcut keys are listed next to the corresponding Edit menu commands 5 1 Editing Compiling and Debugging Scripts Before starting to edit you must have a script open The script can be gt A script you have just recorded gt A script you have opened To edit the text of a script use the Edit menu comma
37. Click Replace All Copying a Low Level Script You can copy a low level script to the same script or to a different script in the same project Copying a low level script involves two tasks gt Copying the low level script name in the Asset pane in one script and pasting it into the Asset pane in the same script or a different script This puts a copy of the low level script in the project Copying the low level script command from the script and pasting it into the same script or a different script To copy a low level script 1 2 Right click the low level script in the Asset left pane and click Copy In the same script or in a different script in the same project right click Low Level Scripts in the Asset pane Click Paste to paste a copy of the low level script into the project Ifa low level script with that name already exists Robot appends a unique number to the name You can also copy and paste by dragging the low level script to Low Level Scripts in the Asset pane Editing Compiling and Debugging Scripts 4 Click the top of the Script right pane of the original script 5 Click Edit gt Find and locate the line with the low level script name that you just copied Select the entire line which starts with PlayJrn1 Click Edit gt Copy Return to the script that you used in step 2 Click the location in the script where you want to paste the line and then click Edit gt Paste 8 Change th
38. Edit gt Find and locate the line with the verification point name that you just copied Select the entire line which starts with Result Click Edit gt Copy Return to the script that you used in step 2 Click the location in the script where you want to paste the line Click Edit gt Paste Change the name of the verification point to match the name in the Asset pane Editing a Verification Point Deleting a Verification Point Deleting a verification point involves two tasks gt Deleting the verification point name from the Asset pane which deletes the verification point and its associated files from the project gt Deleting the verification point command from the script When you delete a verification point from the Asset pane Robot does not automatically delete references to that verification point from the script If you play back a script that refers to a deleted verification point the verification point and script fails To delete a verification point and its associated files 1 Right click the verification point name in the Asset left pane and click Delete Click the top of the script in the Script right pane Click Edit gt Find Type the name of the deleted verification point in the Find what box Click Find Next Delete the entire line which starts with Result ao Oe OU oe NS Repeat steps 5 and 6 until you have deleted all references 4 27 Creating Verification Points in GUI Scripts 4
39. Missing Password dialog box Access to this resource is password protected A password is necessary for script playback to succeed m Resource Class Subclass Sarvise Type the password here and then Login repeat the entry in the box below m Password Password Verity Password I No Password Skip Skip Al Help If you have many passwords to enter consider clicking Skip All and then running TestManager to add the passwords directly to the Authentication Datapool Providing a Password To add a password for the user ID displayed in Login 1 Type the password in Password and type it again in Verify Password An asterisk represents each character that you type If no password is needed for this user ID select No Password 2 Click Enter Robot automatically closes the dialog box after you provide the password Skipping One or More Passwords Ifyou do not know a password for a particular user ID click Skip You will need to provide the password later for example by editing the Authentication Datapool Ifyou prefer to provide passwords for all the user IDs at a later time click Skip All You may prefer to do this if there are many passwords to provide 7 7 Recording Sessions Getting Feedback During and After Recording When you begin to record a session the Session Recorder displays You can use this window to monitor client activity during the record
40. Name datastore DataStore control is a DW Text Name orderid_t child of the desktop DWText Name customerid_t DWT ext Name orderdate_t E OK Cancel For information about selecting objects from the Windows desktop see Selecting and Identifying the Object to Test on page 4 10 Capturing Data in a DropDownDataWindow ListBox 15 6 To capture the data in a DropDownDataWindow or DropDownListBox use the Object Data verification point as follows 1 2 Start creating an Object Data verification point In the Select Object dialog box drag the Object Finder tool to the DWColumn that contains the data If the DWColumn has a child dropdown the TestTip shows DWColumn Contains DropDownDataWindow or Contains DropDownListBox Release the mouse button If the Select Object dialog box still appears click OK The Object Data Tests dialog box appears To capture the data stored in the child dropdown of the DataWindow or ListBox select the DropDown Contents data test To capture the data in the DataWindow select the DataWindow Contents test If the DWColumn does not contain a child dropdown the data in the DataWindow is captured automatically after step 3 Click OK Continue creating the verification point as usual Testing the Value of a DataWindow Computed Field Testing the Value of a DataWindow Computed Field The Object Properties verification point supports a Value property for a computed fiel
41. No of records to generate field Ifa different row has to be retrieved with each fetch make sure the datapool has at least as many rows as the number of users and user iterations at runtime Click Generate Data You cannot generate data for a datapool that has more than 150 columns Alternatively if you do not want to generate any data now click Save to save your datapool column definitions and then click Close 9 Optionally click Yes to see a brief summary of the generated data If There Are Errors If the datapool values are not successfully generated you are prompted to see an error report rather than a summary of the generated data To correct the errors 1 Click Yes to see the error report 2 After viewing the cause of the errors click Cancel 3 Correct the errors in the Datapool Fields grid Editing Datapool Values with Robot To edit datapool values in Robot you must begin in the Configure Datapool in Test Script dialog box This section provides the basic steps for editing datapool values while in Robot For information about the Configure Datapool in Test Script dialog box see Step 1 Editing Datapool Configuration on page 10 14 To view or edit a datapool s values while in Robot 1 If the script that accesses the datapool is not open for editing click File gt Open gt Test Script to open it Click Edit gt Datapool Information to open the Configure Datapool in Test Script dialog bo
42. Object dialog box so that you can map the object to a known object type Mapping an object to an object type permanently associates the class name of the object s window with that object type so that other objects of that type are recognized For more information see Defining Unknown Objects During Recording on page 2 20 gt Automatically map unknown objects encountered while recording with the Generic object type This permanently associates the class name of the unknown object s window with the Generic object type This is a useful setting if you are testing an application that was written in an IDE for which Robot does not have special support and which therefore might contain many unknown objects When an object is mapped to the Generic object type Robot can test a basic set of its properties but it cannot test the special properties associated with a specific object type Robot also records the object s x y coordinates instead of using the more reliable object recognition methods to identify the object For information about the recognition methods see the following section Selecting an Object Order Preference These custom object mappings are stored in the project that was active when the mappings were created To control how Robot behaves when it encounters an unknown object during recording 1 Open the GUI Record Options dialog box See Setting GUI Recording Options on page 2 5 2 Inthe General tab do one of th
43. Playback tab do one of the following Select Acknowledge results to have Robot display a pass fail result message box for each verification point You must click OK before playback continues Clear Acknowledge results so that Robot does not interactively display pass fail results 3 Click OK or change other options Setting Log Options for Playback A log is a file that contains the record of events that occur while a script is playing back A log includes the results of the script and of all verification points You view logs in TestManager For more information see the TestManager Help To set the log options 1 Open the GUI Playback Options dialog box See Setting GUI Playback Options on page 9 4 2 Click the Log tab Playing Back GUI Scripts Playback Log Caption Matching Log Vv IV View log after playback m Log data IV Prompt before overwrite log Specify log information at playback C Use default log information To output the playback results to the log so you can view them select Output playback results to log If you clear this you cannot to view the playback results in the log NOTE You can also use the Log button on the standard toolbar to turn logging results on and off To have the log appear automatically after playback is complete select View log after playback If you clear this you can still view the log after playback by clicking Tools gt Rati
44. Resume at the beginning of the access order gt No End access to the datapool If you attempt to retrieve a datapool value after the end of the datapool is reached a runtime error occurs To ensure that unique datapool rows are fetched choose No and make sure the datapool has at least as many rows as the number of users and user iterations that request rows at runtime With an access order of Random this value is ignored Cursor Specifies whether the datapool cursor is shared by all users accessing the datapool Shared or is unique to each user Private Also specifies whether a shared cursor is persistent across suite runs p gt With a shared cursor all users work from the same access order For example if the access order for a Colors column is Red Blue and Green the first user to request a value is assigned Red the second is assigned Blue and the third is assigned Green gt Ifyou check the Persistent box the datapool cursor is persistent across suite runs For example if you have a persistent cursor with Access Order set to Sequential and datapool row number 100 was the last row accessed in the last suite run the first row accessed in the next suite run is 101 A persistent cursor resumes row access based on the last time the cursor was accessed as a persistent cursor For example suppose a cursor is persistent and the last row accessed for that cursor in a suite run is 100 Then the same suite is run again
45. Robot Window button on the Session Record floating toolbar This button restores the Robot window letting you access the Insert menu gt gt gt Pat IV Playing Back GUI Scripts gt gt gt CHAPTER 9 Playing Back GUI Scripts This chapter explains how to play back GUI scripts It includes the following topics gt gt gt gt gt gt Playback phases Restoring the test environment before playback Setting GUI playback options Playing back a GUI script Viewing results in the TestManager log Analyzing verification point results with the Comparators Playback Phases When you play back a script Rational Robot repeats your recorded actions and automates the software testing process With automation you can test each new build of your application faster and more thoroughly than by testing it manually This decreases testing time and increases both coverage and overall consistency There are two general phases of script playback gt gt Test development phase Regression testing phase These phases are described in the following sections 9 1 Playing Back GUI Scripts Test Development Phase During the test development phase you play back scripts to verify that they work as intended using the same version of the application under test that you used to record This validates the baseline of expected behavior for the application The following table shows the general process for the tes
46. Robot does the following gt If you attempt an unsupported breakpoint assignment before you execute the script the assignment appears to be successful and no warning message appears However when script execution begins Robot automatically removes invalid breakpoint assignments Debugging GUI Scripts gt Ifyou attempt an unsupported breakpoint assignment during the execution of a script for example while execution is stopped at a breakpoint the warning message This is not an executable line of code appears in the status bar Executing to a Selected Line To stop execution at a selected line in a script without setting a breakpoint 1 If necessary open a script by clicking File gt Open gt Script 2 Place the cursor on the line where you want execution to stop Click once to insert a blinking text cursor You can also highlight the entire line or any part of the line 4 Click Debug gt Go Until Cursor Robot executes as far as the line with the text cursor and displays a yellow arrow in the left margin of that line or highlights the line Executing in Animation Mode To play back a script in animation mode to see each line as it executes 1 If necessary open a script by clicking File gt Open gt Script 2 Move and resize the Robot window so that it does not cover the application under test but so that you can still see the Script window 3 Click Debug gt Animate As Robot plays back the script it di
47. Selecting and Identifying the Object to Test on page 4 10 File Options Dialogs Ve Tee _ The Irrational Widget Co amp F Development i ee eee amp Documentation i d uneagaDIe je amp 2 Management i z amp Fj Marketing i Editable ComboBox amp Ge i One x TextArea Here is an editable text b x twas created with t heJFC classJText rea Object Finder tool TestTip Use the Object Data verification point to capture the active state of each component in the panel Robot inserts only the fields with dynamically changing data such as EditBox RadioButton or ComboBox into the panel s Object Data verification point Components without active state JavaPanels PushButtons or Labels are not saved in the verification point 3 Repeat steps 7 10 from the section Testing Data in Java Components on page 14 10 Support for Custom Java Components Support for Custom Java Components With Java you can create your own user defined classes For example you can create a new kind of button class that acts the same way as an existing AWT Button If you derive your new button from the AWT button class Robot can map the new class correctly Beyond the standard class libraries Robot supports custom Java components in other class libraries such as those available with IBM Visual Age and other IDEs This extended Java support is provided through the Robot Java Open API
48. Set to CAPTUREBASE for capturing current basel ne data Set to COMPAREDATA for comparing baseline and actual data runType CAPTUREBASE If runType CAPTUREBASE Then n m ee l xJ CustomVP to execute runType CAPTUREBASE false 0 sqaFail 0 sqaPass 1 Main compareResult 1 captureResult 1 currMetapaths currFilepaths al 00034 001 Admin Ea A Conmle Script Custom P started Debugging Double click the or sign to expand or hide the variables list The Variables window contains lists of the variables that are assigned values during playback and the constants that are referred to during playback Variable and constant values are updated each time execution pauses during playback for example at a breakpoint or as you step through the script line by line Variable and constant values are also updated during animation mode when each statement is executed The data type of each variable and constant listed in the Variables window is indicated by a type declaration character at the end of the variable or constant name Deleting Scripts Variables and constants are grouped according to scope For example in the previous figure gt The variables listed under Main are local variables that are visible only to the Main subprocedure gt The variables listed under CustomVP are module level variables that are visible to al
49. Symantec Visual Cafe gt KLGroup gt Oracle Class In future releases Rational will provide support for additional foundation class libraries For information about the most recent enhancements see the Rational Web site NOTE For information about how to enable your computer to support other foundation classes such as Swing see Setting Up the Sample Java Applet on page 14 7 Making Java Applets and Applications Testable 14 4 To make Java applets and applications testable gt Run the Java Enabler The Java Enabler makes each host environment testable gt Verify that the Java extension is loaded The Java extension includes those additions to Robot that allow Robot to test Java These tasks are described in the following sections Making Java Applets and Applications Testable Running the Java Enabler By default Java testing is disabled in Robot To enable Java testing run the Java Enabler The Java Enabler is a wizard that scans your hard drive looking for Java environments such as Web browsers and Sun JDK installations that Robot supports The Java Enabler only enables those environments that are currently installed NOTE If you install a new Java environment such as a new release of a browser or JDK you must rerun the Enabler after you complete the installation of the Java environment You can download updated versions of the Java Enabler from the Rational Web site whenever support is added for new environments T
50. T Apply wait state to verification point Retry every E econds Timeout after jo seconds r Expected result Pass C Fail Cancel Help 4 Optionally set the Wait state options The wait state specifies how often Robot should retry the verification point until it passes or times out and how long Robot should keep trying the verification point before it times out For more information see Setting a Wait State for a Verification Point on page 4 8 5 Optionally set the Expected result option When you create a verification point the expected result is usually that the verification point will pass for example that a window does exist during playback However you can also indicate that you expect the verification point to fail for example that a window does not exist during playback For more information see Setting the Expected Result for a Verification Point on page 4 9 6 Click OK Inserting Timers Robot lets you insert start timer and stop timer commands to record and write to the log the duration of events in a script A timer measures the time it takes to perform an activity For example you may want to record the time required to perform a database transaction on a remote server or how long it takes the same verification point to execute on client machines with different hardware configurations Inserting Timers You can insert any number of timers with different names into the same scr
51. Test Script Click the name of the script to remove from its session Click Properties Click General View the session name in Referenced Session Click Clear 7 23 Recording Sessions Re recording Sessions When you begin to record over a session that contains scripts Robot prompts you for a confirmation In the same dialog box Robot also prompts you for a disposition of the scripts in the session as follows Session Recording x Do you want to overwrite the existing script and session IV Delete old session s contained scripts Yes No Help Whether you select or clear the check box depends on what you want to do gt Delete all of the session s scripts and their associated properties and begin re recording the session gt Keep the original scripts and their properties while creating new scripts for the session gt Overwrite the original scripts but assign their properties to the new scripts The following sections describe each action Regardless of which action you take the original session and its properties are overwritten Deleting the Original Scripts and Properties To re record a session and delete the original scripts and their properties 1 Click File gt Record Session 2 Inthe Record Session Enter Session Name dialog box select the name of the session to re record and then click OK 3 In the Session Recording dialog box select Delete old session s contained scripts and th
52. Youcanadd or change a key in the baseline data file in the Grid Comparator and then recompare the baseline and actual data files For information see the Grid Comparator Help List of Identification Methods The following tables lists the identification methods The type of verification point that you are creating determines the available identification methods Use This Method Columns By Location To Test On Playback That The locations of recorded column values have not changed Columns By Title The recorded values remain with their column titles even if column locations change Rows By Location The locations of recorded row values have not changed Rows By Content The recorded values in a row have not changed Rows By Key Value The recorded values in a row have not changed the row may have changed location Top Menus By Location The locations of recorded top menus have not changed Top Menus by Title The recorded values remain with their menu titles even if menu locations change Menu Items By Location The locations of recorded menu items have not changed Menu Items by Content The values of recorded menu items have not changed Items by Location The locations of recorded list items have not changed Items by Content The values of selected list items have not changed Working with the Data in Data Grids Working with the Data in Data Grids When you
53. acted upon Please identify the object below Unknown Object Text Standard This unknown object Class MsoCommandBar Type will be mapped to the object type that you select ashan based on the class name Cancel of the window associated with the object If possible select an object type that is appropriate for the object you are defining For example if the unknown object is a custom toolbar that has the same behavior as a standard Windows toolbar and supports the same programmatic interface select Toolbar from the Type list By mapping the object to a known object type you make your script more readable and Robot can test the special properties associated with that object type Also Robot can identify the object more accurately by using the object recognition methods However using an incorrect object mapping can cause problems during playback For example an object might look and act like a standard toolbar but might actually not respond correctly to the messages that are sent to a standard toolbar If you are not sure which type to use select Generic Robot can test the basic set of the object s properties and uses the object s x y coordinates to locate the object 2 Recording a New GUI Script Click OK to continue recording Robot stores the mapping between the window class name and the object type in the project in case the same object type is captured again Important Notes
54. adding the object s class to the list of classes that Robot recognizes and then associating the class to a standard object type Robot saves this custom class object type mapping in the project and uses it to identify the custom object during playback NOTE The custom mapping from class name to object type is stored in the project and is shared among all users of the project Be careful about changing existing mappings because this may cause already recorded scripts to play back incorrectly Defining an Object Class Mapping To define an object class and map an object type to it 1 Identify the class name of the window that corresponds to the object You can use the Spy utility in Visual C to identify the class name You can also use the Robot Inspector tool by clicking Tools gt Inspector 2 13 Recording GUI Scripts 2 14 2 In Robot click Tools gt General Options and then click the Object Mapping tab Editor Preferences Object Mapping Java Class Mapping Warming Changes made to object mappings take place immediately and cannot be undone by the Cancel button Warning Changes made here are shared by all users of the repository Changing these mappings may cause recorded scripts to playback incorrectly Object type AnimateControl Object classes Animation Animation WndClass From the Object type list select the standard object type to be associated with the new object clas
55. all traffic to or from an IP address API recording targets a client application on a specific computer so you probably need to filter protocols automatically if you are using this method To see alist of the protocols that Robot records select the Manual Filtering check box record a script and then view the list in the Manual Filtering dialog box at the end of the recording session How to Filter Protocols To filter protocols in a recorded script 1 Click Tools gt Session Record Options 2 Click the Generator Filtering tab 3 Select the protocol s to include in the script Setting Script Generation Options The following figure illustrates the Generator Filtering tab SQL Server Sybase Tuxedo HTTP NOTE If Robot detects the presence of custom adapters and script generators the Generator Filtering and Generator per Protocol tabs are disabled 6 23 Setting Recording Options 6 24 Automatic and Manual Filtering At script generation time after recording a session Robot can automatically filter protocols based on the protocols listed in the Selected protocols box in this tab or you can specify the protocols that Robot should generate depending on how you set the following check boxes Check Box Meaning If selected Robot generates scripts containing requests for the protocols listed in Selected protocols Auto Filtering If cleared Robot generates scripts containing requests for all scr
56. allows for the reuse of scripts between Windows NT 4 0 Windows 2000 and Windows 98 With its Object Testing technology Robot examines data and properties that are not visible to the user Robot uses Object Oriented Recording to recognize a PowerBuilder object by its internal name 15 1 Testing PowerBuilder Applications You can use Robot to test all PowerBuilder and third party components including gt DataStore controls and hidden DataWindows gt ActiveX controls gt RichTextEdit controls gt DataWindows with RichText presentation style gt All properties of a DataWindow computed field including expression and value Verifying That the PowerBuilder Extension Is Loaded To test PowerBuilder applications first verify that the Robot PowerBuilder extension is loaded in Robot To verify that the extension is loaded 1 Start Robot Click Tools gt Extension Manager Verify that PowerBuilder is selected If not select it AWN To improve the performance of Robot clear the check boxes of all environments that you do not plan to test 5 Exit Robot The next time you start Robot only the extensions for the selected environments are loaded Recording Actions on DataWindows 15 2 Robot uses certain action parameters to identify a DataWindow row if the action is a mouse click These parameters help make your scripts more reliable and readable by reducing the dependency on absolute positions These param
57. and edit SQABasic header files They can be accessed by all modules within the project SQABasic files are stored in the SQABas32 folder of the project unless you specify another location You can specify another location by clicking Tools gt General Options Click the Preferences tab Use the Browse button to find the location Robot checks this location first If the file is not there it looks in the SQABas32 directory SQABasic header files have the extension sbh Creating and Editing Header Files To create a new header file that can be accessed by any module in the project 1 Click File gt New gt SQABasic File 2 Click Header File and click OK You name the file or accept the default name the first time you save it Customizing SQABasic Scripts To edit an existing project wide header file 1 Click File gt Open gt SQABasic File 2 In Files of type select Header Files sbh 3 Click the file to edit and click Open Adding Declarations to the Global Header File For your convenience Robot provides a blank header file called Global sbh Global sbh is a project wide header file stored in SQABas32 in the project You can add declarations to this global header file and or create your own To open Global sbh 1 Click File gt Open gt SQABasic File 2 Set the file type to Header Files sbh 3 Select global sbh and click Open Using SQABasic Header Files After you finish adding global declarati
58. application Examples are check boxes and push buttons gt Nonvisual objects are non GUI objects that you cannot see in the application Examples are blocks and forms You can record actions against visual objects and you can test both visual and nonvisual objects Recording Actions When you record actions against a visual Oracle object Robot recognizes the object by its internal name as follows gt Window Recognized by the window internal name assigned by the developer gt Item Recognized by the block item name assigned by the developer For example if you click a button within a window the script appears as follows window name Window SetContext Same SAMPLE_WINDOW Two ChildWindow ny PushButton Click Name DATA_CONTROLS GO_CUSTOMER block item name 12 7 Testing Oracle Forms Applications Testing Objects 12 8 When you test a visual or nonvisual Oracle object Robot can provide two views into the Oracle application gt Full View Includes all objects visual and nonvisual in the application This is similar to the Ownership View in the Oracle Forms Navigator In this view items are children of blocks which are children of a form This view also includes canvas views and windows When you select an object from the full view the object is identified by its complete path in the script gt GUI View Includes only the visual GUI objects in the application This is similar to
59. be created before the project file is converted Optionally uncheck Launch Delphi After Conversion if you don t want Delphi to be automatically started after the conversion If this is not checked you need to start Delphi manually after the conversion Click Convert The Enabler Optionally creates a backup file of the project Adds the line SQASrvr to your project file after the uses line Optionally starts Delphi Click the Close button in the Enabler If an information dialog pops up click Yes to reload the project In Delphi recompile your project 17 3 Testing Delphi Applications 17 4 Removing the Rational Object Testing Library The Rational Object Testing Library is not visible is nonintrusive and has no license restrictions on it Therefore you can leave it in the application when you distribute it However if you choose to remove the Object Testing Library from your project 1 Click Start gt Programs gt Borland Delphi gt Rational Test Delphi Project Converter to open the Enabler Click Browse under Delphi Project Select the project from which you want to remove the Library and click OK Choose the correct compiler version depending on which version of Delphi you have installed on your computer Select Remove Rational Object Testing Library Optionally uncheck Backup Project File if you don t want a backup file to be created before the project file is converted
60. but the cursor is now private Row access ends at 50 If the cursor is set back to persistent the next time the suite is run row access resumes with row 101 not 51 With persistent cursors you can use the Row box to set the row to be accessed first in the next test run Persistent cursors are only valid with shared cursors and when Access Order is set to either Sequential or Shuffle gt With a private cursor each user starts at the top of its access order With Random or Shuffle access the access order is unique for each user and operates independently of the others With Sequential access the access order is the same for each user ranging from the first row stored in the file to the last but it operates independently for each user Continued Field or Column Access Order Using Datapools with Sessions Description Determines the sequence in which datapool rows are accessed gt Sequential Rows are accessed in the order in which they are physically stored in the datapool file beginning with the first row in the file and ending with the last gt Random Rows are accessed in any order and any given row can be accessed multiple times or not at all gt Shuffle Each time TestManager rearranges or shuffles the access order of all datapool rows a unique sequence results Each row is referenced in a shuffled sequence only once Think of nonsequential access order Shuffle and Random as being l
61. commands to 6 15 autonaming 6 37 blocks 8 4 cancelling 7 10 changing recording options 7 19 comments in 8 13 compiling 5 7 copying 7 26 copying code from one script to another 7 21 deleting 5 15 7 24 7 27 editing 5 1 generating after recording 7 5 generating from a session improving readability 8 5 list of in a session 7 19 manual protocol filtering 7 11 Index 1 1 Using Rational Robot overwriting 7 25 printing 5 7 properties 7 22 recording 7 3 regenerating from a session 7 19 removing from a session 7 23 re recording 7 25 saving 5 7 session associated with 7 23 splitting 7 17 stopping recording 7 4 where stored 7 2 See also GUI scripts selecting objects to test 4 10 sequential datapool access 10 4 10 17 servers associating with a client 6 11 associating with a proxy 6 10 defining for network or proxy recording 6 40 removing 6 41 selecting for network recording 6 6 session files 7 1 7 2 regenerating scripts from 7 19 where stored 7 2 session ID 6 29 where stored 6 29 Session Insert toolbar 7 5 Session Record toolbar 7 5 Session Recorder 7 8 during API recording 7 9 icon 7 10 sessions autonaming 6 37 contents of 7 16 deleting 7 27 exporting 7 18 finding the session name for a script 7 23 Index 12 importing 7 18 properties of 7 20 recording 7 1 regenerating scripts from 7 19 removing a script from 7 23 re recording 7 24 7 25 scripts within 7 19 splitting into multiple scripts 7 17 uses for 7 16
62. continue _ K Cancel Help recording or editing Robot inserts the comment into the script in green by default preceded by a single quotation mark For example This is a comment in the script To change lines of text into comments or to uncomment text 1 Highlight the text 2 Click Edit gt Comment Line or Edit gt Uncomment Line Inserting Log Messages During recording or editing you can insert a log message description and result into a GUI script During playback Robot inserts this information into the log You can use log messages to document your script for the playback process Adding Features to GUI Scripts To insert a log message into a script during recording or editing 1 Do one of the following Ifrecording click the Display GUI Insert Toolbar button on the GUI Record toolbar Ifediting position the pointer in the script and click the Display GUI Insert Toolbar button on the Standard toolbar 2 Click the Write to Log button on the GUI Insert toolbar and then do the following Type a message 60 characters maximum Write T Log 27x rar Message Optionally type a description 60 characters maximum Description r Result Select a result fi Pass C Fail C Waming C None Click OK to continue OK Cancel Help recording or editing After playback you can view logs and messages using TestManager The message appears in the L
63. create a Clipboard Menu or Object Data verification point and select an object you are actually testing the object s data This data appears in a Robot data grid which shows data in rows and columns You use the data grid to select and edit the data to test Selecting the Data to Test in a Data Grid After selecting an object but before saving the verification point you can select the data to test for the following verification points Clipboard Menu and Object Data The values originally captured appear in a data grid Object Data Verification Point oy x Selected object Generic OCX Name flexAdmin Data test All Data Verification method STREET Fred Thomas 1 Main St Joe Langley 25 Western Blvd Use the data grid to Blake Myers 860 S Los Angele select a subset of the Trent Culpito 75 Wall St 22nd FB captured values Identification method Columns fey Location z Rows fey Location Number of columns and rows All items Cancel Recapture Help I Transpose view Creating Verification Points in GUI Scripts Use any of the following methods to select data in the columns rows or cells of the data grid The selected values become the baseline that Robot uses during playback to test the current build of the application To Select Do This Range Click and drag the pointer over a range of cells OF Click the first cell hold down the SHIFT key and click the last cell in the r
64. edit scripts using the SQABasic and VU scripting environments The Robot editor provides color coded commands with keyword Help for powerful integrated programming during script development VU scripting is used with sessions in performance testing Test applications developed with IDEs such as Java HTML Visual Basic Oracle Forms Delphi and PowerBuilder You can test objects even if they are not visible in the application s interface Collect diagnostic information about an application during script playback Robot is integrated with Rational Purify Rational Quantify and Rational PureCoverage You can play back scripts under a diagnostic tool and see the results in the log The Object Oriented Recording technology in Robot lets you generate scripts by simply running and using the application under test Robot uses Object Oriented Recording to identify objects by their internal object names not by screen coordinates If objects change locations or their text changes Robot still finds them on playback messages What Is Rational Robot The following figure shows the main Robot window after you have recorded a script Click a button to insert a verification GUI Insert point to test the state of any object RaPeahwn eee fo jo a Ey amp 2 e Click to start recording a Edit View Record Debug Insert Tools Window Help GUI or VU SA GAL Bevk EECC LLICA ET script A Fi Notepad Te
65. feedback during recording gt Canceling scripts during recording gt Choosing the protocols to include in a script p gt Playing back a script quickly gt Working with sessions gt Coding a script manually gt Defining script properties gt Managing scripts and sessions Recording a Session To produce scripts for performance testing you record a session After recording Robot generates one or more scripts from the session A Robot recording session contains all of the client requests and server responses issued from the time you begin recording until the time you stop recording For API network or proxy recording Robot stores all of the requests and responses recorded during the session in a session file wch The session file is sometimes called the watch file With custom recording four session file types are supported session files or watch files wch XML files xml annotation files ids and extension files ext 7 1 Recording Sessions What You Can Record in a Session Robot gives you considerable recording flexibility You can record gt Multiple transactions For example you can record a data entry transaction and a query transaction in the same recording session one after the other gt Transactions against the same server or different servers For example you can record one transaction against one Web server and then record another transaction against a different Web server gt
66. file Testproc tpl that you can use to automatically add comments or include statements in new GUI scripts Any text that you add to Testproc tpl automatically appears in each newly recorded script To edit Testproc tpl 1 LQ E Click File gt Open gt SQABasic File Set the file type to Template Files tpl Select testproc tpl and click Open Type include statements as in the following example Include global declarations in all scripts SInclude global sbh The Include metacommand begins with a single quotation mark Although this normally indicates a comment when followed by a dollar sign it indicates a special SQABasic command Click File gt Save 3 19 Adding Features to GUI Scripts 3 20 gt gt gt CHAPTER 4 Creating Verification Points in GUI Scripts This chapter provides conceptual information about verification points and tells you how to perform common operations associated with creating a verification point It includes the following topics gt gt gt gt gt gt About verification points Types of verification points Before you create a verification point Tasks associated with creating a verification point Working with the data in data grids Editing a verification point NOTE For detailed information about each verification point and how to create it see the Robot Help About Verification Points A verification point is a point in a script that
67. for a verification point based on a new specification or anticipated changes to the application under test By editing data before playback you can often avoid a verification point failure For information about the four Comparators see each Comparator s Help NOTE To compare the baseline and actual files you must open the Comparator through the log For information see Analyzing Verification Point Results with the Comparators on page 9 22 Editing a Verification Point Renaming a Verification Point Renaming a verification point involves two tasks gt Renaming the verification point in the Asset pane which renames the verification point and its associated files in the project gt Renaming all references to that verification point in the script Bi testi OL x Verification Points od If you rename 4 __s A 4 the verification EB Object Data VP QSR ee ee le EE ut you also need point in the Object Data 2 to rename Asset pane if references to it in the script When you rename a verification point in the Asset pane Robot does not automatically rename references to it in the script If you play back a script that refers to a verification point with a name that is not in the Asset pane and therefore not in the project the verification point and script fails To rename a verification point and its associated files 1 Right click the verification point name in the Asset left pane a
68. from One Protocol Type to Another You can also use the Manual Filtering dialog box to convert the requests captured during a connection from one protocol type to another To convert a protocol in the Manual Filtering tree 1 Click the item of the tree representing the protocol to convert 2 Inthe Protocol box select the new protocol 3 Click OK NOTE Some requests may be lost in a protocol conversion 7 15 Recording Sessions Typically you do not want to convert protocol requests But if you need to convert you will most likely convert to or from socket requests Socket requests are low level requests that are typically issued in addition to requests made with other higher level protocols such Oracle or SQL Server As a result you can specify that a captured protocol be converted to its associated socket requests or that captured socket requests be converted to the associated requests in a higher level protocol Playing Back a Script Quickly After you record a script you generally play it back from a suite in TestManager as part of a user group However if you want to test or view a script that you have just recorded or edited you can play it back quickly To play back a script quickly 1 In Robot click File gt Playback Click the name of the script to play back Click OK TestManager appears ready to play back the script that you selected In TestManager click Run gt Suite Click OK in the Run Suite d
69. information to write to the log file gt Automatically restart Windows or call your own error handling subprocedure before performing any other action gt Save an audit of the function where the fault occurred in the failing program The Trap utility detects and traps the following events during playback gt UAE General Protection Fault 13 gt Stack Overflow Fault 12 p gt Invalid Op Code Fault 6 gt Divide by Zero Fault 0 If one of these errors occurs Trap appends the error data to the existing Sqatrap log file in the Rational installation directory or creates a new file if one does not exist For more information see Analyzing Results in the Sqatrap log File on page 9 18 9 17 Playing Back GUI Scripts 9 18 Starting Trap NOTE Before you start Trap see Important Notes on page 9 17 To automatically start Trap during playback 1 Open the GUI Playback Options dialog box See Setting GUI Playback Options on page 9 4 2 Click the Trap tab Error Recovery Trap Diagnostic Tools Vv i T Stack trace T Module and class list Restart Windows session Call user defined sub procedure Select Start Trap to enable the other options To include the contents of the stack for noncurrent tasks select Stack trace To include the modules and class list information select Module and class list Oy OIE 2 Click one of the following to specify what Trap should do after detecting a GPF Resta
70. loop scripts or play them back in a different order you must manually edit your scripts to achieve successful playback Therefore select this option only if You will not loop scripts or play them back in a different order or if you do you do not mind editing the scripts You want to preserve the browser s keep alive behavior that is in the recorded session For multiple script recordings it is best not to use keep alives This prevents you from having to be aware of persistent HTTP connections that span script boundaries when you loop or change script ordering However the default behavior may result in increased HTTP server overhead due to the absence of keep alives Supplying Variable Data Values to an HTTP Script Dynamic data correlation is a technique to supply variable data values to a script when the transactions in a script depend on values supplied from the server When you record an HTTP script the Web server may return a unique string or session ID to your browser The next time your browser makes a request it must send back the same session ID to authenticate itself with the server The session ID can be stored in three places In the Cookie field of the HTTP header In an arbitrarily named field of the HTTP header 6 29 Setting Recording Options 6 30 gt Inan arbitrarily hidden field in an actual HTML page TestManager finds the session IDs and other correlated variables and when you ru
71. more information Configuring Robot for Netscape Playback To configure Robot for Netscape playback 1 In Robot click Tools gt Extension Manager and make sure that the HTML Navigator extension is selected To improve performance clear any extensions that are not used Click OK Restart Robot to load the extension 2 In Robot click Tools gt GUI Playback Options and click the Web Browser tab 13 13 Testing HTML Applications Select Netscape Navigator 4 x If you have multiple versions of Navigator specify the full path to the version of Navigator that you want to use for playback Alternatively you can edit your script so that it plays back in Navigator For example to specify Navigator playback type one of the following commands in your script SQASetDefaultBrowser Navigator SQASetDefaultBrowser Navigator c program files netscape communicator program netscape exe Use the first command if you have only one version of Navigator on your computer Use the second command if you have multiple versions of Navigator on your computer replacing the program path indicated with the actual path on your computer Be sure to insert the command before the StartBrowser command is invoked in the script Differences Between Internet Explorer and Navigator 13 14 Both Microsoft Internet Explorer and Netscape Navigator contain proprietary extensions to the HTML standard As a result HTML documents are often rendered diffe
72. mouse button If the Select Object dialog box appears again click OK If you point to the title bar of a window other than the Developer 2000 Forms Runtime window Robot captures the properties of all of the visual objects in the window If you point to the title bar of the Developer 2000 Forms Runtime window Robot captures the properties of all of the visual and nonvisual objects in the application For more information see the next section Testing Properties of Nonvisual Objects 3 Complete the verification point as usual Testing Properties of Nonvisual Objects To test the properties of a nonvisual object 1 Start creating an Object Properties verification point as usual For instructions see Object Properties Verification Point in the Robot Help Index 2 Inthe Select Object dialog box click Browse to display the Object List This is a list of all objects on the desktop 3 Expand the Window Name OracleRootWindow branch by double clicking the plus sign The nonvisual objects are contained in the Form branch of the OracleRootWindow Object List of x Desktop Window Class Shell_Traywind Window Class tooltips_class32 Level 2 Window Class tooltips_class32 Level 3 Window Caption NetDDE Agent IV Show hidden Window Name 4B0UT_WINDOW Window Name OracleRoc o T Invert object Contains the full a7 Form Name SAMPLEFORM VIEW of objects Generic OracleConsole el which include
73. of the HTML elements that you can test see How Robot Maps HTML Elements on page 13 9 6 Release the mouse button and click OK 7 Ifthe Object Data Test dialog box appears select the data test to use and click OK Object Data Tests 24 x Selected objec HTMLDocument HTMLTitle Classics Online Data test l Contents Contents Document Title Document URL E Cancel Recaptue Help 13 6 9 Testing Data in HTML Elements There are five types of data tests that you can use on HTML elements Not all tests are available for each type of element For example you might want to perform a Contents data test on an HTMLDocument The Contents data test captures all of the visible text on the page including text in forms fields such as list boxes and combo boxes For information about the types of data tests that are available for each element see Supported Data Tests for HTML Testing on page 13 11 Select the verification method that Robot should use to compare the baseline data captured while recording with the data captured during playback For example use the Find Sub String Case Sensitive verification method to verify that the text captured during recording exactly matches a subset of the captured text during playback Suppose you want to verify that the text thank you for shopping with Classics Online is returned after a customer submits a purchase order By selecting the Find Sub String Case Sensiti
74. of the SQABasic SQADatapoolOpen command With session scripts you can control row access order through the Access Order setting in the Robot Configure Datapool in Test Script dialog box See page 10 17 Datapool Limits A datapool can have up to 150 columns if the Rational Test software automatically generates the data for the datapool or 32 768 columns if you import the datapool from a database or other source Also a datapool can have up to 2 147 483 647 rows What Kinds of Problems Does a Datapool Solve 10 4 If you play back a script just once during a test run that script probably does not need to access a datapool But often during a test run and especially during performance testing you need to run the same script multiple times for example gt During performance testing you may run multiple instances of a script so that the script is executed many times simultaneously Remember a virtual tester is one runtime instance of a script gt During functional and performance testing you may often run multiple iterations of a script so that the script is executed many times consecutively simulating a virtual tester performing the same task over and over If the values used in each script instance and each script iteration are the same literal values the values you provided during recording you might encounter problems at test runtime Here are some examples of problems that datapools solve gt P
75. open a script by clicking File gt Open gt Script Place the pointer on the line where you want to set a new breakpoint or clear an existing breakpoint You can only place a breakpoint on a line where an SQABasic command is executed Breakpoints on comments labels and blank lines are not supported Also a very few commands do not support breakpoints for example Dim and Sub Click once to insert a blinking text cursor You can also highlight the entire line or any part of the line Click Debug gt Set or Clear Breakpoint If you set a breakpoint Robot inserts a solid red circle in the left margin or highlights the line If you clear a breakpoint Robot removes the circle or highlighting If you set a breakpoint click Debug gt Go Robot executes as far as the breakpoint and then displays a yellow arrow in the left margin of that line or highlights the line Last line executed Next line to be executed fo CE Window SetContext Name ffrmOrder 4 InputKeys 12345 TAB 11 9 Result WindowVP CompareProperties PushButton Click Name cmdOrder Verification Points EB Menu ey Object Properties Result WindowVP Exists Caption Window SetContext Caption Classics PushButton Click Text 0K Result WindowVP CompareMenu Nam WAZ SS Breakpoint not yet reached If you attempt to assign a breakpoint to a line of code that does not support breakpoints
76. open an empty script and add code to it 1 In Robot click File gt New Test Script and then choose the type of script to create 2 Type a script name and optionally a description of the script 7 21 Recording Sessions 3 Click OK Robot creates an empty script with the appropriate scripting language headers 4 Add the code to the script Creating Library Files for VU Scripts Scripting language libraries are packaged in DLLs You create dynamic link library DLL files using a development tool such as Microsoft Visual Studio For information about making the DLLs that you create available to VU scripts see the VU Language Reference Defining Script Properties A script can have properties associated with it in addition to the script name Examples of script properties include a description of the script the purpose of the script and any test requirements associated with the script Defining script properties is an important part of the test planning process For that reason you typically define a script s properties in TestManager before you record the script But you can also define a script s properties after you record the script as described in the following section How to Define Script Properties in Robot 7 22 To define properties for a script that is open for editing in Robot click File gt Properties If the script exists but is not open 1 Click File gt Open gt Test Script to open the Op
77. or custom data test to back it up or to create a new test from an existing one When you copy a data test you can use the test only for objects of the class for which the original data test was created You can rename any custom data test However scripts that contain the data test under its original name fail on playback unless you change the name in the scripts You can delete any custom data test However scripts that contain the data test fail on playback unless you delete the test from the scripts To copy rename or delete a data test 1 Click Tools gt Object Data Test Definition Select the data test Do one of the following To copy the test click Copy Type a new name 50 characters maximum and click OK To rename the test click Rename Type a new name 50 characters maximum and click OK To delete the test click Delete Click OK to confirm the deletion If you renamed or deleted the data test be sure to rename it or delete it in any scripts that use that data test gt gt gt APPENDIX B Rational Robot Command Line Options You use the Rational Robot command line options to log on open a script and play back the script SYNTAX rtrobo exe scriptname user userid password password project full path and full projectname play purify quantify coverage build build logfolder foldername log logname nolog close Syntax Element rtrobo exe
78. out period defined for it the release times and time out period apply to all synchronization points of that same name even if a synchronization point is in a script Scope of a Synchronization Point The scope of a synchronization point includes all scripts and all user groups that reference a particular synchronization point name For example suppose a suite contains the following user groups gt A Data Entry user group of 75 virtual testers This user group runs a script containing the synchronization point Before Query gt An Engineering user group of 10 virtual testers This user group runs a different script than the Data Entry groups runs but this script also contains a synchronization point named Before Query gt A Customer Service user group of 25 virtual testers This user group runs a script that contains no synchronization points However the user group does have a synchronization point defined for it This synchronization point is also named Before Query At suite runtime TestManager releases the virtual testers held at the Before Query synchronization point when all 110 virtual testers arrive at their respective synchronization points Comments Comments Use comments to document the script and to help you find your way around the script if you later need to edit it Comments are ignored at compile time and during playback In VU a comment begins with the characters and ends with the characters
79. passed or failed Use the Comparators to gt Analyze the results of verification points to determine why a script may have failed Robot includes four Comparators Object Properties Comparator Text Comparator Grid Comparator Image Comparator Introduction to Rational Robot The following figure shows a log file that contains a failed Object Properties verification point Ea File Edit View Reports Tools Window Help lex jab SD UG re BS 2e ELETA Start Date Time pon 3 00 05 15 10 PM End Date Time zix Suite e a Test Plans El Computer Start 4 Iterations Build Sie Script Start OPCtest Bun SS Verification Point Object Properties Obj Script End OPCtest Log Folder Computer End Defaut Iteration When you select the line that contains the failed Object Properties verification point and click View gt Verification Point the Object Properties Comparator opens as shown in the following figure In the Comparator the Baseline column shows the original recording and the Actual column shows the playback that failed Compare the two files to determine whether the difference is an intentional change in the application or a defect El Object Properties Comparator testl Object Properties File Edit View Help ee 4 n saB enw Objects Properties a i dyw E EditBox Objectinde Resizeable Rdywrap txt
80. searches for and opens a particular file gt Athird that modifies the file gt A fourth that closes the application and returns to the starting point Combined into a single shell script scripts can run in unattended mode and perform comprehensive test coverage The results from all scripts are stored in the same log which simplifies results analysis For unattended testing each shell script should return to a common point in the application under test This common point could be a main menu a specific window or dialog box or even the Windows desktop This assures that script playback remains synchronized with the application under test Before creating a shell script you must have already recorded the individual scripts that you intend to include Creating a Shell Script To create a shell script 1 Click File gt New gt GUI Shell Script Type a name 40 characters maximum Optionally type a description Click OK OG is To add scripts select one or more scripts in the Available list and click gt or gt gt Robot plays back scripts in the same order in which they appear in the Selected list 6 Click OK The shell script contains a Cal 1Script command followed by the name of each script that you included 2 25 Recording GUI Scripts Playing Back a Shell Script 2 26 You play back a shell script just like any other script For information see Chapter 9 Playing Back GUI Scripts For unattend
81. see Setting a Wait State for a Verification Point on page 4 8 To insert a delay value into a script during recording or editing 1 Do one of the following Ifrecording click the Open Robot Window button on the GUI Record toolbar i Ifediting position the pointer in the script 2 Click Insert gt Delay and then do the following Type the delay interval in milliseconds For example l second 1000 1 minute 60 000 TEN 1 hour 3 600 000 Delay Interval oog milliseconds Click OK to continue __ 0K Cancel Help recording or editing Using the Insert Menu The preceding sections of this chapter describe how to use the GUI Insert toolbar to add features to scripts You can also use the Robot Insert menu to add these features If Robot is minimized while you are recording Des gt Click the Open Robot Window button on the GUI Record toolbar This button L restores the Robot window letting you use the Insert menu Tools Window Hel Verification Point gt Delay Start Application Start Java Application Start Browser Start Timer Stop Timer Call Script Comment Write to Log Synchronization Point 3 13 Adding Features to GUI Scripts Customizing SQABasic Scripts In addition to editing a recorded script you can customize SQABasic scripts in the following ways gt By adding your own SQABasic subprocedures and function
82. select a file The log file is stored in the same directory as the fmb file unless you specify another path If the file already exists the text is appended to the file 12 5 Testing Oracle Forms Applications 12 6 11 If objects in your application contain the WHEN MOUSE ENTER trigger the Enabler prepends sqga_mouse_handler to each trigger This is necessary for Robot to correctly record mouse actions against these objects If you need to prevent this modification clear Modify local WHEN MOUSE ENTER triggers For information about the Enabler and triggers see What Happens When You Run the Enabler on page 12 2 If this check box is cleared the Enabler displays warning messages in the Status box when it detects any of these local triggers 12 Click OK 13 Click Enable As the file is enabled information appears in the Status box 14 If you did not select the Generate option in step 4 regenerate your application once before using Robot by doing one of the following In Oracle Forms 6 0 or 5 0 open the Forms Builder Load each enabled fmb file and click File gt Administration gt Compile File In Oracle Forms 4 5 open the Forms Designer Load each enabled fmb file and click File gt Administration gt Generate You are now ready to use Robot with your Oracle Forms application Distributing Your Application The triggers and the Object Testing Library are not visible and are nonintrusive and ther
83. selected in the Generator Filtering tab Robot lists the protocols that are available for capture in the Available Protocols section When you move protocols to the Selected Protocols section they are included in your script Auto Filtering is the only filtering choice for API extensions and custom recorder filter adapters Manually Filtering Protocols 7 12 The Manual Filtering dialog box lists in a hierarchical tree the connections that Robot detected during the recording session In this dialog box a connection has three parts gt The name or IP address ofa client gt The name or IP address of the server that communicated with the client during the connection gt The protocol of the captured requests and responses issued during the connection Use this dialog box to select the protocols to include in the script You select the protocols to include by adding and removing the connections listed in the dialog box Because you are selecting protocols within the context of a connection select protocols in one or more of these ways gt The protocol used in all the connections to a particular server gt The protocols used in all the connections from a particular client gt A particular protocol name regardless of the clients and servers that use it NOTE Manual Filtering is not available for API extensions and custom recorder filter adapters Choosing the Protocols to Include in a Script Controls in the Manual Filterin
84. sessions may not be the best option If session reusability and modularity are a priority sessions should not be split However examples of optimal times to split sessions might be gt You want to use a session extensively for instance a single release of an application that will be tested on ten different hardware configurations The testing would take a month to complete and the code would be frozen In this case time invested in splitting sessions is spread over a long fixed period gt You have a logon process that requires a lot of manual script modifications in order to work robustly You may have three user groups and you do not want to edit the logon part of the script three times therefore you have a simple logon script for all three user groups gt You want to mix and match activities from different sessions gt You record some parts of a session that need to be repeated multiple times at playback while other parts of the session do not need to be repeated How to Split a Session into Multiple Scripts To split a session into multiple scripts 1 During recording at the point where you want to end one script and begin a new one click the Split Script button on the Session Record floating toolbar 2 Enter a name for the script that you are ending or accept the default name Specify a name for the script that you are about to begin when you finish recording client requests Recording Sessions
85. shared create the project in a shared directory using the Uniform Naming Convention UNC UNC paths are required for GUI test scripts and Manual test scripts that are run on Agent computers For more information about creating a shared directory see the Rational Suite Administrator s Guide or the Rational Administrator Help Enabling IDE Applications for Testing Robot provides specialized support for testing the objects in applications that are created in many integrated development environments IDEs To successfully test the objects in Oracle Forms HTML Java C Delphi and Visual Basic 4 0 applications you need to enable the applications as follows before you start recording your scripts gt Oracle Forms Install the Rational Test Enabler for Oracle Forms Run the Enabler to have it add the Rational Test Object Testing Library and three triggers to the fmb files of the application For information see Chapter 12 Testing Oracle Forms Applications HTML While recording or editing a script use the Start Browser toolbar button to start Internet Explorer or Netscape Navigator from Robot This loads the Rational ActiveX Test Control which lets Robot recognize Web based objects For information see Chapter 13 Testing HTML Applications Java Run the Java Enabler to have it scan your hard drive for Java environments such as Web browsers and Sun JDK installations that Robot supports The Java Enabler only enables thos
86. the Visual View in the Oracle Forms Navigator In this view all objects are children of a window When you select an object from the GUI view the object is identified by its block item name relative to the window in the script The following figure shows the full view and the GUI view collapsed Desktop j Window Class Shell_Traywnd H Window Class tooltips_class32 H Window Class tooltips_class32 Level 2 Window Name 4BOUT_WINDOW Window Name OracleRootwindow The full view includes visual and nonvisual objects orm Name SAMPLEFORM J Window Name SAMPLE_WINDOW_TWO The GUI view includes Ll Window Name SAMPLE_WINDOW only visual objects j Window Class ProxyT arget H Window Class ProxyT arget Level 2 j To see both Robot views of an Oracle application 1 Start to create a verification point 2 In the Select Object dialog box click Browse to open the Object List Two types of branches appear under the OracleRootWindow branch gt The Form branch gives you a full view of all objects visual and nonvisual in the application If you have multiple forms Robot displays a full view for the active form only gt The Window branches give you a GUI view of only the visual objects in the application Recording Actions and Testing Objects The following figure shows the expanded full view of the Form branch The expanded full view includes Items as children of blocks which are ch
87. this section is not applicable for GUI scripts or if you are creating a datapool for exclusive use by a GUI script To create a datapool that is accessed only by GUI scripts see Using Datapools with GUI Scripts on page 10 24 Step 1 Editing Datapool Configuration You begin the process of creating a datapool by editing the DATAPOOL_CONFIG statement that Robot automatically generates in a script DATAPOOL CONFIG has two basic purposes gt During datapool creation it specifies the datapool columns for Robot to create if any gt During test runtime it provides information such as the access order of datapool rows and whether script variables should be assigned values from the datapool or use the literal values provided during recording The best way to edit DATAPOOL CONFIG is by editing the Robot Configure Datapool in Test Script dialog box rather than by editing the script directly To edit datapool configuration and to begin the process of defining and generating a datapool 1 Ifthe script that accesses the datapool is not open for editing click File gt Open gt Test Script to open it 2 Click Edit gt Datapool Information to open the Configure Datapool in Test Script dialog box This dialog box lets you edit the DATAPOOL_ CONFIG section of the script 3 Either accept the defaults in the Configure Datapool in Test Script dialog box or make any appropriate changes Use the table on page 10 16 to help you modify t
88. to play back scripts in sequence The Recording Process When you record a GUI script Robot records gt Your actions as you use the application under test These user actions include keystrokes and mouse clicks that help you navigate through the application Verification points that you insert to capture and save information about specific objects A verification point is a point in a script that you create to confirm the state of an object across builds During recording the verification point captures object information and stores it as the baseline During playback the verification point recaptures the object information and compares it to the baseline 2 1 Recording GUI Scripts The recorded GUI script establishes the baseline of expected behavior for the application under test When new builds of the application become available you can play back the script to test the builds against the established baseline in a fraction of the time that it would take to perform the testing manually The Recording Workflow Typically when you record a GUI script your goal is to gt Record actions that an actual user might perform for example clicking a menu command or selecting a check box gt Create verification points to confirm the state of objects across builds of the application under test for example the properties of an object or the text in an entry field The following figure outlines the general process for recor
89. to this library source file and or create your own To open Global sbl 1 Click File gt Open gt SQABasic File 2 Set the file type to Library Source Files sbl 3 Select global sbl and click Open 3 15 Adding Features to GUI Scripts Using Library Source Files To use an SQABasic library file at runtime you must gt Add custom procedures to the library source file gt Compile the file Both types of SQABasic library source files extensions sbl and rec compile to a sbx runtime file gt Declare the file in an SQABasic header file or directly in a script or library file that will call the custom procedures Here is an example of declaring the sub procedure myProc in the library file Mylibrary sbx Declare Sub myProc BasicLib Mylibrary arg as Integer And here is an example of declaring the function myFunc in the dll file Mylibrary dll Declare Function myFunc Lib Mylibrary ByVal PassVar as Integer For information about adding custom procedures to SQABasic library files and about declaring library files including dll files see the SQABasic Language Reference For information about compiling SQABasic library source files see Compiling Scripts and SQABasic Library Source Files on page 5 7 SQABasic Header Files 3 16 Header files let you declare custom procedures constants and variables that you want to make available to multiple script and library source files You can use Robot to create
90. uniquely identify the component The dot prefix is necessary to make sure that the name has been explicitly set by the user and not set to a default value by the browser This recognition method is available with all java awt Component derived classes gt Ifthe component contains an accessibleContext accessibleName property Robot uses it to recognize the component This recognition method is available only with JFC derived classes By assigning unique names to your Java components you can make your scripts more resilient 14 17 Testing Java Applets and Applications 14 18 gt gt gt CHAPTER 5 Testing PowerBuilder Applications This chapter describes how to test 32 bit PowerBuilder applications with Rational Robot It includes the following topics gt gt gt gt gt gt gt About Robot support for PowerBuilder applications Verifying that the PowerBuilder extension is loaded Recording actions on DataWindows Testing an expression value of a DataWindow property Testing DataStore controls and hidden DataWindows Capturing data in a DropDownDataWindow and DropDownListBox Testing the value of a DataWindow computed field About Robot Support for PowerBuilder Applications Rational Robot provides comprehensive support for testing 32 bit applications built with PowerBuilder 5 0 through 7 0 Robot supports the testing of applications that you migrate from one PowerBuilder version to another and
91. values in Robot 10 23 DATAPOOL_CONFIG 10 14 scripts 5 1 5 2 verification points 4 23 emulated users See GUI users virtual users users emulation commands 6 16 associating with block and timer names 8 5 automatically timed 8 2 Enabler for Oracle Forms 12 2 Enabler Delphi 17 2 enabling applications for testing 2 4 ending recording of GUI scripts 2 22 error recovery options for GUI script playback 9 9 errors detecting during playback 9 17 locating after compiling 5 9 excluding datapool columns 10 19 executable files starting 3 1 executing suites 7 16 executing to a selected line during debugging 5 13 expected results for verification points 4 9 exporting sessions 7 18 expressions in data tests A 6 in PowerBuilder applications 15 4 Extension Manager Java 14 1 Oracle Forms 12 7 PeopleTools 16 2 PowerBuilder 15 2 Visual Basic 11 3 F failures setting error recovery options 9 9 features adding to GUI scripts 3 1 adding to existing GUI scripts 5 2 comments 3 11 delay values 3 12 inserting calls to scripts 3 5 log messages 3 11 starting applications 3 1 timers 3 8 verification points 3 6 feedback during session recording 6 39 7 8 7 10 File Comparison verification point 4 3 File Existence verification point 4 3 file location scripts 7 2 session files 7 2 file types csv datapool files 10 3 ord object order preference files 2 13 rec as SQABasic library source files 3 14 s scripts 7 2 sbh SQABasic header
92. where stored 7 2 setting breakpoints 5 11 shared datapool cursors 10 3 10 16 shell scripts 2 25 shuffle datapool access 10 4 10 17 single step execution during debugging 5 11 socket protocols 6 26 changing 7 15 spc datapool specification files 10 3 SQA Basic Files using filters to open 3 17 SQA Delphi Project Enabler 17 2 sqa files for LOV objects 12 15 SQA Object Testing Library Delphi 17 2 SQABasic files compiling 5 7 header files 3 17 library source files 3 15 printing 5 7 saving 5 7 template file 3 19 SQABasic header files 3 14 3 16 SQASrvr code 17 2 sqatrap log 9 18 SQL return codes comparing during session recording and playback 6 18 SQL Server login information 6 43 stack overflows detecting 9 17 standard data types role of 10 9 when to use 10 10 Start Application command 3 2 Start Browser command 3 2 Start Java Application command 3 2 starting applications 3 1 starting applications 6 38 starting proxy service 6 44 stepping into scripts during debugging 5 11 stepping out of called scripts during debugging 5 11 stepping over command lines during debugging 5 11 stopping proxy service 6 44 recording 7 4 stopping recording of GUI scripts 2 22 suites running 7 16 support technical 2 xvi Swing foundation classes installing 14 8 Sybase login information 6 43 synchronization points 8 8 8 11 example of 8 9 inserting into schedules 8 10 8 11 inserting into script 8 10 8 11 multiple 8 10 release time rang
93. word proxy to refer to the computer that performs proxy recording It does not refer to a Web proxy server Proxy recording occurs at the OSI application layer and involves receiving and sending socket transactions With proxy recording you can record conversations between multiple specific clients and servers that is when the Any choice in the Method Network tab for either clients or servers would be impractical Setting Recording Options The following examples show when you might need multiple clients and servers gt If different user groups such as order entry clerks and customer service representatives issue requests to the server at the same time during a single recording session If requests are being sent to different databases such as an Inventory database and a Human Resources database located on different computers The proxy computer intercepts requests from clients and relays them to the server None of the client computers issuing requests to the servers need to have Robot installed Robot is required only on the proxy computer The following figure illustrates a proxy recording setup with multiple client computers and one server Each computer s network name indicates its role in the client server traffic Network names are followed by the computer s port number Client Computers Proxy Computer Server Computer Rational Client1 30 p e ao man e Proxy 3
94. xi Rational Robot User s Guide xii 14 Testing Java Applets and Applications About Robot Support for Java 0 eee ees 14 2 Robot Support for Testing Java Applets and Applications 14 3 Supported Foundation Class Libraries 14 3 Making Java Applets and Applications Testable 14 4 Running the Java Enabler 0 0000 eee eee eee 14 5 Verifying That the Java Extension Is Loaded 14 7 Setting Up the Sample Java Applet 0 000 14 7 Installing the Sample Java Applet 0000 14 8 Installing the Swing Foundation Classes 14 8 Starting the Sample Java Applet 000 14 10 Testing Data in Java Components 000000005 14 10 Testing the Contents of a Java Panel 0 14 12 Support for Custom Java Components 002000 14 13 For More Information About Java Support 14 14 Supported Data Tests for Java Testing 00 14 14 Testing Properties of Java Components 2005 14 15 Enhancing Object Recognition of Java Components 14 17 15 Testing PowerBuilder Applications About Robot Support for PowerBuilder Applications 15 1 Verifying That the PowerBuilder Extension Is Loaded 15 2 Recording Actions on DataWindows 0000s eee ee 15 2 Parameters for a Mouse Click Action 15 3 Value B
95. yY E ou can edit the selected object and Label ObjectIndex Jey ee A lists its children ComboBox Label ComboListBox Lal ComboE ditBox La MaxButton Label Objectindex MinButton False ComboBox Label SystemMenu True ComboListBox Lal Visible True ComboE ditBox La x WindowState Normal K K E K K Bw K g r Show verification method Cancel Recapture Help Creating Datapools A datapool is a source of variable test data that scripts can draw from during playback If a script sends data to a server during playback consider using a datapool as the source of the data By accessing a datapool a script transaction that is executed multiple times during playback can send realistic data and even unique data to the server each time If you do not use a datapool the same data the exact data you recorded is sent each time the transaction is executed TestManager is shipped with many commonly used data types such as cities states names and telephone area codes In addition TestManager lets you create your own data types When creating a datapool you specify the kinds of data called data types that the script will send for example customer names addresses and unique order numbers or product names When you finish defining the datapool TestManager automatically generates the number of rows of data that you specify What Is Rational Robot The following figure shows a datapool being defined Note that m
96. you create to confirm the state of an object across builds of the application under test Verification Points and Data Files During recording a verification point captures object information based on the type of verification point and stores it in a baseline data file The information in this file becomes the baseline of the expected state of the object during subsequent builds 4 1 Creating Verification Points in GUI Scripts When you play back the script against a new build Rational Robot retrieves the information in the baseline file for each verification point and compares it to the state of the object in the new build If the captured object does not match the baseline Robot creates an actual data file The information in this file shows the actual state of the object in the build After playback the results of each verification point appear in the TestManager log Ifa verification point fails the baseline and actual data do not match you can select the verification point in the log and click View gt Verification Point to open the appropriate Comparator The Comparator displays the baseline and actual files so that you can compare them Verification Points and Scripts List of verification points associated ES Object Properties Result ListViewVP Geommaner with the script A verification point is stored in the project and is always associated with a script When you create a verification point its name
97. you edit the script You can insert a block however only during recording In other cases you may want to use blocks rather than timers Blocks not only add timers to a script but also add a prefix to each command ID in the block This prefix enables you to easily identify emulation commands associated with a block both in the script and in the report output For more information refer to the section in this chapter on blocks Adding a Timer During Recording You can add a timer to a script during recording follows 1 Ifthe Session Insert floating toolbar is not already displayed click the Display Session Insert Toolbar button on the Session Record floating toolbar Click the Start Timer button In the Start Timer dialog box type the timer s name 40 characters maximum and click OK Perform the timed activity Immediately after receiving the results generated by the activity click the Stop Timer button on the Session Insert floating toolbar 6 Inthe Stop Timer dialog box select the name of the timer you typed in step 3 and click OK When you start and stop a timer during recording you can view these commands in the Annotations window Adding a Timer During Editing The Session Insert toolbar adds timers during recording To add a timer during editing type the timer commands into the script Adding Features to Scripts Blocks The following are the timer commands for VU scripts gt start_time Starts tim
98. 0 0000000 7 6 Getting Feedback During and After Recording 7 8 The Session Recorder During Recording 7 9 Canceling Scripts During Recording 00004 7 10 Canceling a Script in a Single Script Session 7 10 Canceling the Current Script in a Multi Script Session 7 11 Canceling All Scripts in a Multi script Session 7 11 Choosing the Protocols to Include ina Script 7 11 Automatically Filtering Protocols 00000 7 12 Manually Filtering Protocols 0 0000005 7 12 Playing Back a Script Quickly 0 0 0 eee eee 7 16 Working with Sessions 00 0 0 cece eee eee eee 7 16 Splitting a Session into Multiple Scripts 7 17 Importing a Session nordre r ena EAEE Bs Dale ot Been ee 7 18 Exportine a Session ereer sich ie ae eae Shes 7 18 Regenerating Scripts from a Session 0 000 00 7 19 Viewing Session Properties 0 00 c eee eee 7 20 Coding a Script Manually 0 00 0 0000 0022s 7 21 Creating Library Files for VU Scripts 4 7 22 Defining Script Properties 0 0 c eee 7 22 How to Define Script Properties in Robot 7 22 Managing Scripts and Sessions 0000 cece eee eee 7 23 Finding the Session Associated with a Script 7 23 Removing a Script from a Session 0 000 0004 7 23 Re recording Sessions
99. 04 lt _____ gt Server1 30 L m Proxy 305 lt 4 Client2 30 Proxy 306 Other mappings on proxy Clients E E ee a Client3 30 client server pairs Client1 3010 NOTE The proxy can run on one of the client computers To have one computer serve as both the proxy and a client assign different port numbers to the proxy and client When choosing proxy recording you must gt gt gt Identify and define the client server pairs that communicate through the proxy Create a proxy server Specify network protocols to include in the script that Robot generates Setting the Recording Method To set up and use proxy recording 1 2 8 Start Robot on the proxy computer In the Proxy Administration dialog box match up the proxy computer and port with each server to be used in the test For details see Creating a Proxy Computer on page 6 10 In the Method Proxy tab of the Session Record Options dialog box match up each client with the server it will send requests to Be sure to specify the actual server and not the proxy computer For details see Identifying Client Server Pairs on page 6 11 Configure each client to send requests to the proxy computer not to the server For example if the client sends requests to an Oracle database use the Oracle client configuration software to specify the proxy computer s address and port number
100. 10 19 Working with Datapools 10 20 Continued Field or Column Description Script Data A value that was provided during recording The value was assigned to the script variable in Name If there is no value in this column for a particular script variable a length of 1 is assigned to the datapool column associated with the script variable This value can only be modified in the script Step 2 Defining Datapool Columns and Generating the Data To complete the creation of the datapool that you started in Step 1 Editing Datapool Configuration on page 10 14 define the datapool s columns and populate it with data You do so in the Datapool Specification dialog box NOTE If the Datapool Specification dialog box is not open see Step 1 Editing Datapool Configuration on page 10 14 to learn how to open it The Datapool Specification dialog box contains the Datapool Fields grid Each row in the grid represents a datapool field that is a column of data in the datapool file When the dialog box opens the grid lists a datapool column name and a default column definition for each script variable that is assigned the value INCLUDE or OVERRIDE in the Configure Datapool in Test Script dialog box You define and populate the datapool as follows 1 To insert one or more new columns into the datapool file a Click the row located either just before or just after the location where you want to insert the new datapool column Not
101. 15 Rational Robot User s Guide Working with the Data in Data Grids 00 2 0055 4 19 Selecting the Data to Test ina Data Grid 4 19 Testing Column Titles or Top Menus in a Data Grid 4 20 Editing Captured Data in a Data Grid 4 21 Changing a Column Width in a Data Grid 4 22 Transposing Columns and Rows in a Data Grid 4 23 Editing a Verification Point 0 0 0 cee eee eee 4 23 Viewing a Baseline File 0 0 0 0 0 0 00000008 4 24 Renaming a Verification Point 00 e eee eee 4 25 Copying a Verification Point 00 eee eee eee 4 26 Deleting a Verification Point 0 00 00008 4 27 Editing Compiling and Debugging Scripts Editing the Text ofa Script 2 0 0 0 0 0c eee 5 1 Adding a User Action to an Existing GUI Script 5 2 Adding a Feature to an Existing GUI Script 5 2 Working with Low Level Scripts 0000000004 5 3 Viewing Low Level Scripts 00 0 cece eee eee 5 4 Renaming a Low Level Script 00 0000000004 5 4 Copying a Low Level Script 0 000 0000s 5 5 Deleting a Low Level Script 0 0 e eee eee 5 6 Saving Scripts and SQABasic Files 0 0000000 e eee 5 7 Printing a Script or SQABasic File 0 00000000 ee 5 7 Compiling Scripts and SQABasic Library Source Files 5 7 Compi
102. 4 renaming data tests A 8 low level scripts 5 4 verification points 4 25 reports filtering with block names 8 5 requests cancelling recorded 7 10 monitoring during recording 7 8 recording 7 3 RequisitePro 1 13 re recording scripts 7 25 sessions 7 24 restoring Robot during recording 7 3 results of playback viewing 9 21 resuming recording of GUI scripts 2 19 rewinding the datapool cursor 10 16 Robot main window restoring during recording 2 18 Robot restoring during recording 7 3 row access order 10 4 10 17 rows in data grid transposing with columns 4 23 rows in datapools access order 10 4 10 17 maximum number 10 4 starting row number 10 18 running applications 6 38 GUI scripts 9 1 suites 7 16 S saving scripts and SQABasic files 5 7 sbh header files 3 16 sbl library files 3 14 Index sbx library runtime files 3 16 schedules synchronization points and 8 10 synchronizing items in 8 11 scope of a synchronization point 8 12 script command failures 9 9 script generation options 6 24 adding SQL return codes to scripts 6 18 changing 7 19 command ID prefix 6 16 datapool commands 6 15 display number of rows retrieved 6 17 display retrieved rows in scripts 6 17 playback pacing 6 20 think time vs CPU delays 6 21 script properties accessing from session properties 7 21 defining in Robot 2 23 7 22 status when re recording scripts 7 26 status when re recording sessions 7 24 7 25 scripts adding datapool
103. 6 Playing Back Scripts in Netscape Navigator 5 Select the element to test and then click OK The element s properties are displayed as follows Object Properties Verification Point ioj x Selected object HTMLDocument HTMLTitle Vision Office Products Home Page Objects Properties Bae Name Edit List H HTMLLink HTMLText alinkColor H HTMLImage Index 1 bgColor Hifffee H HTMLMap Name Fror charset iso 8859 1 H HTML Type HTMLMaz cookie H HTML Type HTMLMap defaultCharset iso 8859 1 HTML Type HTMLMap designMode Inherit H HTML Type HTMLMap domain aries web H HTMLLink Index 2 expando True H HTMLImage Index 2 fgColor 000000 Cancel Recapture Help I Show verification method 6 Click OK to insert the verification point Playing Back Scripts in Netscape Navigator With Robot you can now record scripts in both Internet Explorer and Netscape Navigator and play them back in either browser Netscape playback requires at minimum a 200 MHz Pentium with at least 64 MB of RAM If you are recording and or playing back on Netscape Navigator you must ensure that the cache is turned on for the server that is hosting the Web pages or applications you are testing It is also a good idea to make sure the cache is enabled on your browser It is enabled by default If caching is not enabled on the server record and playback do not work Refer to Enabling Cache for Netscape Recording and Playback on page 13 4 for
104. 7 27 Recording Sessions 7 28 gt gt gt CHAPTER 8 Adding Features to Scripts This chapter describes the features that you can add to a script while recording the session with Robot The chapter includes the following topics gt gt gt gt gt Timers Blocks Synchronization points Comments Using the Insert menu Toolbars for Adding Features Use the Session Insert toolbar to add features like timers blocks synchronization points and comments To access the Session Insert toolbar click Display Session Insert toolbar in the Session Record toolbar Click the Display Session Insert icon to display the Session Insert toolbar Start application Start stop block i Comment Synchronization point Start stop timer Adding Features to Scripts Timers Individual emulation commands such as sqlprepare and sqlexec are timed automatically By default these times are included in TestManager report output However if you want to measure the time it takes a virtual tester to perform an activity for example sending a query to the server and displaying the results insert a timer or a block in the script How Timers Work Think of a timer as a stopwatch that you use to begin a timed activity For example suppose you want to time how long it takes to submit a query to a database server and receive the results During recording you would 1 Start the timer click Inse
105. ATES In the generated script the http response emulation command shows the form as follows lt form name t lt input type hidden name Country value UNITED STATES gt r n TestManager determines that this is an item for correlation and adds an http_find_values function to your script This function puts the UNITED STATES value in a variable Your script also contains a line that looks like this string SgenRes 002 Setting Script Generation Options SgenRes_ 002 http find values Country HTTP_FORM DATA 1 if 0 lt UNITED STATES gt endif If you do not want UNITED STATES to be correlated choose Specific but do not select the Country name from the list You do not have to rerecord the script you can simply regenerate it from the session Providing the Name of an Oracle Database If you are using the network or proxy methods to record Oracle requests you must provide the name that the client application uses to connect to the Oracle database This name is in Oracle s tnsnames ora file You can later play back the script against another Oracle database by changing this name The following figure illustrates the Generator per Protocol tab when Oracle is selected as the protocol Session Record Options 6 31 Setting Recording Options 6 32 To provide this name Click Tools gt Session Record Options 2 Click the Generator per protocol tab 3 Select Oracle at the Proto
106. BC Manufacturing Inc 23 Broadway Acme Metal Working Corp 909 East Greenway Concord Al Woodworking Ltd 542 GreatAvenue Needham Barrymore Company 8431 Main Street New Xok ud and then displays the data in the Robot data grid The Definition of the All Data Test You cannot edit the All Data test because it is a built in test However you can view the test s definition for the MSFlexGrid by looking at the data test in the View Object Data Test dialog box A 3 Working with Data Tests The following figure shows the main information in the dialog box View Object Data Test 24 x Name of the data test Data test name All Data Internal class name of the control Object classification MSFlexGrid Cancel Retrieves the value of the Text property Property to test Trex z Test Help Axis parameters Collects data from the first column 0 to F T R the last column Cols 1 a pa Column 0 Cols 1 B Col gt M Row fo JRows 1 Pow z Collects data from the first row 0 to the last row Rows 1 Additional parameters T Initialize properties I Transform data into array T Data includes column headers I Transpose property Identifies the current cell to test in the grid using the Col and Row properties Description All Data capture of the MSFlexGrid Because the MSFlexGrid control is a zero based grid the numbering for columns and rows actu
107. Been syntax is invalid the incorrect eae _ area is highlighted here OF build D Available properties c Click OK to accept the a TS as p AllowBigSelection z expression If you did not verify rs aa te ing el eteers the expression Robot verifies it FI ate BonkColor now Click OK in the message BackColor Link E box If the syntax is invalid the 7 incorrect area is highlighted 10 In the Using box in the Create Edit Object Data Test dialog box type a property or select it from the list to further define the property that you are capturing and testing The Using box specifies what property Robot modifies to affect its iteration For example to iterate from row 0 to row Rows 1 Robot sets the Row property 11 Select the check boxes under Additional parameters as needed 12 In the Description box type a description that indicates what the data test does 13 Optionally click Test to do the following Verify the syntax of the data test before you save it Ifthe syntax is correct watch Robot perform the data test on the selected object When the test has ended Robot opens a dialog box with the captured data Click OK to close the dialog box 14 Click OK to save the test and automatically verify it If the syntax of the expression is incorrect the incorrect area is highlighted so you can correct it and then resave the test Working with Data Tests Copying Renaming or Deleting a Data Test You can copy any built in
108. Build Buia 1 Log Folder p efault Iteration Start Date Time 10 13 00 05 15 10 PM End Date Time Select a verification point in the l g and click View Verification Point bject Properties Comparator test1_Object Properties OF x File Edit View Help RIM gt WN aape Properties Name Baseline _ Actual E to analyze the EdiBoa Soecime Borderie None __ Resizeable results in a Caption Rdywrap txt Notepad Rdywrap tst Notepad Comparator Enabled True True MaxButton True True MinButton True True z rm gt z Differences Object window Caption Rdywrap txst Notepad Property BorderStyle Comparison failed NOTE You can also open a Comparator from Robot by double clicking a verification point in the Asset left pane of a Script window However when you open a Comparator this way you can view only the baseline file To compare the baseline and actual files you must open the Comparator through the log 9 23 Playing Back GUI Scripts 9 24 gt gt gt CHAPTER 10 Working with Datapools This chapter describes how to create and manage datapools It includes the following topics gt What isa datapool gt Planning and creating a datapool p gt Data types gt Using datapools with session scripts gt Using datapools with GUI scripts You should familiarize yourself with the concepts and procedures in this chapter before you begin to work with datapo
109. Control to your Visual Basic forms For information see Visual Basic support making Visual Basic 4 0 applications testable in the Robot Help Index Verifying That the Visual Basic Extension Is Loaded Verifying That the Visual Basic Extension Is Loaded To test Visual Basic applications first verify that the Robot Visual Basic extension is loaded in Robot To verify that the extension is loaded 1 wh 5 Start Robot Click Tools gt Extension Manager Verify that Visual Basic is selected If not select it To improve the performance of Robot clear the check boxes of all environments that you do not plan to test Exit Robot The next time you start Robot only the extensions for the selected environments are loaded 11 3 Testing Visual Basic Applications 11 4 CHAPTER 12 Testing Oracle Forms Applications This chapter describes how to test 32 bit Oracle Forms applications with Rational Robot It includes the following topics gt About Robot support for Oracle Forms applications gt Making Oracle Forms applications testable gt Recording actions and testing objects gt Testing an object s properties gt Testing an object s data About Robot Support for Oracle Forms Applications Rational Robot provides comprehensive support for testing 32 bit applications built with Oracle Forms 4 5 5 0 and 6 0 Robot supports the testing of applications that you migrate from one Oracle Forms ve
110. Data column No flag is added to DATAPOOL_ CONFIG with this option 10 17 Working with Datapools 10 18 Continued Field or Column Datapool Description Exits this dialog box to let you further define the datapool and shows the next row to be accessed in the row access order as follows gt Create or Edit Specification Lets you define datapool columns in a new or existing datapool and lets you populate the datapool with values gt Edit Existing Data Lets you edit values in an existing datapool gt Row Number Shows the datapool row to be accessed first in the next test run This box applies only to persistent cursors the Persistent box must be checked The row number is modifiable Valid row numbers are 1 through 2 147 483 647 commas are not allowed If you specify a number that is not in the datapool an error occurs at test runtime After you specify a starting row number click Set Cursor Any changes you make in the Datapool group box do not affect the DATAPOOL CONFIG section of the script Continued Field or Column Usage Using Datapools with Sessions Description Specifies one of the following directives to apply during database creation and during suite runtime To change an individual directive right click the directive name gt INCLUDE During datapool creation creates a column for the script variable in Name The column is assigned the same name During suite run
111. Description Rational Robot executable file scriptname Name of the script to run user userid User name for log on password password Optional password for log on Do not use this parameter if there is no password project full path and full projectname Name of the project that contains the script referenced in scriptname preceded by its full path play If this keyword is specified plays the script referenced in scriptname If not specified the script opens in the editor purify Used with play Plays back the script referenced in scriptname under Rational Purify quantify Used with play Plays back the script referenced in scriptname under Rational Quantify coverage Used with play Plays back the script referenced in scriptname under Rational PureCoverage build build Name of the build associated with the script B 1 B 2 Syntax Element Description logfolder foldername The name of the log folder where the test log is located The log folder is associated with the build log logname The name of the log nolog Does not log any output while playing back the script close Closes Robot after playing back the script COMMENTS Use a space between each keyword and between each variable Ifa variable contains spaces enclose the variable in quotation marks Specifying log information on the command line overrides log data specified in the Log tab of th
112. Different types of requests in the same session For example you can record Oracle SQL Server HTTP DCOM DBLIB Jolt ODBC Socket Sybase and TUXEDO requests in a session Session File Types Generated After Recording With API network and proxy recording Robot generates a session file Custom recording supports four session file types The type of file generated depends on how the custom recorder is configured The four file types are gt Session file wch the standard session file type generated after recording a session gt XML file xml any XML file type The output of the BEA WebLogic Recorder is XML gt Annotation files ids files that contain annotations comments start stop blocks timers synchronization points inserted during recording gt Extension files ext a custom format session file for any type of file Where Files Are Stored By default session files are stored in the TMS _Scripts directory of your current project datastore For example if the current project is MyProject the directory hierarchy might look like this c MyProject TestDatastore DefaultTestScriptDatastore TMS _ Scripts Session files the API calls or network IP packets Robot captures during recording are stored with a wch extension in the TMS Sessions directory For example if you named your session Tst c MyProject TestDatastore DefaultTestScriptDatastore TMS_Sessions Tst wch Session files produced fr
113. Edit the following dialog box would appear Edit Object Data Test Data test name Displayed Data Object classification MSFlexGrid Property to test Text zizal Cancel Test Help Axis parameters From To Using Vv Column 0 Cots 1 Col M Row fo Rows 1 Row z m Additional parameters I Initialize properties IV Data includes column headers I Transform data into array J Transpose property Description All Data capture of the MSFlexGrid For detailed information about an item click the question mark and then click the item 7 Selecta property from the Property to test list This property has the values you want to capture in the data test 8 Select the Column check box to add parameters for the vertical axis Select the Row check box to add parameters for the horizontal axis the right of each box to build the expression Type an expression in the From and To boxes or click the Expression button to An expression is a single value or property or a combination of values properties and operators Creating or Editing a Custom Data Test If you click the Expression button the Edit Expression dialog box appears Do the following if you clicked Expression Edit Expression b Click Verify to check the syntax of the expression Click OK in the message box If the Data test name All Data Axis Column Parameter To a Tye an
114. Editing a Custom Data Test 22205 A 5 Copying Renaming or Deleting a Data Test A 8 B Rational Robot Command Line Options Index xiii Rational Robot User s Guide xiv gt gt gt Preface Rational Robot is a complete set of tools for automating the testing of Microsoft Windows client server and Internet applications running under Windows NT 4 0 Windows XP Windows 2000 and Windows 98 This manual describes how to use Rational Robot to test the quality of your applications The manual explains how to plan tests develop automated scripts play back the scripts and analyze the results NOTE Screen captures in this manual may vary slightly from the way Robot appears on your machine Audience This manual is intended for application developers quality assurance managers and quality assurance engineers Other Resources gt This product contains online Help From the main toolbar choose an option from the Help menu gt All manuals are available online either in HTML or PDF format These manuals are on the Rational Solutions for Windows Online Documentation CD gt For information about training opportunities see the Rational University Web site http www rational com university Contacting Rational Technical Publications To send feedback about documentation for Rational products please send e mail to our technical publications department at techpubs rational com XV Pref
115. Es IV Show hidden T Invert object f OK Cancel L He 5 Select the object to test and click OK If the Select Object dialog box still appears click OK 6 Complete the verification point as usual NOTE Visual items within the full view are children of blocks If you select a visual item from the full view Robot tests its Oracle properties only If you select a visual item from the GUI view Robot tests both its Oracle properties and its standard properties For a description of the two views see Testing Objects on page 12 8 Testing an Object s Properties Object Scripting Commands You can manually add the Object Scripting commands to any script to access the properties of Oracle Forms objects For example you can use the SQAGet Property command to retrieve the value of a specified property For information about the Object Scripting commands see the SQABasic Language Reference The Object Scripting commands are especially useful for accessing the properties of LOV and record group objects which cannot easily be tested with the Object Properties verification point NOTE For instructions about testing LOVs and record groups with verification points see Testing LOVs and Record Groups on page 12 15 To reference an LOV or record group object in an Object Scripting command you need to know the name assigned to the object within your Oracle Forms application Once you know the object name you ca
116. GUI Insert toolbar gt Call Script 1 1x Name ftes Query AN Name EE _ ul test Select the filf y test2 E test3 E test4 script to call Select to run the called script when you click OK M Bun now Cancel Properties Help 3 Select a GUI script from the list 4 Do one of the following Select Run Now if the script being recorded depends on the state in which the called script leaves the application under test If this check box is selected Robot adds the script call to the recording script and immediately plays back the called script when you click OK Clear Run Now if the called script starts and ends at the same point in the application under test so that the script being recorded does not depend on the called script If this check box is cleared Robot adds the script call to the recording script but does not play back the called script when you click OK 5 Click OK to continue recording or editing You can also group your scripts into a shell script For information see Creating Shell Scripts to Play Back Scripts in Sequence on page 2 25 Inserting Verification Points A verification point is a point in a script that you create to confirm the state of an object across builds During recording the verification point captures object information and stores it as the baseline During playback the verification point recaptures the
117. GUI Scripts and the Robot Help To test a Java component s data 1 Start recording in Robot For details see Recording a New GUI Script on page 2 15 2 Open the Java applet or application that you want to test If you plan to play back the script under Rational Quantify or PureCoverage to test a Java application not an applet use the Start Java Application button on the GUI Insert toolbar For information about Quantify and PureCoverage see Setting Diagnostic Tools Options on page 9 11 For information about starting a Java application see Starting an Application on page 3 1 Navigate to the page that you want to test 4 Start creating the Object Data verification point For instructions see Object Data verification point in the Robot Help Index 14 10 Testing Data in Java Components 5 Assign a name wait state and expected result for the verification point and then click OK as described in Tasks Associated with Creating a Verification Point on page 4 6 In the Select Object dialog box drag the Object Finder tool over the page until the component you want to test appears in the TestTip as described in Selecting and Identifying the Object to Test on page 4 10 For example to test that a particular item in a ComboBox is selected drag the Object Finder tool over the page until ComboBox appears in the TestTip File Options Dialogs A Tiy lt Tree Grid and Buttons Text and Sliders
118. I Script on page 2 15 Type a script name or select a name from the list Click OK to display the GUI Record toolbar 13 3 Testing HTML Applications BS Click the Display GUI Insert Toolbar button on the GUI Record toolbar Click the Start Browser button on the GUI Insert toolbar Type or select from the list the URL of the HTML application that you plan to test The list includes the last five URLs accessed You can also click Browse to select a local file Type the name of a tag to uniquely identify this instance of the browser By using tags you can test multiple instances of the browser Click OK Robot starts the selected browser and navigates to the specified URL Continue recording in Robot as described in Recording a New GUI Script on page 2 15 NOTE If you start the browser outside of Robot without using the Start Browser command you must open the rbtstart htm page in your browser before loading the Web pages for testing The rbtstart htm page loads the Rational ActiveX Test Control which is required for HTML testing in Robot By default this file is located in C Program Files Rational Rational Test Enabling Cache for Netscape Recording and Playback 13 4 To record or playback on Netscape Navigator make sure that the cache is turned on for the server that is hosting the Web pages or applications you are testing If caching is not enabled on the server recording does not work Your server may refer to cac
119. Java ensure that the Java extension is loaded in Robot To verify that the Java extension is loaded 1 Start Robot 2 Click Tools gt Extension Manager 3 Verify that Java is selected If not select it 4 Toimprove the performance of Robot clear the check boxes of all environments that you do not plan to test 5 Exit Robot The next time you start Robot only the extensions for the selected environments are loaded Setting Up the Sample Java Applet After you complete the tasks in the proceeding section you can start testing your Java applets or stand alone applications or you can learn more about testing Java by installing the sample Java applet that Rational provides To use the sample applet you must perform the following tasks 1 Install the sample Java applet 2 Install Sun s Swing foundation classes Swing is a subset of JFC 3 Start the sample Java applet These tasks are described in the following sections 14 7 Testing Java Applets and Applications Installing the Sample Java Applet To install the sample Java applet 1 Click Start gt Programs gt Rational product name gt Rational Test gt Set Up Rational Test Samples Select Java Sample Click Next to complete the installation Installing the Swing Foundation Classes 14 8 The sample Java applet requires Sun s JFC 1 1 or Swing foundation classes version 1 1 or later You can download JFC Swing from www javasoft com products
120. Optionally uncheck Launch Delphi After Conversion if you don t want Delphi to be automatically started after the conversion If this is not checked you need to start Delphi manually after the conversion Click Convert The Enabler Optionally creates a backup file of the project Removes the line SQASrvr from your project file after the uses line Optionally starts Delphi Click the Close button in the Enabler If an information dialog pops up click Yes to reload the project In Delphi recompile your project Testing a Component s Properties Testing a Component s Properties You can use two methods to test the properties of a Delphi component Use either method to test all properties shown by the Delphi Object Inspector gt Object Properties verification point Use to test properties while recording or editing a script For information about testing properties see the Robot Help gt Object Scripting commands Use to test properties programmatically while editing a script For information about the Object Scripting commands see chapter 5 of the SQABasic Language Reference NOTE Before you can test a Delphi application run the Rational Test Delphi Enabler For instructions see Making Delphi Applications Testable on page 17 2 17 5 Testing Delphi Applications Testing a Component s Data 17 6 Use the Object Data verification point to test the data in Delphi components For ins
121. Other Rational Products Performance Testing with Rational TestManager Rational TestManager is a sophisticated tool for automating performance tests on client server systems A client server system includes client applications accessing a database or application server and browsers accessing a Web server Performance testing uses Rational Robot and Rational TestManager Use Robot to record client server conversations and store them in scripts Use TestManager to schedule and play back the scripts During playback TestManager can emulate hundreds even thousands of users placing heavy loads and stress on your database and Web servers Doing performance testing with TestManager you can Find out if your system under test performs adequately Monitor and analyze the response times that users actually experience under different usage scenarios gt Test the capacity performance and stability of your server under real world user loads gt Discover your server s break point and how to move beyond it For information about performance testing see the TestManager manual and Help Managing Requirements with Rational RequisitePro Rational RequisitePro is a requirements management tool that helps project teams control the development process RequisitePro organizes your requirements by linking Microsoft Word to a requirements repository and providing traceability and change management throughout the project lifecycle Using Requi
122. Purify using with Robot 3 3 9 11 Q Quantify using with Robot 3 3 9 11 R random datapool access 10 4 10 17 Rational Administrator 1 2 Rational project about 1 2 managing with Rational Administrator 1 2 selecting 1 14 Rational PureCoverage using with Robot 3 3 9 11 Rational Purify using with Robot 3 3 9 11 Rational Quantify using with Robot 3 3 9 11 Rational RequisitePro 1 13 Rational technical support 2 xvi Rational Test Authentication 6 42 Rational Test Enabler for Oracle Forms 12 2 rec library files 3 14 Index 10 recording GUI scripts 2 1 2 15 and unknown objects 2 7 2 20 creating modular scripts 2 3 ending 2 22 mapping object types and classes 2 13 pausing 2 19 process 2 1 recording options 2 5 restoring main window 2 18 resuming 2 19 selecting object order preference 2 9 workflow 2 2 recording methods API recording 6 5 network 6 6 proxy 6 7 setting 6 2 recording options 6 1 changing 7 19 filtering protocols 6 22 proxy 6 10 script generation 6 24 setting 6 1 6 9 setting recording method 6 2 recording scripts 7 3 cancelling 7 10 feedback 6 39 7 8 7 10 in a session 7 3 recording methods 6 2 values recorded 10 20 redirects in HTTP scripts 6 27 regenerating scripts from a session 7 19 Region Image verification point 4 5 regions of screen testing 4 5 regression testing phase 9 2 release times 8 8 8 12 ranges 8 12 Removing SQA Object Testing Library Delphi 17
123. Range The verification methods are Case Sensitive Verifies that the text captured during recording exactly matches the captured text during playback For example if you capture Inches during recording the test fails during playback if the captured text is inches or if the text contains any other characters Case Insensitive Verifies that the text captured during recording matches the captured text during playback in content but not necessarily in case For example if you capture Inches during recording the test passes during playback if the captured text is inches If the text contains any other characters the test fails Find Sub String Case Sensitive Verifies that the text captured during recording exactly matches a subset of the captured text during playback For example if you capture Inches during recording the test passes during playback if the captured text is Inches or Feet because Inches exists within the text The test fails if the captured text contains inches because the case is different Find Sub String Case Insensitive Verifies that the text captured during recording matches a subset of the captured text during playback in content but not necessarily in case For example if you capture Inches during recording the test passes during playback if the captured text is Inches or Feet because Inches exists within the text The test also passes if the captured text contains inches because the case does not ha
124. Rational Software Corporation Rational Robot USER S GUIDE VERSION 2002 05 00 PART NUMBER 800 025137 000 R a t 1 O n a I support rational com the software development company http www rational com IMPORTANT NOTICE COPYRIGHT Copyright 1998 2001 Rational Software Corporation All rights reserved Part Number 800 025137 000 Version Number 2002 05 00 PERMITTED USAGE THIS DOCUMENT CONTAINS PROPRIETARY INFORMATION WHICH IS THE PROPERTY OF RATIONAL SOFTWARE CORPORATION RATIONAL AND IS FURNISHED FOR THE SOLE PURPOSE OF THE OPERATION AND THE MAINTENANCE OF PRODUCTS OF RATIONAL NO PART OF THIS PUBLICATION IS TO BE USED FOR ANY OTHER PURPOSE AND IS NOT TO BE REPRODUCED COPIED ADAPTED DISCLOSED DISTRIBUTED TRANSMITTED STORED IN A RETRIEVAL SYSTEM OR TRANSLATED INTO ANY HUMAN OR COMPUTER LANGUAGE IN ANY FORM BY ANY MEANS IN WHOLE OR IN PART WITHOUT THE PRIOR EXPRESS WRITTEN CONSENT OF RATIONAL TRADEMARKS Rational Rational Software Corporation the Rational logo Rational the e development company ClearCase ClearQuest Object Testing Object Oriented Recording Objectory PerformanceStudio PureCoverage PureDDTS PureLink Purify Purify d Quantify Rational Apex Rational CRC Rational PerformanceArchitect Rational Rose Rational Suite Rational Summit Rational Unified Process Rational Visual Test Requisite RequisitePro SiteCheck SoDA TestFactory TestMate TestStudio and The Rational Watch a
125. TestManager releases the virtual testers allowing them to continue performing the transaction How Synchronization Points Work At the start of a test all virtual testers begin executing their assigned scripts They continue to run until they reach the synchronization point In a script a synchronization point is the command sync_point VU script or SQASyncPointWait SQABasic script In a suite a synchronization point is a time specified in the suite The following figure illustrates a synchronization point in a script 1 Virtual testers Virtual testers reach the running synchronization point simultaneously gt gt gt gt gt gt gt gt gt gt gt gt gt gt gt gt gt gt gt gt sync_point The virtual testers pause at the synchronization point until TestManager releases them Typically TestManager releases synchronized virtual testers when they all arrive at the synchronization point Synchronization Points Why Use Synchronization Points By synchronizing virtual testers to perform the same activity at the same time you can make that activity occur at some particular point of interest in your test for example when the application under test sends a query to the server Typically synchronization points that you insert into scripts are used in conjunction with timers to determine the effect of varying workload on the timed activity For example to determine workload on data
126. The command ID prefix format is slightly different for truncated prefixes that appear in single script sessions and multi script sessions For example if you define a command ID prefix of EmulCmdID Robot truncates the prefix as follows gt Truncation format for single script sessions sqlexec EmulCmd 024 select from table sqinrecv EmulCmd 025 ALL ROWS gt Truncation format for multi script sessions sqlexec EmulCmd 3 024 select from table sqinrecv EmulCmd 3 025 ALL ROWS The 3 after the tilde shows that the command is in the third script in the session Setting Script Generation Options Display Recorded Rows This option specifies whether you want some or all of the data retrieved from the server to be inserted into the script The inserted data is for informational purposes only Data is inserted in the form of comments and does not affect playback Select one of the following values from the Display recorded rows list Value Meaning All Insert all retrieved data into the script First Insert a specified number of bytes HTTP and socket protocols or rows other protocols from the beginning of the data retrieved from the server If you select First enter the number of bytes or rows to retrieve in the box that appears to the right of the Display recorded rows list Display recorded rows First z 100 Insert a specified number of rows from the end of the set of records retrieved fr
127. To cancel the requests you made since you began recording the current script click Ignore just recorded information This action affects only the current script not any previous scripts you recorded in this session For more information see Canceling Scripts During Recording on page 7 10 Click OK After you click the Stop Recording button to end the recording session type or select a name for the last script you recorded or accept the default name Repeat the previous steps as many times as needed to end one script and begin another Importing a Session You can import a session from a source file into your current project For example assume someone at another site e mails you a session file You can import this session file regenerate scripts and create a suite in TestManager To import a session file 1 Click Tools gt Import Session 2 Type in the source file path or click Browse to search for the file Click in the Automatically Generate Scripts Upon Import box to automatically generate a script after importing the source file This selection allows you to set session record options by clicking Options 4 Click OK After successful import the file is saved to your current project If you chose the Automatically Generate Scripts Upon Import option the script automatically generates Robot can import four session file types watch files wch XML files xml annotation files ids and extension files ext R
128. _tpacal1 involves a request only When tux_tpacall involves both a request and the reply request reply turnaround the prefix is tacaT This is used for asynchronous request timing only and is never assigned to an emulation command Assigning a Prefix to IIOP Command IDs and Including IORs in IIOP_bind If you are recording IIOP requests you can have Robot automatically assign an identifying prefix to IOP emulation command IDs You can also include the original IORs in iiop_bind commands The following figure illustrates the Generator per Protocol tab when IIOP is selected Session Record Options HE General Method Method Network Method Prow Method Custom Generator Cust Generator Generator Filtering Generator per Protocol Protocol furor I Use operation name to prefix emulation command IDs T Include original IORs in iiop_bind commands Cancel Help 6 33 Setting Recording Options 6 34 To assign an identifying prefix or to include the original IORs in iiop_bind commands 1 Click Tools gt Session Record Options Click the Generator per protocol tab Select IIOP at the Protocol section and then select one or more of the following Use operation name to prefix emulation command IDs Select this check box to have Robot automatically prefix the command IDs with the operation being invoked This applies to the iiop_ invoke command The prefix allows TestManager reports to be filtered by operat
129. a built in data test This section explains the All Data test for the MSFlexGrid control What the All Data Test Does When you create an Object Data verification point on the MSFlexGrid you can select the All Data test in the dialog box that appears as shown in the following figure A 2 An Example of a Data Test Object Data Tests 24 x Selected object Generic OC Name MSFlexGrid Data test All Data d Description All Data capture of the MSFlexGrid E id Cancel Recapture Help When you use this data test Robot captures the data from every cell in the MSFlexGrid control as shown in the following figures FlexGrid Control CustomerlD CustomerName Address City State __ ZipCode_ Telephone ABC Manufacturing Inc 23 Broadway Dayton OH 44234 216 888 123 Robot Jes th h 2 Acme Metal Working Corp 909 East Greenway Concord NH 09834 603 742 2934 OBOE CYCIESANTOUJNEVEry 3 Al Woodworking Ltd 542 Great Avenue Needham MA 02165 617 444 843 column and row in the 4 Barrymore Company 8431 Main Street NewYork NY 10015 212783 900C MSFlexGrid control to extract 5 Olympic Fabricators Inc 7483 West Way Miami FL 33676 407 483 4892 ihe v lues Fom eachtell rer a a r O E E E ee ae Object Data Verification Point iof x Selected object Generic OCX Name M5FlexGrid Data test All Data Verification method Case Sensitive Select the range to test Address A
130. ace Contacting Rational Technical Support If you have questions about installing using or maintaining this product contact Rational Technical Support as follows Your Location Telephone Facsimile E mail North America 800 433 5444 781 676 2460 support rational com toll free Lexington MA 408 863 4000 Cupertino CA Europe Middle 31 0 20 4546 200 31 0 20 4545 201 support europe rational com East Africa Netherlands Netherlands Asia Pacific 61 2 9419 0111 61 2 9419 0123 support apac rational com Australia Australia When you contact Rational Technical Support please be prepared to supply the following information gt gt Your name telephone number and company name Your computer s make and model Your operating system and version number Product release number and serial number Your case ID number if you are following up on a previously reported problem e gt Part Introducing Rational Robot gt gt gt CHAPTER 1 Introduction to Rational Robot This chapter introduces you to Rational Robot and its components It includes the following topics gt What is Rational Robot gt Using Robot with other Rational products gt Starting Robot and its components gt Tasks you can perform with Robot and its components What Is Rational Robot Rational Robot is a complete set of components for automating the testing of Microsoft Windows client serv
131. ackground Color Link Window E H DWText Name emp_id_tVisualT Background Mode 0 Opaque E H DWColumn Name emp_id Band detail E L DWComputedField Name emp_ BitmapName No Border 5 3D Lowered Color MB ARGB 0 0 0 Color Link Window Text ColT ype long Criteria Dialog No Criteria verride_Edit No Criteria Required No DDDW IMEMode 0 Expressions that are used against objects within the detail band of a DataWindow are reevaluated for every row When Robot returns the values of such properties they are based on the state of the current row of the DataWindow If you select a different row and recapture the properties you may get different values Testing DataStore Controls and Hidden DataWindows You can test the properties and data of PowerBuilder objects even though they are not visible in the application By selecting from a list of all objects on the Windows desktop you can test gt Nonvisual DataStore controls DataStore controls always appear as direct children of the Windows desktop gt Hidden DataWindows Visible property is False 15 5 Testing PowerBuilder Applications Object List olx Desktop Window Class tooltips_class32 Level 2 Window Class Shell_Traywnd Window Caption NetDDE Agent lV Show hidden Shows hidden Window Caption OleMainT hreadwndN ar T Invert object objects on the Window Name w_samples J desktop t Window Caption 0leMainT hreadw ndN ar The nonvisual DataStore
132. ad of the log after you play back the script For more information about the log options see Setting Log Options for Playback on page 9 5 Click OK or change other options You are now ready to play back the script Keep in mind that the script runs slower than usual because of the instrumentation or event monitoring added by these tools 9 15 Playing Back GUI Scripts Viewing the Playback Results After you play back the script the results appear in the log Edit View Reports Tools Window Help la xi asss jug i aerejgals 27 r 8a 2E d EventTye Rest DateTime Faiure Rea Computer Nama Computer Start 10 17 00 12 48 51 PM Build E Script Start PAC 10 17 00 12 48 51 PM Ban st CS S Application Start 10 17 00 12 48 52 PM Purify Starting Purify d Classics4 exe at 10 17 00 12 49 20 10 17 00 12 52 35 PM Penisi Purify Starting main 10 17 00 12 52 35 PM Defaut IPR Invalid pointer read in SetDIBits 1 occurrence 10 17 00 12 52 35 PM Iteration Purify E ABR Array bounds read in SetDIBits 1 occurrence 10 17 00 12 52 35 PM fcc Application Start 10 17 00 12 52 39 PM Purify Searching for all memory leaks 10 17 00 12 57 10 PM SERRE Purify W MLK Memory leak of 80 bytes from 1 block allocated in OpenDriver 10 17 00 12 57 10 PM 10 17700 12 48 51 PM Purify W MLK Memory leak of 6 bytes from 1 block allocated in DilCanUnlo 10 17 00 12 57 10 PM End Date Time Purify MPK Potential
133. add a wait state when creating a verification point 1 Start to create the verification point See Starting to Create a Verification Point on page 4 7 2 In the Verification Point Name dialog box select Apply wait state to verification point 3 Type values for the following options Retry every How often Robot retries the verification point during playback Robot retries until the verification point passes or until the time out limit is reached Timeout after The maximum amount of time that Robot waits for the verification point to pass before it times out If the time out limit is reached and the verification point has not passed Robot enters a failure in the log The script playback either continues or stops based on the setting in the Error Recovery tab of the GUI Playback Options dialog box Setting the Expected Result for a Verification Point When you create a verification point the expected result is usually that the verification point will pass For example if you create a Window Existence verification point you are usually expecting that the window will exist during playback If the window exists the verification point passes However suppose you want to test that a window does not exist during playback This is useful when you want a script to wait for a window to disappear before continuing In this example you could create a Window Existence verification point with the following values gt A timeout wa
134. age 13 3 Starting an Application 3 Fill in the dialog box and click OK For information about an item in the dialog box click the question mark in the upper right corner and then click the item 4 Continue recording or editing the script During playback Rational Robot starts the specified application when it reaches that command in the script NOTE Do not use the Windows desktop such as the Start button on the taskbar to start an application Starting Applications Under the Rational Diagnostic Tools When you play back a Robot script you can have any applications specified in the script start under the following Rational diagnostic tools Rational Purify Detects and diagnoses memory access errors and memory leaks Robot with playback under Purify works with Visual C C applications on Windows NT 4 0 and Windows 2000 Rational Quantify Profiles the time spent in each module function line and block of code and detects performance bottlenecks within an application Robot with playback under Quantify works with Visual C C Visual Basic and Java applications on Windows NT 4 0 and Windows 2000 Rational PureCoverage A code coverage analyzer that reports which modules functions and lines of code were and were not executed in any run or collection of runs Robot with playback under PureCoverage works with Visual C C Visual Basic and Java applications on Windows NT 4 0 and Windows 2000 For detailed in
135. ager TestManager Help you manage your testing efforts Test Visual Basic applications Robot Chapter 11 Testing Visual Basic Applications Test Oracle Forms applications Robot Chapter 12 Testing Oracle Forms Applications Test HTML applications Robot Chapter 13 Testing HTML Applications Introduction to Rational Robot To Use This See Component Test Java applications Robot Chapter 14 Testing Java Applets and Applications Test PowerBuilder applications Robot Chapter 15 Testing PowerBuilder Applications Test PeopleTools applications Robot Chapter 16 Testing PeopleTools Applications Test Delphi applications Robot Chapter 17 Testing Delphi Applications Create and run manual and TestManager TestManager Help external scripts Manage Internet and intranet SiteCheck Rational SiteCheck Help Web sites gt gt gt Part Il Developing and Playing Back GUI Scripts gt gt gt CHAPTER 2 Recording GUI Scripts This chapter describes the recording process and tells you how to record GUI scripts in Rational Robot It includes the following topics gt gt gt gt The recording process The recording workflow Before you begin recording Enabling IDE applications for testing Setting GUI recording options Using advanced features before recording Recording a new GUI script Defining script properties Coding a GUI script manually Testing your recorded script Creating shell scripts
136. ait value keeps the verification point from failing if the task is not completed immediately or if the data is not accessible right away For example suppose you create an Alphanumeric verification point that tests for a specific string in a text box When you play back the script Robot first looks for the text box The verification point fails immediately if the box does not exist If Robot finds the box it checks for the string in the box However the string might not be in the box yet your application might be running slowly and the box might not be updated yet To solve this include wait values so that Robot retries the test checks for the string every two seconds If the content of the box does not match the string within 30 seconds the verification point returns a failure indication to the script Tasks Associated with Creating a Verification Point For verification points that verify the properties or data of an object Robot must first find the specified object before it can perform the verification point After it finds the object the following happens p gt Ifno wait state is specified the verification point passes or fails immediately p gt Ifa wait state is specified then Robot does the following as shown in this pseudocode example loop until timeout period expires as specified by Timeout After wait for retry period as specified by Retry Every perform VP if it passes exit loop else loop back end loop To
137. ally begins with zero Therefore the From box contains 0 as the first column and row and the To box subtracts 1 from the total number of columns and rows Changing a Data Test Definition Suppose you want to test only the first three rows in the control instead of all the rows You could do this by making a copy of the All Data test and then editing the copy so that the rows range from 0 to 2 Axis parameters From Using To Column 0 Z Cols 1 3 co z M Row o gt 2 Row Collects data from row 0 to row 2 3 rows Address ABC Manufacturing Inc 23 Broadway Dayton Acme Metal Working Corp 909 East Greenway Concord First 3 rows of data Creating or Editing a Custom Data Test Creating or Editing a Custom Data Test Data tests must be created before you begin to test your application The tests that you create are stored in the repository that is currently active when you create the tests If you switch to a different repository the data tests are not available unless you recreate the data test in the new repository You can edit any custom data test If you change the parameters of an existing data test it affects the behavior of all verification points that depend on the data test To create or edit a custom data test 1 AWN 6 Display the object for which you want to create the data test In Robot click Tools gt Object Data Test Definition Click Select to open the Select Objec
138. amples from the Help into your own files The examples and the names you should assign the files are gt Example Script Assign any name to this script gt Example Header File Name the script tstHeader sbh gt Example Library Source File Name the script tstLibrary sbl Example Script Run this example with the example library and header files SInclude tstHeader sbh Option Explicit Sub Main Initially Recorded 01 17 00 18 12 16 Script Name testscript userInput InputBox Type a number Call compareNumbers userInput NMBR End Sub Example Library Source File Tstlibrary sbl Run this example with the example script and header files Be sure to compile the library source file to an sbx file before you run the script that calls the custom procedure defined in the library file Sub compareNumbers inputVal as Integer constVal as Variant Dim txt as String If inputVal gt constVal then txt You typed a number greater than ElseIf inputVal lt constVal then txt You typed a number less than Else txt The number you typed equals End If MsgBox txt constVal End Sub Customizing SQABasic Scripts Example Header File Tstheader sbh Run this example with the example script and library files Global userInput as Integer Global Const NMBR as Variant 10 Declare Sub compareNumbers BasicLib tstLibrary argl as Integer arg2 as Variant The Template File Robot provides a template
139. ange OF Hold down the SHIFT key while pressing one of the arrow keys Noncontiguous cells Make sure the captured values are deselected Then press the CTRL key and click each cell Clicking without the CTRL key cancels previous selections Entire column Click a column title Robot compares the data and the number of items in the column Entire row Click a row number Robot compares the data and the number of items in the row All cells Click the box in the upper left corner of the grid Testing Column Titles or Top Menus in a Data Grid 4 20 After you capture data using the Object Data Menu or Clipboard verification point you can select Move column titles to grid or Move top menus to grid in the Verification Point dialog box If you select this check box the titles move into the data grid and numbers replace the titles above the grid a 1 customername address a Column titles are moved 2 ABC Manufacturing Inc 23 Broadway Dayton into the grid for testing 3 Acme Metal Working Corp 909 East Greenway Concord Tala Woodworking Ltd 542 Great Avenue Needham 5 Barrymore Company 8431 Main Street New Xok m 4 Working with the Data in Data Grids Use Move column titles to grid or Move top menus to grid to gt Capture and test a title without its column data gt Test the title like any of the other data in the grid gt Edita title by moving it to the grid editing it and moving
140. apoolOpen defines the access method to use for the datapool Although differences in setting up datapool access in GUI scripts and session scripts occur you define a datapool for either type of script using TestManager in exactly the same way Here are the general tasks involved in providing access to a datapool from a GUI script The steps are not in a fixed order you can create the datapool at any point gt Record the GUI script gt Add datapool commands to the script p gt Create the datapool For information about recording a GUI script for datapool access and adding datapool commands to a GUI script see Chapter 5 of the SQABasic Language Reference For additional information and examples see the SQABasic Help under the index keyword datapools For information about creating a datapool with TestManager see the TestManager Help Using Datapools with GUI Scripts Accessing a Datapool from GUI and Session Scripts Ifa GUI script and a session script provide the same set of values to the client application during recording the scripts can access the same datapool during playback in a TestManager suite Here is the suggested order of steps for creating a datapool and setting up access to it from GUI scripts and session scripts 1 Record the procedure and create the datapool as described in Using Datapools with Sessions on page 10 13 2 Record the GUI script 3 Edit the GUI script and add datapool commands to it
141. appears in the Asset left pane of the Script window The verification point script command which always begins with Results appears in the Script right pane Fai testi Oy x Window SetTestContext Capti A Verification Points Verification point commands in the ES Object Propetties2 Window ResetTestContext RES Alph i script E ii prd Window SetTestContext Capti p BE dhea Daie Result ComboBoxVP CompareT ject Data Window ResetTestContext w psa f NOTE The following verification points are not stored in the project and do not appear in the Asset pane File Comparison File Existence Module Fxistence Window Existence and Alphanumeric if the verification method is Numeric Equivalence or Numeric Range Because verification points are assets of a script if you delete a script Robot also deletes all of its associated verification points You can easily copy verification points to other scripts if you want to reuse them For information see Copying a Verification Point on page 4 26 NOTE You cannot play back a verification point that you have copied or typed into a sbl library source file The verification point must be in a script or a rec library source file For information about types of library files see Library Source Files on page 3 14 Types of Verification Points Types of Verification Points The following table summarizes each Robot verification point NOTE F
142. appens When You Run the Enabler The Enabler adds the Rational Test Object Testing Library and three triggers to one or all fmb files in a directory as shown in the following figure and table ig Object Navigator Riel Triggers Find Er Forms EHE SAMPLEFORM p WHEN NEW FORM INSTANCE g Gifs Go E WHEN WINDOW RESIZED ii Contains sqa_evt_handler io WHEN MOUSE ENTER s_ Contains sqa_mouse_handler E PoST FORM Contains sqa_exit_handler Alerts Attached Libraries SGAOTEST res ____ Contains the Rational Test Blocks Object Testing Library H Canvyas Yiews 7 12 2 Making Oracle Forms Applications Testable As shown in the previous figure the triggers contain the following code Trigger Code WHEN WINDOW RESIZED sqa_evt_handler WHEN MOUSE ENTER sqa_mouse_handler POST FORM sqa_exit handler The Enabler handles the triggers and code as follows If the fmb File The Enabler Does not contain the trigger Adds a new trigger containing the code Contains the trigger Prepends the code to your existing trigger Contains a reference to the trigger Does not change the trigger in either the selected referencing fmb file or in the referenced fmb file Displays a message indicating that you should run the Enabler on the referenced fmb file NOTE If objects in your application contain the WHEN MOUSE ENTER trigger
143. application 6 Stop recording After recording Robot automatically generates scripts Setting the Recording Method A recording method defines the type of session recording The choices are gt API recording the default gt Network recording gt Proxy recording gt Custom recording Set the recording method from the Method tab in the Session Recording Options dialog box To access this tab 1 Click Tools gt Session Record Options 2 Click the Method tab and select the type of recording you want to perform Setting the Recording Method The following figure illustrates the Method tab Session Record Options 24 x Generator Custom Generator Generator Filtering Generator per Protocol General Method Method Network Method Prowy Method Custam API Recorder C Network recorder Proxy recorder C Use Custom Recorder z Script Generator 7 Cancel Help After you select a recording method Robot disables tabs that do not apply to that method This is because access to certain tabs is not relevant to the selected recording method and generator filtering protocol For example if you select Network recording the Generator Custom Method Proxy and Method Custom tabs are disabled because they do not apply In general select API recording However the following table lists certain situations in which a recording method is required or recommended Situation API Network Prox
144. application drag the Object Finder tool over the object and release the mouse button When you drag the Object Finder tool the Select Object dialog box disappears When you release the mouse button the Select Object dialog box reappears if you have cleared the Automatically close dialog box after object selection check box As you move the Object Finder tool over an object the object type appears in a yellow TestTip For information about how to identify the object to test see the next section Identifying the Object to Test Creating Verification Points in GUI Scripts 4 12 5 To select a visible or hidden object from a list of all objects on the Windows desktop click Browse to open the Object List dialog box Select the object from the list and click OK Object List Bl x Double click i Class Shell_Tray Shows hidden objects to expand Window Class tooltips_cl on the desktop the object Window Caption NetDDE I Show hidden Window Class tooltips_cly 7 invert objec As you select an object Double click Window Caption T ip of t inverts the object s colors to collapse Generic Class Static An the object Label Text When usi dk in the application CheckBox Text Sho PushButt Text Ne gt E EE E Returns the selection Cancel Help method to the Object Finder tool The Object List dialog box includes hidden objects that you cannot point to because they are not visible through the user int
145. ased Recording 0 0 0 eee eens 15 3 Testing an Expression Value of a DataWindow Property 15 4 Testing DataStore Controls and Hidden DataWindows 15 5 Capturing Data in a DropDownDataWindow ListBox 15 6 Testing the Value of a DataWindow Computed Field 15 7 16 Testing PeopleTools Applications About Robot Support for PeopleTools Applications 16 1 Verifying That the PeopleTools Extension Is Loaded 16 2 Testing a Component s Properties s 00 0 e eee eee eee 16 2 Testing a Component s Data 0 2 eee eee eee 16 3 PeopleTools Commands 0 00 cece cece eee ene 16 3 Contents 17 Testing Delphi Applications About Rational Robot Support for Delphi 17 1 Making Delphi Applications Testable 00 17 2 Installing the Rational Object Testing Library and Enabler 17 2 Running the Rational Test Delphi Enabler 17 2 Testing a Component s Properties 0000 ee eee ee 17 5 Testing a Component s Data 00 00 cece eee 17 6 Part VI Appendixes A Working with Data Tests About Data Pests s 343 43 inh 358 eth ee odie fee ea oe os A 1 An Example of a Data Test 0 eee eee eee A 2 What the All Data Test Does n n nananana cee A 2 The Definition of the All Data Test 00 A 3 Changing a Data Test Definition 00 A 4 Creating or
146. asic scripts see the SyncPoint method in Rational Test Script Services for Visual Basic For information on inserting synchronization points in SQABasic scripts see the SQASyncPointWait command in SQABasic Language Reference Inserting a Synchronization Point into a Suite When you insert a synchronization point into a suite you can do more than simply assign a synchronization point name to a script For example gt You can specify whether you want the virtual testers to be released at the same time or at different times If the virtual testers are to be released at different times that is in a staggered fashion you can specify the minimum and maximum times within which all virtual testers must be released gt You can specify a time out period Adding Features to Scripts For more information about inserting a synchronization point into a suite see Using Rational TestManager Release Times and Time outs for Synchronization Points in Test Scripts You cannot define minimum and maximum release times or time out periods for synchronization points that you insert into scripts as you can for synchronization points that you insert into suites By default gt Virtual testers held at a script based synchronization point are released simultaneously gt There is no time limit to how long virtual testers can be held at the synchronization point However if a synchronization point in a suite has a release time range and time
147. assigned No standard data type contains these exact values To ensure that the variable is assigned a valid value from the datapool 1 Before you create the datapool create a data type named Colors that contains the five supported values Red Green Blue Yellow Brown 2 When you create the datapool assign the Colors data type to the datapool column COLOR The COLOR column supplies values to the script s color variable When you need to generate data that contains multi byte characters such as are used in some foreign language character sets For more information see the section Generating Multi Byte Characters on page 10 13 Before you create a datapool find out which standard data types you can use as sources of data and which user defined data types you need to create Although it is possible to create a data type while you are creating the datapool itself the process of creating a datapool is smoother if you create the user defined data types first Finding Out What Data Types You Need 10 10 To decide whether to assign a standard data type or a user defined data type to each datapool column know the kinds of values that are supplied to script variables during playback for example will a variable contain names dates order numbers and so on Here are two ways you can find the kind of values that are supplied to a variable gt With session scripts you can view the DATAPOOL_CONFIG section that Robot aut
148. ating Proxies That Have Been Removed 6 48 If a proxy is removed any client server pairs that communicated through that proxy can no longer do so To use these client server pairs in proxy recording again you must first re create the proxy You re create a proxy by reassociating it with the server When you click the Method Proxy tab of the Session Record Options dialog box any client server pairs that are no longer associated with a proxy are displayed in the Delete Pairs Without Proxies dialog box You can p gt Click OK to delete all of the client server pairs gt Click Cancel to re create one or more proxies To re create a proxy 1 Click Proxy Admin in the Method Proxy tab 2 In Proxy Port specify the proxy computer s port number Note that Robot has already detected and specified the proxy computer s name 3 You can specify any available port number avoid the well known port numbers those below 1024 If you specify a port number that is unavailable Robot prompts you for a new port number 4 In the Server Port list select the server to be reassociated with the proxy 5 Click Create Proxy The proxy that you just created appears in the Existing Proxies list gt gt gt CHAPTER 7 Recording Sessions This chapter describes how to record sessions and generate scripts The chapter includes the following topics gt Recording a session gt Recording a single script in a session gt Getting
149. ation Point on page 4 9 4 Select and identify the object to test Selecting and Identifying the Object to Test on page 4 10 5 Select a verification method Selecting a Verification Method on page 4 14 Tasks Associated with Creating a Verification Point Task See 6 Select an identification method Selecting an Identification Method on page 4 15 7 Select the data or properties to test Selecting the Data to Test in a Data Grid on page 4 19 8 Test column titles or menus optional Testing Column Titles or Top Menus in a Data Grid on page 4 20 9 Edit the captured data optional Editing Captured Data in a Data Grid on page 4 21 Starting to Create a Verification Point The following is the basic procedure for starting to create a verification point o0 1 Do one of the following Ifrecording click the Display GUI Insert Toolbar button on the GUI Record toolbar Ifediting position the pointer in the script and click the Display GUI Insert Toolbar button on the Standard toolbar 2 Click a verification point button on the GUI Insert toolbar E wa E Ater g A jo joh E LY om OS 4 S4R 4 D 3 53 7372 a 4 o o of Ce oO amp S 40 5 3 oe D YW 27 O42 0 SS 5 3 Cm Bs aoa amp R 6 OQ Z To G gt 3 Q R NOTE To insert a File Comparison File Existence or Module Existence verification point open the Robot window click the Open Robot Win
150. ational Purify Quantify and PureCoverage to collect diagnostic information about an application during playback of a Robot script After playback Robot can integrate the diagnostic tool s results into the Robot log so that you can view all of the playback results in one place You can choose to show any combination of errors warnings and informational messages Then double click a result in the log to open the script in Robot and the appropriate file in the diagnostic tool 9 11 Playing Back GUI Scripts 9 12 About Purify and Robot Robot with playback under Purify works with Visual C C applications on Windows NT 4 0 and Windows 2000 Purify detects and diagnoses memory access errors and memory leaks Without Purify the visible symptoms crashes malfunctions or incorrect results of these kinds of errors often do not show up until long after the erroneous code was executed and in a short test often not at all Purify detects and pinpoints the cause of the error as the code is executed Where applicable Purify adds significant value to Robot because it finds many otherwise hidden defects in the application code About Quantify and Robot Robot with playback under Quantify works with Visual C C Visual Basic and Java applications on Windows NT 4 0 and Windows 2000 Quantify profiles the time spent in each module function line and block of code and detects performance bottlenecks within an application Once
151. ations Testing Properties of HTML Elements 13 12 Another way to test your Web pages is to use the Object Properties verification point Properties describe an HTML element s characteristics such as its appearance state behavior and data The Rational Object Testing technology inspects and verifies all properties of the HTML elements in your application including hidden properties that cannot be tested manually For example you can create an Object Properties verification point to capture and compare the modification date of a page or to determine whether a check box or a radio button is selected The Object Properties verification point provides you with information about more than 20 properties for each HTML element Some properties provide you with the same information as a data test For example a radio button s Value property provides you with the same information as a Contents data test For more information about the Object Properties verification point see the Robot Help To test an HTML element s properties 1 Start recording in Robot as described in Enabling HTML Testing in Robot on page 13 3 Navigate to the Web page that contains the element to test Click the Object Properties Verification Point button on the GUI Insert toolbar 4 Assign a name wait state and expected result for the verification point and then click OK as described in Tasks Associated with Creating a Verification Point on page 4
152. ations testable 12 2 Rational Test Enabler 12 2 recording actions 12 7 testing base table blocks and items 12 14 testing data 12 14 testing LOVs 12 15 testing objects 12 8 testing properties 12 10 testing record groups 12 15 verifying that extension is loaded 12 7 ord files for object order preferences 2 13 P partial responses in HTTP scripts 6 27 passwords modifying in Robot 6 43 modifying in TestManager 6 42 supplying 6 41 7 5 7 6 pausing recording of GUI scripts 2 19 PeopleTools support 16 1 commands 16 3 testing data 16 3 testing properties 16 2 verifying that extension is loaded 16 2 performance tests recording scripts for 7 3 persistent datapool cursors 10 3 10 16 starting row number 10 18 planning datapools 10 5 session recording 6 1 playing back GUI scripts 9 1 9 19 acknowledging results 9 5 delays between commands 9 7 delays between keystrokes 9 7 detecting GPFs 9 17 error recovery options 9 9 in debugging mode 5 10 log options 9 5 playback options 9 4 Trap options 9 17 under PureCoverage 3 3 9 11 under Purify 3 3 9 11 under Quantify 3 3 9 11 unexpected active window options 9 10 wait state options 9 7 playing back scripts verifying SQL return codes 6 18 playing back VU scripts pacing 6 20 PlayJrnl command for low level recording 2 22 populating datapools in Robot 10 21 10 23 PowerBuilder support 15 1 DataStore controls 15 5 DataWindows 15 2 15 4 15 5 15 7 DropDownDataWindows ListBoxes 15 6
153. ayback lt r When you create the verification point you specify the drive directory and file name for the required file During playback Robot checks to see if the file exists in the specified location 4 3 Creating Verification Points in GUI Scripts Continued Verification Point Type Example Menu Captures and compares the menu title menu items Manage Filters shortcut keys and the state of selected menus Robot Rational Test Robot records information about the top menu and up to five Rational ClearQuest TestManager Load es levels of submenus Robot treats menu items as objects Options eee within a menu and tests their content state and accelerator Aaa keys regardless of the menu item s location You can also j Report Layout Editor use the Object Data verification point to test a menu Module Existence Verifies whether a specified module is loaded into a gt O specified context process or is loaded anywhere in memory Each process has its own context which includes a set of loaded modules When you create this verification point you select the name of the module You can also select the name of a context process in which case the verification point tests whether the module is loaded into that process If no context is specified the verification point tests whether the module is loaded anywhere in memory Object Data J Customer Name Address City Cap
154. bot near the line that was executing when the error was reported gt The appropriate file in the diagnostic tool so that you can view the details If you double click the summary line and if there are multiple files involved in the summary then all of the files open This happens if the script plays back more than one application under that tool Setting GUI Playback Options Setting the Trap Options to Detect GPFs Robot uses the Trap utility to detect the occurrence of General Protection Faults GPF and the location of offending function calls during playback If a GPF is detected Robot updates a log file that provides information about the state of the Windows session that was running Important Notes gt To use the Trap utility you must include Common Object File Format COFF information in your application when you link For instructions see the documentation for your development environment gt Trap Visual C and Dr Watson from Microsoft WinSpector from Borland and Crash Analyzer from Symantec use the same Windows system calls to trap faults You cannot use more than one error trapping program at the same time Uses for Trap The occurrence of a GPF usually results in a crash of the running application and may also result in a loss of data Using Trap you can gt Capture information about GPFs gt Write the state of your environment to a log file when a GPF is detected gt Specify the type of
155. bottlenecks are identified you can focus on the inefficient parts of the code and substitute alternative implementations or algorithms to improve performance By using a Robot script to drive the application in conjunction with Quantify you ensure that a repeatable test is measured for each iteration of performance improvement This minimizes the risk of comparing different things when contrasting a run before and after a possible performance enhancing code change About PureCoverage and Robot Robot with playback under PureCoverage works with Visual C C Visual Basic and Java applications on Windows NT 4 0 and Windows 2000 PureCoverage is a code coverage analyzer that reports which modules functions and lines of code were and were not executed in any run or collection of runs Using PureCoverage to monitor a script reveals how comprehensively that script exercises the application under test and can provide helpful information about which code paths are taken under particular scenarios Setting GUI Playback Options How the Diagnostic Tools Work with Robot For Visual C C and Visual Basic applications these diagnostic tools work best when the applications have been compiled with debug information in other words when a pdb file is available These tools use the Rational Object Code Insertion OCI technology to insert instrumentation probes into the executable program for the application before it runs When you select a diagnost
156. bout the contents of this file see low level recording in the Robot Help Index Renaming a Low Level Script When you record a low level script it is stored in the project You can rename the low level script if needed Renaming a low level script involves two tasks gt Renaming the low level script in the Asset pane which renames it in the project gt Renaming all references to that low level script in the script fii Notepad Test olx Verification Points Initially Recorded amp EB Object Data Script Name Notepad ES Object Properties Result WindowVP Cor Efm Low Level Scripts WindowVP Cor If you rename the PlayJrnl 001 you also ipt i d to rename low level script in nee the Asset pane End Sub references to it of in the script Working with Low Level Scripts When you rename a low level script in the Asset pane Robot does not automatically rename references to it in the script If you play back a script that refers to a low level script with a name that is not in the Asset pane and therefore is not in the project the script fails To rename a low level script 1 Gia 7 ON 6 Right click the low level script name in the Asset left pane and click Rename Type the new name and press ENTER Click the top of the script in the Script right pane Click Edit gt Replace Type the old name in the Find what box Type the new name in the Replace with box
157. box recording resumes and you can continue working with the application under test You can also pause recording manually For example if you need to check your e mail you can pause recording so that the mouse clicks and keystrokes are not recorded as part of the script To pause recording click the Pause button on the GUI Record toolbar Robot indicates a paused state by gt Depressing the Pause button gt Displaying Recording Suspended in the status bar gt Displaying a check mark next to the Record gt Pause command To resume recording click Pause again Always resume recording with the application under test in the same state that it was in when you paused 2 19 Recording GUI Scripts Defining Unknown Objects During Recording 2 20 As explained in Controlling How Robot Responds to Unknown Objects on page 2 7 Robot recognizes all standard Windows GUI objects and many custom objects You can also set a recording option so Robot automatically associates unrecognized objects with the Generic object type If you have not set this option Robot displays the Define Object dialog box if you click an object that Robot does not recognize Use this dialog box to map the object to a known object type To define an unknown object while recording 1 From the Type list in the Define Object dialog box select an object type to associate with the unknown object Define Object x Robot does not recognize the object
158. cement requests defect reports and documentation modifications With Robot and ClearQuest you can gt Submit defects directly from the TestManager log or SiteCheck gt Modify and track defects and change requests gt Analyze project progress by running queries charts and reports For information about using ClearQuest see its manuals and Help Collecting Diagnostic Information During Playback Use the Rational diagnostic tools to perform runtime error checking profile application performance and analyze code coverage during playback of a Robot script gt Rational Purify is a comprehensive C C runtime error checking tool that automatically pinpoints runtime errors and memory leaks in all components of an application including third party libraries ensuring that code is reliable gt Rational Quantify is an advanced performance profiler that provides application performance analysis enabling developers to quickly find prioritize and eliminate performance bottlenecks within an application gt Rational PureCoverage is a customizable code coverage analysis tool that provides detailed application analysis and ensures that all code has been exercised preventing untested code from reaching the end user For information about playing back scripts under these products see Setting Diagnostic Tools Options on page 9 11 For information about using the diagnostic tools see their manuals and Help Using Robot with
159. cessing delays For example an actual user might pause to think before selecting a student name from an SQL database This delay is recorded as user think time Once the user clicks the student name the time spent generating the SQL command and accessing the database is a CPU delay Typical thresholds range from 0 through 10 000 ms 10 seconds Valid thresholds range from 0 through 2 000 000 000 ms just over 23 days If you clear the CPU User Threshold ms check box all delays are considered think time delays Think Maximum ms Specifies the maximum think time delay to allow in a script If you specify a maximum think time delay no think time delay in the script exceeds the one you specify This feature could be useful when a script recording session is interrupted You can type a maximum think time or select one from the list The valid range is 0 through 2 000 000 000 ms just over 23 days If you clear the Think maximum ms check box there is no limit to the length of a think time delay 6 2 Setting Recording Options Script Generation Setting Filtering Options 6 22 When you record a session the session might include requests associated with a variety of protocols for example Oracle SQL Server and HTTP After recording you can generate scripts that include requests for all of the recorded protocols or just some of them Typically you filter protocols with network and proxy recording because you record
160. ciated with the object Object Data Tests Fix Selected object ject ep L Textltem Name CUSTOMER CUSTOMERNA Data test e pt Current Record bd Current Record Displayed Records Customer List Customer ID iz Name SEE Manufactur Address poke CK Lo Cancel Recapture Help En z Predefined ntire Table x e curent record for the selected block data tests Use the Object Data Test Definition to define additional data tests For information see Appendix A Working with Data Tests Testing an Object s Data Testing LOVs and Record Groups Use the Object Data verification point to test the data in list of values LOV and record group objects in Oracle Forms You can also use the Object Scripting commands For information see Object Scripting Commands on page 12 13 To test an LOV or record group you need to perform two steps 1 Create an sqa text file containing information about the LOV or record group 2 Create the Object Data verification point NOTE Once you create the sqa file you can also test the properties of LOVs and record groups using the Object Properties verification point Creating an SQA Text File Before you test an LOV or record group create an sqa text file 1 Before creating the verification point identify which LOV or record group objects to test including The Form containing the LOV or record group The internal O
161. cognition method order for each standard object type lt Default gt and C Recognition Order When you record an action on an object Robot tries each method within the selected preference in sequence until it finds one that uniquely identifies the object You can redefine the order in which Robot tries recognition methods for each object type This order has an effect on both the readability and stability of script commands For example when you read script files it is easier to locate a command on a specific object if that command uses the object name or label for identification However if the object name or label is likely to change between builds another recognition method may provide more stability You should evaluate your own development and testing environment before you change the default order of object recognition methods Important Notes gt Changes to the recognition method order affect scripts that are recorded after the change They do not affect the playback of scripts that have already been recorded gt Changes to the recognition method order are stored in the project For example if you change the order for the CheckBox object the new order is stored in the project and affects all users of that project gt Changes to the order for an object affect only the currently selected preference For example if you change the order for the CheckBox object in the lt Default gt preference the order is not changed in t
162. col section 4 Enter the name that the client application uses in the Database name box Assigning a Prefix to TUXEDO Command IDs Ifyou are recording TUXEDO requests you can have Robot automatically assign an identifying prefix to TUXEDO emulation command IDs The prefix allows TestManager reports to be filtered by emulation command type The prefix that you set here overrides the Command ID prefix in the Generator tab For example if you select the Use command type to prefix emulation commands check box the third tux_tpcal1l1 emulation command in the script has the following command ID tux_tpcall tcal003 Robot assigns the following command ID prefixes for particular TUXEDO commands Command Prefix Command Prefix tux bq tog tux tpinit tini tux_tpabort tabo tux tpnotify tnot tux_tpacall tux_tppost tpos tux_tpbroadcast tux _tprecv trec tux_tpcall tcal tux_tpresume tres tux tpcommit tux tpsend tsen tux_tpconnect tux tpsubscribe tsub tux_tpdequeue tdeq tux _tpsuspend tsus tux_tpdisconnect tux_tpterm tter tux_tpenqueue tux tpunsubscribe tuns tacaR applies when tux_tpacal1 involves a request only When tux_tpacall involves both a request and the reply request reply turnaround the prefix is tacaT This is used for asynchronous request timing only and is never assigned to an emulation command Setting Script Generation Options Command Prefix Command Prefix tux_tpgetrply tacaR applies when tux
163. cording options 2 5 recording workflow 2 2 resuming recording 2 19 shell scripts 2 25 test environment 2 3 testing 2 24 viewing results of playback 9 21 See also scripts GUI scripts and datapools 10 24 associating variable names and datapool columns 10 19 datapool access shared with VU scripts 10 25 H header files 3 14 3 16 help desk 2 xvi hidden object selecting 4 12 hot keys restoring Robot window during recording 2 18 turning low level recording on and off 2 21 hotline support 2 xvi Index 6 HTML support testing applications 13 1 testing data in elements 13 5 13 7 HTTP scripts cached responses 6 27 dynamic data correlation 6 29 keep alives 6 27 partial responses 6 27 redirects 6 27 icon for Session Recorder 6 39 7 10 IDE applications enabling for testing 2 4 HTML 13 1 Java 14 1 Oracle Forms 12 1 PeopleTools 16 1 PowerBuilder 15 1 Visual Basic 11 1 identification methods for verification points 4 15 identifying objects to test 4 13 IIOP assigning prefix to emulation commands 6 33 including original IORs in iiop_bind 6 34 iiop_bind emulation command 6 34 images testing 4 5 IME 10 11 10 13 importing sessions 7 18 including datapool columns 10 19 Input Method Editor 10 11 10 13 inserting features in GUI scripts 3 1 inserting columns in a datapool 10 20 10 22 Installing SQA Object Testing Library Enabler for Delphi 17 2 interface card selecting for network recording 6 7 invalid o
164. cs Orders Wrap at end of file Cursor Yes C No check box is not checked no other flag is used Playback Behavior 1 Datapool i Access Order Use Script Data Edit Specification Shared Sequential C Always Persistent it Existing Data T Persistent F Random Obey Usage Petera C Private jow Number 7 Shuffle A Set Curso INCLUDE INCLUDE INCLUDE INCLUDE INCLUDE INCLUDE INCLUDE INCLUDE INCLUDE OVERRIDE INCLUDE INCLUDE INCLUDE INCLUDE INCLUDE E CLUDE These tables match row for EXCLUDE xV010 string Order Initiated T row and column for column E Name Type Script Data File Edit View Record Debug Insert Tools Window Help Default Project Rational Robot Classics Orders CUSTID string 329781 E See PRODUCTS_COMPOSER string Bach l C E a EE wee M PRODUCTS_COMPOSER_4 string Schubert PRODUCTS_COMPOSER_3 sting Mozart C ME PRODUCTS_COMPOSER_2 a cea 7 PRODUCTS_COMPOSER_1 sting Beethoven Il DATAPOOL_CONFIG Classics Orders DP_SHUFFLE DP_SHARED DP_WRAP WAM string 32099 xv001_1 string 84 W002 sir 2 INCLUDE CUSTID string 329781 O03 25APR 1998 INCLUDE PRODUCTS_COMPOSER string Bach v0 MasterCard INCLUDE PRODUCTS_COMPOSER_4 string Schubert 7005 1234567890000 INCLUDE PRODUCTS_COMPOSER_3 string Mozart a006 sting 112200 INCLUDE PRODUCTS_COMPOSER_2 string Hayd
165. d Sele lected lt in al Cancel Recaptue Help 6 Click OK to open the Object Data Verification Point dialog box If you typed incorrect information in the sqa file a message appears in the data grid in the dialog box 7 Complete the verification point as usual Capturing Data in LOVs and Record Groups To capture the data in any LOV or record group select the object from the Object List 1 Display the form containing the LOV or record group 2 Ifthe form contains an LOV make sure that the LOV is closed You can capture the data in an LOV or record group only when the LOV is closed Start creating an Object Data verification point In the Select Object dialog box click Browse to open the Object List dialog box Expand the Window Name OracleRootWindow branch by double clicking the plus sign 12 17 Testing Oracle Forms Applications 12 18 6 Expand the Form branch by double clicking the plus sign LOVs and record groups are children of the form If the LOV or record group objects do not appear in the Object List check that the sqa file has been created in the same directory as the form s executable file and contains the correct information For details see Creating an SQA Text File on page 12 15 7 Select the object to test and click OK to open the Object Data Verification Point dialog box If you typed incorrect information in the sqa file a message appears in the data
166. d DWComputedField within a DataWindow The Value property contains the current result of the expression assigned to the computed field You can also test the Expression property which contains the expression used to calculate the value of the computed field Expression used to calculate the value Current result of the expression Object Properties Verification Point Selected object D WComputedField Name cf_order_value Properties Name vaus Expression priceperunit or Height 77 Moveable False Type Compute Value 210 I Show verification method Cancel Recapture Help Total Order Value 210 00 DWComputedField 15 7 Testing PowerBuilder Applications 15 8 gt gt gt CHAPTER 16 Testing PeopleTools Applications This chapter describes the support that Rational Robot provides for testing PeopleTools applications It includes the following topics gt gt gt gt gt About Robot support for PeopleTools applications Verifying that the PeopleTools extension is loaded Testing a component s properties Testing a component s data PeopleTools commands About Robot Support for PeopleTools Applications Rational Robot provides comprehensive support for testing applications built with PeopleTools versions 6 0 through 7 5 With its Object Testing technology Robot examines data and properties that are not visible to the user Robot uses Object Oriented Rec
167. d if you gt Exit Robot but do not exit Windows gt Log off our NT session but do not exit Windows Monitoring Proxy Activities 6 46 You can view information about existing proxies in the Existing Properties grid of the Proxy Administration dialog box The grid has the following columns Column in Grid Proxy Port Server Port Connections State Meaning The name and port number of the proxy computer The name and port number of the server computer Client requests to the server are routed through the proxy The current number of connections to the server The state of the proxy ACTIVE The proxy is available for recording RECORD The proxy is recording CLOSE_WAIT A request has been issued to delete the proxy The proxy is deleted as soon as it is no longer in use If the proxy is in use new connect requests are accepted CLOSE_WAIT_NOCONN A request has been issued to delete the proxy The proxy is deleted as soon as it is no longer in use If the proxy is in use new connect requests are not accepted Click Refresh to update the information in the grid Managing Proxies Deleting Client Server Pairs You should remove client server pairs that are listed in the Method Proxy tab but are not involved in the session that you want to record To do so 1 e wWhr 5 Click Tools gt Session Record Options Click the Method tab and make sure that Proxy recording is selected Click the Me
168. data and properties that are not visible to the user Robot uses Object Oriented Recording to recognize a Delphi component by its internal name NOTE Robot supports the testing of applications built with Delphi 3 0 4 0 and 5 0 for Windows NT Windows 2000 and Windows 98 Use Robot to test Delphi and third party components including gt gt gt Visual Component Library VCL components Win 32 controls ActiveX controls Data aware components Nonvisual components Internet enabled controls Visual inheritance forms 17 1 Testing Delphi Applications Making Delphi Applications Testable Before you can test your Delphi applications you must install the Rational Object Testing Library for Delphi and the Rational Test Delphi Enabler Then run the Enabler which adds one line of code SQASrvr to your project and then recompile your project in Delphi to make it Robot testable NOTE You may freely distribute the Rational Object Testing Library for Delphi and the Enabler The SQAOBTST directory on the CD ROM contains a setup wizard for these and other items You may copy this directory to a network drive or to a diskette for distribution to your developers Installing the Rational Object Testing Library and Enabler Be sure to install Delphi 3 0 4 0 or 5 0 for Windows NT Windows 2000 or Windows 98 before you install the Object Testing Library for Delphi and the Enabler To install the Library and Enabler 1 I
169. delays think time 6 21 creating datapools in Robot 10 13 user defined data types 10 11 csv datapool files 10 3 cursors 10 3 persistent 10 16 private vs shared 10 16 starting row number 10 18 wrapping 10 16 custom data tests A 1 custom object classes 2 13 custom recording 6 11 using BEA WebLogic 6 12 customer support 2 xvi D data correlation 6 29 data grids definition 4 15 working with 4 19 data tests A 1 copying A 8 creating A 5 deleting A 8 example A 2 expressions A 6 renaming A 8 data types creating 10 11 determining which data types you need 10 10 role of 10 9 standard and user defined 10 9 data testing in objects 4 4 DATAPOOL_CONFIG editing 10 14 role of 10 14 Index datapools 10 5 access order 10 4 10 17 accessing from GUI scripts and sessions 10 25 adding commands to sessions 10 13 Authentication Datapool 6 41 creating in Robot 10 13 cursors 10 3 data types 10 9 editing column definitions in Robot 10 22 editing values in Robot 10 23 files 10 3 finding data types for 10 10 generating data in Robot 10 21 10 23 limits 10 4 maximum number of columns 10 4 10 13 10 21 naming 10 16 persistent cursors 10 16 planning 10 5 populating with values in Robot 10 21 10 23 private user access to 10 16 role of 10 1 10 4 row access order 10 4 10 17 script generation option 6 15 shared user access to 10 16 starting row number 10 18 where stored 10 3 DataWindow Contents data t
170. ding To use the custom recording method after a custom recorder adapter has been installed 1 Click Tools gt Session Record Options 2 Click the Method tab and then click Use Custom 3 Inthe Recorder list select a custom recorder 4 In the Script Generator list select a custom script generator For more information refer to the Session Recording and Script Generation Extensibility Reference Custom Recording for the BEA WebLogic Environment 6 12 If Robot is installed on a computer where a BEA WebLogic Server is also installed custom adapters developed by Rational Software display in the Recorder and Script Generator lists These adapters named WebLogic EJB Enterprise Java Beans record XML session files and generate Java test scripts that can be edited with a Java IDE and played back from Rational TestManager The WebLogic EJB recorder performs server side recording It supports WebLogic Server version 6 0 or later running on either a Windows NT or 2000 platform Although client EJBs can be installed on any computer Robot and the WebLogic Server must reside on the same computer Choosing Custom Recording for the BEA WebLogic Environment To use the custom recording method for the BEA WebLogic environment 1 Make sure the computer on which you are recording with Robot also has BEA WebLogic Server installed Click Tools gt Session Record Options Click the Method tab and click Use Custom In the Recorder li
171. ding a GUI script GUI Script Recording Workflow Set up test environment Perform user actions Set recording options Create verification points End recording Start recording Before You Begin Recording You should plan to use Robot at the earliest stages of the application development and testing process If any Windows GUI objects such as menus and dialog boxes exist within the initial builds of your application you can use Robot to record the corresponding verification points Before You Begin Recording Consider the following guidelines before you begin recording gt Establish predictable start and end states for your scripts gt Set up your test environment gt Create modular scripts gt Create Shared Projects with UNC These guidelines are described in more detail in the following sections Establishing Predictable Start and End States for Scripts By starting and ending the recording at a common point scripts can be played back in any order with no script being dependent on where another script ends For example you can start and end each script at the Windows desktop or at the main window of the application under test Setting Up Your Test Environment Any windows that are open active or displayed when you begin recording should be open active or displayed when you stop recording This applies to all applications including Windows Explorer e mail and
172. ditions and acceptance criteria gt Implement Test The activity of implementing your tests is primarily creating reusable scripts In TestManager you can implement your tests by creating manual scripts You can also implement automated tests by using Rational Robot You can extend TestManager through APIs so that you can access your own implementation tools from TestManager Because of this extensibility you can implement your tests by building scripts in whatever tools are appropriate in your situation and organization gt Execute Tests The activity of executing your tests is primarily running your scripts to make sure that the system functions correctly In TestManager you can run any of the following 1 an individual script which runs a single implementation 2 one or more test cases which run the implementations of the test cases 3 a suite which runs test cases and their implementations across multiple computers and users gt Evaluate Tests The activity of evaluating tests is determining the quality of the system under test In TestManager you can evaluate tests by examining the results of test execution in the test log and by running various reports Planning and managing tests is only one part of Rational TestManager You also use TestManager to view the logs created by Robot For information on using the log see Analyzing Results in the Log and Comparators on page 1 7 TestManager is also used for performance test
173. dow button on the GUI Record toolbar Click Insert gt Verification Point and the appropriate menu command 4 7 Creating Verification Points in GUI Scripts 3 In the Verification Point Name dialog box edit the name as appropriate The name can be a maximum of 20 characters Verification Point Name 27 x Name UTERE Robot inserts the verification point type and adds a number if there is more than one of the T Apply wait state to verification point same type in the script Retry every F seconds Timeout after jpo econds r Expected result Pass C Fail Wait state Cancel Help 4 Optionally set the Wait state options For information see the next section Setting a Wait State for a Verification Point 5 Optionally set the Expected result option For information see Setting the Expected Result for a Verification Point on page 4 9 6 Click OK The steps that you perform next depend on the type of verification point that you are creating For a list of verification points see Types of Verification Points on page 4 3 For detailed information about each verification point and how to create it see the Robot Help Setting a Wait State for a Verification Point When you create a verification point you can add specific wait values to handle time dependent test activities Wait values are useful when the application requires an unknown amount of time to complete a task Using a w
174. e lacking API recording is not functioning Recommended Alternate properly FDDI ATM or other high speed Recommended networks are used Setting the Recording Method API Recording With API recording Robot records API calls between the specific client application and the server Recording occurs on the client rather than on the wire as with network and proxy recording Therefore choose API recording if you are accessing secure data from a Web server because API recording captures the information before it reaches the wire and is encrypted API recording is supported only on Windows NT Windows 2000 and Windows XP clients You do not have to specify the network names or IP addresses of the client and server as you do with network and proxy recording With the API recording method you must start recording before starting the client application at which point Robot prompts you for the name of the client With the other recording methods you can start recording before or after you start the client Choosing API Recording To use the API recording method 1 Click Tools gt Session Record Options 2 Click the Method tab and then click API recorder API Recording Using API Recorder Adapters Robot s extensible framework provides for API recording using API recorder adapters that you install and configure An API recorder adapter is the interface between Robot s extensible framework and a recording component that ca
175. e it is unable to understand method signatures the number of parameters and their data types and ignores method call activity on these interfaces Setting Script Generation Options The type library is always embedded within an object module for VB or Java applications For C applications it may be a stand alone tlb file After DCOM recording if script generation completes with a no scriptable protocol is found error the first troubleshooting method is locating and identifying the presence of the type library Similarly if you receive a warning in the Generating Scripts status window concerning Robot s inability to locate the typelib locate and deploy the type library Assigning a Prefix to DCOM Command IDs If you are recording DCOM requests you can have Robot automatically assign an identifying prefix to DCOM emulation command IDs Emulation command IDs consist of a prefix and a three digit numeric suffix Robot automatically increments the numeric suffix by a value of 1 which allows each command to be uniquely identified The following figure illustrates the Generator per Protocol tab when DCOM is selected Session Record Options 2 x General Method Method Network Method Proxy Method Custom Generator Custom Generator Generator Filtering Generator per Protocol Protocol pcom z Event Label C User Generated o SCRIPTNAMEnri Method Class Class Method Library Class Method a E D D N
176. e GUI Playback Options dialog box If you intend to run Robot unattended in batch mode be sure to specify the following options to get past the Rational Login dialog box user userid password password project full path and full projectname Also when running Robot unattended in batch mode you specify the following options log logname build build logfolder foldername EXAMPLE rtrobo exe VBMenus user admin project C Sample Files Projects Default rsp play logfolder Default log MyLog close In this example the user admin opens the script VBMenus which is in the project file Default rsp located in the directory c Sample Files Projects The script is opened for playback and it is closed when playback ends The results are recorded in the log MyLog located in the Default directory Index gt gt gt A access order of datapool rows 10 4 10 17 starting row number 10 18 acknowledging results for GUI script playback 9 5 adding features to GUI scripts 3 1 Adding SQA Object Testing Library Delphi 17 3 Administrator 1 2 alphanumeric values testing 4 3 Alphanumeric verification point 4 3 animation mode for debugging 5 13 API recording 6 2 6 5 API Recorder Adapters 6 5 monitoring feedback during 7 9 starting applications 6 38 applets Java 14 3 applications Java 14 3 starting 3 1 applications starting when recording 6 38 Apply a User Defined DLL test function verification
177. e Setting GUI Recording Options on page 2 5 4 Click the Record GUI Script button on the toolbar to open the Record GUI GUI dialog box Type a name or select a script from the list Select a query to filter the list of scripts Record GUI Test Modify a query Name Show names of scripts Show details of scripts Lists scripts based on the selected query Cancel Options Properties Help Change recording options zi Set properties for scripts 2 15 Recording GUI Scripts 2 16 Type a name 40 characters maximum or select a script from the list The listed scripts have already been recorded in Robot or generated in TestFactory To change the list select a query from the Query list The query lets you narrow down the displayed list which is useful in projects with hundreds of scripts You create queries in TestManager and you modify queries in TestManager or Robot If a prefix has been defined for script autonaming Robot displays the prefix in the Name box To edit this name either type in the Name box or click Options change the prefix in the Prefix box and click OK For more information see Naming Scripts Automatically on page 2 6 To change the recording options click Options When finished click OK If you selected a previously recorded script you can change the properties by clicking Properties When finished click OK To change the properties
178. e are no license restrictions on them Therefore leave them in the application when you distribute it In this case you must distribute the Rational Test Object Testing Library with your application You may freely distribute the Object Testing Library for Oracle Forms and the Enabler The Rational Test Enablers directory on the CD ROM contains a Setup wizard for these and other items You may copy this directory to a network drive or to a diskette for distribution to your developers NOTE If you choose to remove the Object Testing Library and triggers from your application follow the procedure in Running the Enabler on page 12 3 In step 3 click Remove Rational Test Object Testing Library Recording Actions and Testing Objects Verifying That the Oracle Forms Extension Is Loaded To test Oracle Forms applications first verify that the Robot Oracle Forms extension is loaded in Robot To verify that the extension is loaded 1 Start Robot 2 Click Tools gt Extension Manager 3 Verify that Oracle Forms is selected If not select it 4 To improve the performance of Robot clear the check boxes of all environments that you do not plan to test 5 Exit Robot The next time you start Robot only the extensions for the selected environments are loaded Recording Actions and Testing Objects An Oracle Forms application is made up of visual and nonvisual objects p gt Visual objects are GUI objects that you can see in the
179. e environments that are currently installed For information see Chapter 14 Testing Java Applets and Applications Setting GUI Recording Options gt C C To test the properties and data of ActiveX controls in your applications install the Rational ActiveX Test Control This is a small nonintrusive custom control that acts as a gateway between Robot and your application It has no impact on the behavior or performance of your application and is not visible at runtime Manually add the ActiveX Test Control to each OLE container Window in your application For instructions see the documentation that comes with your C C development environment gt Visual Basic 4 0 Install the Rational Test Enabler for Visual Basic Attach the Enabler to Visual Basic as an add in Have the Enabler add the Rational ActiveX Test Control to every form in the application This is a small nonintrusive custom control that acts as a gateway between Robot and your application For information see Visual Basic support making Visual Basic applications testable in the Robot Help Index gt Delphi Install the Rational Object Testing Library for Delphi and the Rational Test Delphi Enabler Run the Enabler and then recompile your project to make it Delphi testable For information see Chapter 17 Testing Delphi Applications You can install the Enablers and the ActiveX Test Control from the Rational Software Setup wizard For instructions see the Rationa
180. e following Select Define unknown objects as type Generic to have Robot automatically associate unknown objects encountered while recording with the Generic object type Setting GUI Recording Options Clear Define unknown objects as type Generic to have Robot suspend recording and open the Define Object dialog box if it encounters an unknown object during recording Use this dialog box to associate the object with an object type 3 Click OK or change other options You can also map object types and classes before you start recording For information see Mapping Object Types and Classes Before Recording on page 2 13 NOTE The custom mapping from class name to object type is stored in the project and is shared among all users of the project Selecting an Object Order Preference Robot uses a variety of object recognition methods to uniquely identify objects in the application under test that are acted on during recording sessions For example Robot can identify a check box in the application under test by its object name associated label or text string index value or ID value These recognition methods are saved as arguments in script commands so that Robot can correctly identify the same objects during playback Robot has two predefined preferences for the recognition method order for each standard object type While recording an action on an object Robot tries each method within the selected preference in s
181. e name of the low level script to match the name in the Asset pane Deleting a Low Level Script If you no longer need a low level script you can delete it Deleting a low level script involves two tasks gt Deleting the low level script name in the Asset pane left pane which deletes the low level script from the project gt Deleting the low level script command from the script When you delete a low level script in the Asset pane Robot does not automatically delete references to it from the script If you play back a script that refers to a deleted low level script the script fails To delete a low level script 1 Right click the low level script name in the Asset left pane and click Delete Click the top of the script in the Script right pane Click Edit gt Find Type the name of the deleted low level script in the Find what box Click Find Next Delete the entire line which starts with PlayJrn1 AU O oP oN Repeat steps 5 and 6 until you have deleted all references Saving Scripts and SQABasic Files Saving Scripts and SQABasic Files Robot saves a script after you define it or record it You can also save any open script or SQABasic file manually To save open scripts or SQABasic files do one of the following To Save The active script or file Do This Click File gt Save The active script or file with a new name Click File gt Save As Type the new name and click OK All ope
182. e of 4 4 monitoring proxies 6 46 mouse movements tracking during recording 2 21 multi byte characters 10 10 10 11 10 13 Index 7 Using Rational Robot N naming scripts 6 37 sessions 6 37 naming scripts when recording 2 6 nesting blocks in scripts 8 6 Netscape Navigator enabling cache for recording 13 4 playing back scripts in 13 13 Netscape Navigator recording 13 4 network interface card selecting for network recording 6 7 network recording 6 2 6 6 defining a client or server computer for 6 40 filtering protocols 6 22 identifying the client and server 6 6 selecting a network interface card 6 7 starting applications 6 38 Numeric Equivalence verification method 4 14 Numeric Range verification method 4 15 numeric values testing 4 3 O object data tests A 1 Object Data verification point 4 4 A 1 Object Finder tool 4 11 object mapping 2 13 object order preference creating 2 13 selecting 2 9 Object Properties verification point 4 4 object recognition methods creating new order preference 2 13 customizing the order 2 11 HTML 2 10 in HTML 13 18 Index 8 selecting order preference 2 9 Object Testing Library Delphi 17 2 object types and classes mapping 2 13 Object Oriented Recording 2 21 objects identifying the object to test 4 13 selecting the object to test 4 10 unknown 2 7 2 20 A 5 Oracle client name required 6 31 login information 6 43 proxy recording and 6 10 Oracle Forms support 12 1 making applic
183. e script 6 15 Setting Recording Options 6 16 Command ID Prefix This option specifies an optional prefix for emulation command IDs Emulation commands include commands for emulating database clients as well as commands for performing communication and timing functions An emulation command ID appears in brackets after the command name It uniquely identifies the emulation command in TestManager reports Emulation command IDs consist of a prefix and a three digit numeric suffix For example if you specify task as the command ID prefix you might see the following emulation command name and ID sqinrecv task001 1355 Robot automatically increments the numeric suffix by a value of 1 with each emulation command The maximum length of the command ID prefix is seven characters If you do not specify a prefix Robot uses the script name as the prefix up to seven characters You cannot use this option to define multiple command ID prefixes in a recording session If you want your script to contain multiple command ID prefixes use blocks to define these prefixes With TUXEDO commands any prefix that you define in Command ID prefix is ignored if you specify a predefined TUXEDO emulation command ID prefix For more information see Assigning a Prefix to TUXEDO Command IDs on page 6 32 Truncating a Command ID Prefix Robot uses a tilde to indicate that a command ID prefix that exceeds seven characters has been truncated
184. e that the order in which datapool column names are listed in Name determines the order in which values are stored in a datapool record An arrow appears next to the name of the datapool row you clicked b Click either Insert before or Insert after depending on where you want to insert the datapool column c Type a name for the new datapool column 40 characters maximum Make sure there is a script variable of the same name listed in the Configure Datapool in Test Script dialog box The case of the names must match Using Datapools with Sessions 2 For each datapool column in the grid assign a data type to the column and modify the default property values for the column as appropriate For information about the data types and other properties you can define for a datapool column see Rational TestManager User s Guide To see an example of datapool columns defined in the Datapool Specification dialog box see Rational TestManager User s Guide 3 When finished defining datapool columns type a number in the No of records to generate field Ifa different row has to be retrieved with each fetch make sure the datapool has at least as many rows as the number of users at runtime 4 Click Generate Data You cannot generate data for a datapool that has more than 150 columns Alternatively if you do not want to generate any data now click Save to save your datapool column definitions and then click Close 5 Optionally
185. eating User Defined Data Types bel Bs If none of the standard data types can provide the correct kind of values to a script variable create a user defined data type To create a user defined data type in TestManager 1 Click Tools gt Manage Data Types Click New Type a name for the data type 40 characters maximum and optionally a description 255 characters maximum Click OK Click Yes when prompted to enter data values now The Edit Data Type dialog box appears This dialog box supports Input Method Editor IME modes for typing multi byte characters Type in a data type value on the first blank line in the list When you start typing the value a pencil icon appears indicating editing mode To type a new value place the insertion point on the blank line next to the asterisk icon and then type the value Repeat steps 6 and 7 until you have added all the values Click Save 10 11 Working with Datapools The following figure shows the data type colors being populated with five values Edit Data Type Colors HEI Enter data values for this user defined data type below Click OK when you are finished to save Slide this bar the results in the Repository Line currently being edited up or down to fee change row heht A ype new value here Cancel Help When you create a user defined data type it is listed in the Type column of the Datapool Specification dialog box where you define datap
186. ecording Stop recording and try to find the cause of the problem Optionally insert features such as blocks and timers through the Session Insert floating toolbar or through the Robot Insert menu When you finish recording transactions close the client application With API recording when you close the client Robot asks whether you want to stop recording If so click Yes and either name the session or click to ignore the recorded information in the Generating Scripts dialog box Click the Stop Recording button on the Session Record floating toolbar NOTE Ifa problem exists with the recording and nothing is captured Robot displays a Session Recording Error box To optimize all of Robot s recording features and to expand your test capabilities you can split sessions into multiple scripts For information about splitting a recording session into multiple scripts see Splitting a Session into Multiple Scripts on page 7 17 Recording a Single Script in a Session Stop Recording and Generating Scripts To stop recording and generate scripts 1 2 Click the Stop Recording button on the Session Record floating toolbar In the Name of the just recorded script box type or select a name for the script that you just finished recording or accept the default name Alternatively to cancel the requests you made since you began recording click Ignore just recorded information For more information see Canceling Scripts During Rec
187. ecution Continues playback of the script Skip current script Terminates playback of the current script If the script with the failure was called from another script playback resumes with the command following the Call Script command Abort playback Terminates playback of the current script If the script with the failure was called from another script the calling script also terminates 4 Click OK or change other options Failures are stored in the log Setting Unexpected Active Window Options 9 10 An unexpected active window is any unplanned window that appears during script playback and prevents the expected window from being made active for example an error message from the network or application under test These windows can interrupt playback and cause false failures To set options to specify how Robot responds to unexpected active windows 1 Open the GUI Playback Options dialog box See Setting GUI Playback Options on page 9 4 Click the Unexpected Active Window tab Wait State Unexpected Active Window IV Capture screen image Playback response Send ESCAPE key Select pushbutton with focus C Send WM_CLOSE to window m On failure to remove unexpected window Continue running script Skip current script Abort playback Setting GUI Playback Options 3 To have Robot detect unexpected active windows and capture the scre
188. ed playback however do the following before you play back a shell script 1 Click Tools gt GUI Playback Options 2 Inthe Playback tab clear the Acknowledge results check box This prevents a pass fail result message box from appearing for each verification point You can still view the results in the log after playback 3 Set the other options in the tabs as appropriate For information see Setting GUI Playback Options on page 9 4 4 Click OK When you play back the shell script the results from all scripts are stored in the same log which simplifies results analysis gt gt gt CHAPTER 3 Adding Features to GUI Scripts This chapter describes the features that you can add to GUI scripts It includes the following topics gt gt gt gt Starting an application Inserting a call to another script Inserting verification points Inserting timers Inserting comments Inserting log messages Inserting delay values Using the Insert menu Customizing SQABasic scripts Starting an Application While recording or editing a GUI script you can start applications or other executable programs by using one of the Start buttons on the GUI Insert toolbar or one of the Start commands on the Insert menu Start Java Application Start Application Start Browser GUI Insert n gt SSS wa E O El es St jo jo h E Ly om OS 3 1 Adding Features to GUI Scripts Verification Point gt Delay
189. ee Restoring the Test Environment Before Playback on page 9 3 2 Setyour playback options You can also set these options after you start playback For instructions see Setting GUI Playback Options on page 9 4 3 Click the Playback Script button on the toolbar Type a name or select a script from the list Select a query to filter gt Playback the list of scripts Name Modify a query Show names of scripts Query Show details of scripts fa Cancel GUI Options _Eropetties Help Change GUI playback options Change the properties of the selected script 9 19 Playing Back GUI Scripts 9 20 4 Type a name or select it from the list To change the list select a query from the Query list To change the playback options click GUI Options When finished click OK Click OK to continue If the Specify Log Information dialog box appears fill in the dialog box and click OK This dialog box appears if you selected Specify log information at playback in the Log tab of the GUI Playback Options dialog box Specify Log Information a Select a build Build 7 or create a new build fuai 7 Log Folder b Select a log folder Defaut 4 or create a new log folder Log ftes _ p c Accept the default log name or type a new name Cancel Help For information about builds log folders and logs see the TestManager Help 8 Ifaprompt appears asking if
190. ements to be inserted into the script During playback TestManager checks whether the return code for SQL statements executed during playback matches the return code for the same statement executed during recording If the SQL statement returns a different code during playback the Test Log window notes the discrepancy The Verify playback return codes check box has the following meanings State of Check Box Meaning The check box is selected Report SQL return codes for each SQL statement executed in the script The check box is cleared Do not insert any SQL return codes into the script A single SQL statement can return multiple error codes Example of the Verify Playback Check Boxes Suppose you want the script to execute the following SQL statement INSERT INTO mytable VALUES valuel value2 Setting Script Generation Options Depending on your Verify playback row counts and Verify playback return codes selections Robot generates the SQL statement in one of the following ways Check Box Selected Neither Verify playback return codes Verify playback row counts Both VU Command and Meaning sqlexec x001 INSERT INTO mytable VALUES valuel value2 During recording Robot does not report the data it collects from the execution of the SQL statement During playback TestManager assumes that any nonzero return code is an error It pays no attention to the number of affected rows sqlexec
191. en Test Script dialog box 2 Click the script you are defining properties for 3 Click Properties 4 Define the script s properties and then click OK For information about the properties that you can define see the Editing Test Scripts section of the Rational TestManager User s Guide Managing Scripts and Sessions Managing Scripts and Sessions This section describes the following script and session management activities gt gt gt gt gt gt gt Finding the scripts contained in a session Finding the session name associated with a script Removing a script from a session Re recording sessions Re recording scripts Copying scripts Deleting scripts and sessions Finding the Session Associated with a Script A script can be associated with only one session To see the name of this session 1 PF WN 5 In Robot click File gt Open gt Test Script Click the name of the script whose associated session you want to view Click Properties Click General View the session name in Referenced Session Ascript might not be associated with a session For example a script might have been removed from its session as described in the next section Removing a Script from a Session If you remove a script from a session you can no longer regenerate that script if you regenerate the session To remove a script from a session 1 Ore Oe RS In Robot click File gt Open gt
192. en click Yes The session s contained scripts and their properties are deleted 4 Continue re recording the session assigning any names you like to the scripts that you are recording 7 24 Managing Scripts and Sessions Keeping the Original Scripts To re record a session and create new scripts while keeping the original scripts and their properties intact 1 2 Click File gt Record Session In the Record Session Enter Session Name dialog box select the name of the session to re record and then click OK In the Session Recording dialog box clear Delete old session s contained scripts and then click No Continue re recording the session assigning any names you like to the scripts that you are recording other than the names of the original scripts The original scripts are no longer associated with this or any other session However you can still add the original scripts to a suite Overwriting the Original Scripts but Keeping Their Properties To re record a session and overwrite the original scripts while assigning the properties of the original scripts to the new scripts 1 2 Click File gt Record Session In the Record Session Enter Session Name dialog box select the name of the session to re record and then click OK In the Session Recording dialog box clear Delete old session s contained scripts and then click Yes Continue re recording the session assigning the name of one o
193. en image for viewing in the Image Comparator select Detect unexpected active windows and Capture screen image For information see the Image Comparator Help 4 Specify how Robot should respond to an unexpected active window Send key Robot sends the specified keystroke ENTER ESCAPE or any alphabetic key A through Z Select pushbutton with focus Robot clicks the push button with focus Send WM_CLOSE to window Robot sends a Windows WM_CLOSE message This is equivalent to clicking the Windows Close button 5 Specify what Robot should do if it cannot remove an unexpected active window Continue running script Robot continues script playback with the next command in the script after the one being processed when the unexpected active window appeared Playback continues even if the unexpected active window cannot be removed This may result in repeated script command failures Skip current script Robot halts playback of the current script If the script that detected the unexpected active window was called from within another script playback resumes with the script command following the Call Script command Abort playback Robot halts playback completely If the script that detected the unexpected active window was called from within another script the calling script also stops running 6 Click OK or change other options Setting Diagnostic Tools Options You can use the Rational diagnostic tools R
194. enerating Scripts dialog box after Robot finishes generating the script Canceling All Scripts in a Multi script Session To cancel all of the scripts in a session and stop recording 1 During recording click the Stop button on the Session Record floating toolbar 2 Click OK in the Stop Recording dialog box 3 Immediately click Cancel in the Generating Scripts dialog box You probably want to keep a script if you have planned a script in TestManager and defined properties for it You can later record over the script and retain the properties that you have defined For information about deleting scripts and sessions see Deleting Scripts and Sessions on page 7 27 Choosing the Protocols to Include in a Script During network and proxy recording and to a lesser extent during API recording Robot might capture requests for protocols that you do not want to include ina script 7 11 Recording Sessions You can specify the protocols to be included in either of the following ways gt Automatically by selecting Auto Filtering in the Generator Filtering tab of the Session Record Options dialog box gt Manually by selecting Manual Filtering in the Generator Filtering tab If you select this check box Robot displays the Manual Filtering dialog box during script generation immediately after recording Automatically Filtering Protocols If Auto Filtering is selected Robot automatically filters protocols based on the protocols
195. eneration the First Name data type Frank populates the FNAME datapool column with values FNAME Datapool Column William Victor Frederick e Mary Frank Lauren During playback the FNAME so Eleanor column supplies a different Charlotte value to the FNAME variable William in each instance of the script Victor Virtual Tester 1 Virtual Tester 2 Virtual Tester 3 FNAME Frederick FNAME Mary FNAME Frank Standard and User Defined Data Types There are two kinds of datapool data types as follows gt Standard data types that are included with Rational Test These data types include commonly used realistic sets of data in categories such as first and last names company names cities and numbers For a list of the standard data types see Appendix C gt User defined data types that you create You must create a data type if none of the standard data types contains the kind of values you want to supply to a script variable 10 9 Working with Datapools User defined data types are useful in situations such as Whena field accepts a limited number of valid values For example suppose a datapool column supplies data to a script variable named color This variable provides the server with the color of a product being ordered If the product only comes in the colors red green blue yellow and brown these are the only values that color can be
196. entTye Recut Computer Start Sie Script Start OPCtest Verification Point Object Properties Obj Script End OPCtest Computer End The following table gives you more information about the log To Control the log information and display Do This Set options in the Log tab of the GUI Playback Options dialog box For Information See Setting Log Options for Playback on page 9 5 Play back a script under Purify Quantify or PureCoverage and see the results in the log Set options in the Diagnostic Tools tab of the GUI Playback Options dialog box Setting Log Options for Playback on page 9 5 Analyze a failure in a Comparator Select a verification point failure in the log and click View gt Verification Point The next section Analyzing Verification Point Results with the Comparators Enter defects into Rational ClearQuest from the log Select the failed event in the log and click Defect gt Generate TestManager Help For detailed information about the log see the TestManager Help 9 21 Playing Back GUI Scripts Analyzing Verification Point Results with the Comparators 9 22 Use the Comparators to analyze differences between the baseline verification point data the data captured when you created the verification point and the actual verification point data the data captured when you played back the verification point The Comparators help you determine whe
197. ents such as buttons check boxes lists and text With Robot you can both record and play back scripts in both Microsoft Internet Explorer versions 4 x and later and Netscape Navigator versions 4 x 13 1 Testing HTML Applications NOTE In Netscape you cannot record or play back pages from a secured site Scripts can be recorded and played back on a variety of Windows platforms including Windows NT 4 0 Windows XP Windows 2000 and Windows 98 Configuring Your Browser for Testing Before you record scripts you should configure Internet Explorer and or Netscape Navigator so that scripts play back in the same way that you recorded them For best results configure Internet Explorer and or Navigator identically on both the computer that you record scripts on and the computer that you play back scripts on In addition you should disable the cookie prompt Disabling the Cookie Prompt 13 2 NOTE To disable the cookie prompt in Internet Explorer 6 refer to Internet Explorer online Help for that version To disable the cookie prompt in Internet Explorer 5 1 Start Internet Explorer 5 Click Tools gt Internet Options Click the Security tab Make sure the Internet icon is selected Click the Custom Level button Scroll to the Cookies section Click Disable in both cookies options Click OK two times CO Oe Sr Bw To disable the cookie prompt in Netscape Navigator 1 Start Netscape Navigator Click Edit gt Prefe
198. eopleTools component gt Object Properties verification point Use to test properties while recording a script NOTE To test the properties of the entire panel point to the window title bar when selecting the object to test gt Object Scripting commands Use to test properties programmatically while editing a script For information see the SQABasic Language Reference 16 2 Testing a Component s Data Testing a Component s Data You can use the Object Data verification point to test the data in PeopleTools data aware components NOTE To test the data in the entire panel point to the panel when selecting the object to test You can use the Object Data Test Definition to define user data tests For information see Appendix A Working with Data Tests PeopleTools Commands The following commands are included in the SQABasic scripting language to support the PeopleTools development environment For detailed information about these commands see the SQABasic Language Reference Command Description PSGrid Performs an action on a PeopleTools grid PSGridHeader Performs an action on a column header in a PeopleTools grid PSGridHeadervVP Creates a verification point on a column header in a PeopleTools grid PSGridvP Creates a verification point on a PeopleTools grid PSMenu Performs an action on a PeopleTools menu object PSMenuVP Creates a verification point on a Peop
199. equence until it finds a method that uniquely identifies the object The following table describes the two predefined preferences Object Order Recognition Comments Preference Method Order lt Default gt Object Name Index comes before ID In some Label and or Text environments such as PowerBuilder Index and Visual Basic the ID changes each ID time the developer creates an executable file and is therefore not a good recognition method C Recognition Object Name ID comes before index In some Order Label and or Text environments such as C the ID ID does not usually change and is Index therefore a good recognition method 2 9 Recording GUI Scripts The lt Default gt object order preference is the initial setting If you plan to test C applications change the preference to C Recognition Order NOTE Settings in the Object Recognition Order tab of the GUI Record Options dialog box do not affect HTML recording When recording against HTML Robot always uses HTMLID if available and then name text and index recognition and ignores any settings in the Object Recognition Order tab To change the object order preference 1 Open the GUI Record Options dialog box See Setting GUI Recording Options on page 2 5 Click the Object Recognition Order tab Select a preference in the Object order preference list General Robot Window Object Recognition Order Warming Changes made to the recognition method ord
200. equently the maximum length of a prefix is 40 characters less the number of digits in the numeric suffix of the last script or session that you recorded Start Application To have Robot prompt you to start the client after you begin recording select Prompt for application name on start recording With API recording you must start the client after you begin the recording process when Robot prompts you to do so Asa result the Prompt for application name on start recording check box is disabled with API recording With network or proxy recording you can start the client before or after you begin recording However connection information is sometimes lost if you start the application before you begin recording We recommend that you start the application after you begin recording If you start the client after you begin recording you can have Robot prompt you to start the client or you can start it without being prompted for example if the client is running on a computer different from Robot A custom recorder recognizes the Start Application check box only if it is configured to do so Setting the Recorder Window 6 38 The Session Recorder window displays information about client requests and server responses as they occur during a recording session This window appears automatically when you begin recording The following check boxes in the Recording Window group box set a variety of options for the Session Recorder windo
201. er and Internet applications running under Windows NT 4 0 Windows XP Windows 2000 and Windows 98 The main component of Robot lets you start recording tests in as few as two mouse clicks After recording Robot plays back the tests in a fraction of the time it would take to repeat the actions manually Other components of Robot are gt Rational Administrator Use to create and manage Rational projects which store your testing information gt Rational TestManager Log Use to review and analyze test results gt Object Properties Text Grid and Image Comparators Use to view and analyze the results of verification point playback gt Rational SiteCheck Use to manage Internet and intranet Web sites Introduction to Rational Robot Managing Rational Projects with the Administrator You use the Rational Administrator to create and manage projects Rational projects store application testing information such as scripts verification points queries and defects Each project consists of a database and several directories of files All Rational Test components on your computer update and retrieve data from the same active project Projects help you organize your testing information and resources for easy tracking Projects are created in the Rational Administrator usually by someone with administrator privileges Use the Administrator to gt Create a project under configuration management Create a pr
202. er take place immediately and cannot be undone by the Cancel button Warning Changes made to the recognition method order are shared by all users of the repository The Object order preference does not affect other users Object order preference Selecting C eens 7 Recognition Order Recognition Order Object type AnimateControl Move Up Recognition method order EEr re ame Text Default Index sets the recognition method order so that ID comes before Index 4 Click OK or change other options NOTE The object order preference is specific to each user For example you can record with C preferences while another user is recording with lt Default gt preferences at the same time For information about changing the order of the recognition methods within an object order preference see Customizing the Object Recognition Method Order on page 2 11 Using Advanced Features Before Recording Using Advanced Features Before Recording In addition to setting the standard GUI recording options you can take some additional steps to refine your testing You can gt Customize the order of the object recognition methods to make the script more readable and stable gt Map object types and classes to identify custom objects during record and playback Customizing the Object Recognition Method Order As explained in the previous section Robot has two predefined preferences for the re
203. erface such as objects with the Visible property set to False and objects with no GUI component This dialog box also includes objects that are direct children of the desktop such as PowerBuilder DataStore controls When you select an object in the list and click OK it is equivalent to pointing to the object with the Object Finder tool and releasing the mouse button NOTE Ifyou first select an object with the Object Finder tool in step 4 and then click Browse Robot highlights the selected object in the object list The object s parent is expanded down to the level of the object This is useful if there are many objects on the desktop In this case you would want to clear the Automatically close dialog box after object selection check box in the Select Object dialog box so that it reappeared after you selected the object Tasks Associated with Creating a Verification Point Identifying the Object to Test When you point to an object in the application under test with the Object Finder tool Robot displays a TestTip that identifies the object Classics Online File Order Admin Help 1 Choose an Album Bach Brandenburg Concertos Nos Selected Fugues Violin Concertoftny Beethoven gr _TestTip identifies the object type Haydn Meuse and development environment Mozart C abubhart 3 Place Order Order It Data Retrieved You can use one of several methods to visually identify an
204. es 8 12 releasing virtual testers from 8 8 8 12 scope of 8 12 timeout 8 12 synchronizing GUI scripts with application 3 12 playback with application 9 7 synchronizing items in schedules synchronization points 8 11 Index T tables testing HTML 13 8 technical support 2 xvi Telnet protocol 6 26 template file 3 19 test development phase 9 2 test environment setting up for playback 9 3 setting up for recording 2 3 test scripts See scripts Testing Library Delphi 17 2 testproc tpl file 3 19 think time CPU delays and 6 21 maximum 6 21 setting 6 20 threshold between think time and CPU delays 6 21 timeout values for script playback 9 7 for verification points 4 8 timeout values for synchronization points 8 12 timers 8 2 adding during editing 8 3 adding during recording 8 3 timers in GUI scripts 3 8 inserting 3 10 playing back scripts 3 10 uses for 3 9 times think 6 20 6 21 Title identification method 4 16 toolbars Session Insert 7 5 Session Record 7 5 top menus testing 4 20 TPINIT request message 6 26 Index 13 Using Rational Robot transactions automatically timing in blocks 8 4 performing during recording 7 4 transposing columns and rows in data grid 4 23 Trap options for GUI script playback 9 17 Trap utility setting options to detect GPFs 9 17 truncating emulation command ID prefixes 6 16 TUXEDO assigning prefix to emulation commands 6 32 command ID prefixes 6 32 defining a connection 6 26 type lib
205. ession Record Options Click the Method tab and make sure that Proxy recorder is selected Click the Method Proxy tab AWVN Select a client in the Client Port list The client port is optional 5 Select the client s server in the Server Port list the server port is a required entry 6 Click Add The client server pair that you have identified appears in the Client Server pairs for recording list Custom Recording Robot has an extensible framework that provides for the installation and configuration of custom recorder adapters and custom script generator adapters For this type of recording to work and for the resulting script to play back a custom recorder adapter and custom script generator adapter must be installed and configured Robot provides this extensibility and stores recorded data in a Rational project but custom recording is unrestricted its capabilities are defined by the installed adapter Because this type of recording is customized it works independently of existing Robot recording and script generating capabilities To use custom recording 1 Properly install and configure each of the adapters 2 Select Use Custom in the Method tab 6 11 Setting Recording Options If custom recorder adapters and custom script generator adapters are installed and configurable the Method Custom General Generator Custom and Generator tabs are enabled and all other tabs are disabled Choosing Custom Recor
206. est 15 6 DataWindows in PowerBuilder computed fields 15 7 expression values 15 4 hidden 15 5 recording actions 15 2 DCOM API recording method required with 6 4 assigning prefix to emulation commands 6 35 Index 3 Using Rational Robot DCOM recording 6 34 debugging GUI scripts 5 9 animation mode 5 13 clearing breakpoints 5 11 executing to a selected line 5 13 setting breakpoints 5 11 stepping into scripts 5 11 declarations global 3 17 Default object order preference 2 9 default settings recording 6 1 delay values adding to scripts 3 12 options for GUI script playback 9 7 deleting client server pairs 6 47 data tests A 8 low level scripts 5 6 object class mappings 2 14 proxy computers 6 47 script from a session 7 23 scripts 5 15 7 27 sessions 7 27 verification points 4 26 Delphi making applications testable 17 2 Object Testing Library Enabler 17 2 testing data 17 6 testing properties 17 5 Delphi Enabler 17 2 diagnostic tools options 3 3 9 11 directives in datapools 10 19 overriding 10 17 disabling cookie prompt in Internet Explorer 13 2 in Netscape Navigator 13 2 divide by zero errors detecting 9 17 Index 4 documenting GUI scripts 3 11 DropDown Contents data test 15 6 DropDownDataWindows in PowerBuilder 15 6 DropDownListBoxes in PowerBuilder 15 6 DWColumns in PowerBuilder 15 6 dynamic data correlation 6 29 E editing data in data grid 4 21 datapool column definitions in Robot 10 22 datapool
207. eters are used when you record actions on gt DataWindows p gt DataWindow sub objects NOTE For detailed information about DataWindow action parameters see the SQABasic Language Reference Recording Actions on DataWindows Parameters for a Mouse Click Action The following action parameters identify a DataWindow row if the action is a mouse click Action Parameter Action During Playback Col Value x Clicks the row specified by the column value pair Col is the numeric position of a DataWindow column and Value is the contents of the cell located at the intersection of column Col and the clicked row See the next section Value Based Recording ColName Value x Clicks the row specified by the column value pair ColName is the developer assigned name of a DataWindow column and Value is the contents of the cell located at the intersection of column ColName and the clicked row See the next section Value Based Recording CurrentRow Clicks the currently selected row in the DataWindow LastRow Clicks the last row in the DataWindow Row Clicks the row specified by the number first row 1 Text Clicks the row identified by the visible text in the DataWindow row VisibleRow Clicks the visible row specified by the number The range of row numbers begins with the first visible row Robot can record these action parameters for the following types of multirow DataWindow and DropDownDataWindow presentatio
208. f the original scripts to each script that you record Re recording Scripts Recording over a session affects all scripts in the session To record over just one script simply select that script s name when Robot prompts you for a script name during recording in the Split Test Script or Stop Recording dialog box Also if you plan a script in TestManager its name appears in the list that you can choose from when you record a script 7 25 Recording Sessions The following table summarizes the events that take place when you select the name of a planned or existing script rather than type a new name for a script that you have just recorded Type of Script Result of Overwriting the Script Planned script The script s properties are applied to the new script Robot does not prompt for a confirmation before recording the script because the existing script is empty Existing script is Robot prompts for a confirmation that you want to overwrite the part of a session script gt Click No to select or type another script name gt Click Yes to overwrite the script The properties of the original script are applied to the new script Also the script is removed from the original session and added to the new session Existing script is Robot overwrites the original script without prompting you for a not part of a session confirmation The properties of the original script are applied to the new script Copying Scripts
209. fication point Clicking in the window inserts a Browser NewPage command into the script and ensures proper synchronization between pages Using the Browser s Back and Forward Buttons If you use the Back or Forward buttons to navigate to a previously viewed page while recording a script you must perform some action on the page before you click the Back or Forward button again Clicking the page for example inserts the Browser NewPage command into the script and just as with the previous example ensures proper synchronization between pages Recording Transactions When you submit a purchase order for an e commerce transaction a substantial delay may occur before the Web server responds with a confirmation In fact a Web server may send one or more interim pages while it is processing the transaction Robot waits 30 seconds by default for this confirmation to arrive from the server If the confirmation requires additional time the warning New Page Not Found appears in the log after you play back the script To correct this problem edit the script by adding a Wait value greater than 30 seconds to the Browser NewPage command as in the following example Browser NewPage HTMLTitle Thank you for your order Wait 45 In this example the use of HTMLTitle in the recognition string allows Robot to identify the correct page at playback and skip over any interim pages The Wait value causes Robot to wait 45 seconds for this specif
210. files 3 16 sbl SQABasic library source files 3 14 sbx SQABasic library runtime files 3 16 spc datapool specification files 10 3 sqa LOV text files 12 15 wch session 7 2 Index files comparing 4 3 datapool file location 10 3 testing existence of 4 3 filtering protocols 6 22 6 24 7 11 filters for SQA Basic files 3 17 Find Sub String Case Insensitive verification method 4 14 Find Sub String Case Sensitive verification method 4 14 floating toolbars Session Insert 7 5 Session Record 7 5 FTP protocol 6 26 G general protection faults detecting 9 17 generating values in datapools in Robot 10 21 10 23 generating scripts 7 5 from a session 7 19 manual protocol filtering 7 11 problems with 7 6 generating VU scripts recording options 6 24 Generic object type defining unknown objects as 2 8 2 20 global declarations 3 17 header files 3 17 library source files 3 15 global datapool directives 10 17 global sbh file 3 17 global sbl file 3 15 GPFs detecting during playback 9 17 grouping scripts for playback 2 25 Index 5 Using Rational Robot GUI Insert toolbar 2 19 GUI playback options 9 4 GUI Record toolbar 2 19 GUI recording options 2 5 GUI scripts adding features 5 2 adding user actions 5 2 autonaming 2 6 coding manually 2 23 creating modular scripts 2 3 datapools and 10 24 debugging 5 9 ending recording 2 22 pausing recording 2 19 playing back 9 1 9 19 recording 2 1 2 15 re
211. formation about the diagnostic tools and how they work with Robot see Setting Diagnostic Tools Options on page 9 11 There are two ways to specify the diagnostic tool that an application should start under gt During recording in the Start Application or Start Java Application dialog box gt During playback in the Diagnostic Tools tab of the GUI Playback Options dialog box Adding Features to GUI Scripts 3 4 Specifying the Diagnostic Tool During Recording During recording you start an application using the Start Application or Start Java Application dialog box In the dialog box you can specify the diagnostic tool that the application should start under during playback Start Application 1 x Application name PO Browse a During playback start application Using settings from GUI Playback Options dialog box Under Rational Purify Under Rational Quantify Starts application using the tool selected in the GUI Playback Options dialog box Under Rational PureCoverage Overrides any tool A C Under Rational Purify with PureCoverage Data selected in the GUI Under none Playback Options dialog box It is useful to set the diagnostic tool option during recording if you have several applications in a script and you want to start each application under a different tool during playback For example suppose you have a shell script that calls three scripts Each script starts one application
212. from the script that Robot generates The available protocols are DBLIB DCOM HTTP IIOP Jolt ODBC Oracle Socket SQL Server Sybase TUXEDO and any installed API or custom recorder filter adapters Selected protocols Protocols to include in the script that Robot generates To select or deselect a protocol 1 2 Click a protocol in the Available protocols section Click the greater than symbol gt and the protocol moves to the Selected protocols section To deselect a protocol in the Selected protocols section click the protocol and then click the less than symbol lt The protocol moves back to the Available protocols section Click the double greater than symbol gt gt All protocols in the Available protocols section except DCOM and installed API custom generator filter adapters move to the Selected protocols section Click the double less than symbol lt lt and all protocols in the Selected protocols section move back to the Available protocols section NOTE DCOM is an exclusive protocol that cannot be selected in combination with any other protocol Similarly generator filter adapters for custom recording are exclusive Jolt Socket and TUXEDO Protocols If you click the Advanced button the Advanced Protocol Filtering dialog box appears This dialog box lets you define more detailed information about the Jolt socket and TUXEDO protocols specified in the Selected protocols list gt Jol
213. g methods To set general recording options 1 Click Tools gt Session Record Options 2 Click the General tab Setting General Recording Options The following figure illustrates the General tab Session Record Options E M E m This tab lets you set gt Automatic prefixes for scripts and sessions gt Whether Robot should prompt you to start an application after you start network or proxy recording gt Various settings for the Session Recorder window The following sections describe these options Autonaming Prefixes In the Autonaming Prefixes group box you can define prefixes for default script and session names If you define a prefix Robot appends a consecutive number to the prefix It then uses the unique prefix and number combination as a suggested name each time it prompts you to define a script or session name during recording 6 37 Setting Recording Options For example if your prefix for a script is Script Script1 is the default script name for the first script you record Script2 is the default script name for the second script you record and so on During recording when you are prompted to define a script or session name you can accept the default name modify it or change it completely Optionally you can leave either or both of these boxes blank so that session and script names consist of the names that you define during recording Names can have a maximum of 40 characters Cons
214. g Dialog Box The Manual Filtering dialog box has the following controls Sort Order Changes the hierarchical order in which protocol client and server names are listed in the tree Protocol Changes the type of requests that Robot generates for the currently selected connection in the tree Robot converts the protocol in the current connection to the protocol type that you specify in Protocol Typically you do not want to convert captured protocols Include Exclude Includes or excludes selected items in the script that Robot is generating Displays the protocol client and server names that Robot captures during recording Also indicates whether items are marked for inclusion in or exclusion from the script gt Items that Robot includes in the script are shaded red gt Items that Robot excludes from the script are clear white If an item is partially shaded red some items are included and some are excluded When you click an item in the tree you select that item and also any items below that item Click the icon to expand a branch and click the icon to close a branch To change the hierarchical order of the protocol client and server names select a new order in Sort Order Robot detects and displays the names of the clients and servers involved in the conversations If the names cannot be resolved Robot displays IP addresses OK Cancel Confirms or cancels any changes that yo
215. g SQL return codes 6 18 viewing datapool values in Robot 10 23 virtual testers pacing 6 20 synchronizing 8 8 think time 6 20 think time vs CPU delays 6 21 Virtual User Recorder icon 6 39 Visual Basic support 11 1 verifying that extension is loaded 11 3 VU scripts adding number of rows retrieved to 6 17 adding retrieved rows to 6 17 command ID prefixes in 6 16 datapool access shared with GUI scripts 10 25 distinguishing think time and CPU delays 6 21 improving readability 6 16 maximum think time 6 21 methods of recording 6 2 playback rate 6 20 recording options for 6 1 script generation options 6 24 SQL return code verification 6 18 think time in 6 20 variable names and datapool column names 10 19 W wait state options for GUI script playback 9 7 watch files See session files Web Site Compare verification point 4 5 Web Site Scan verification point 4 5 Window Existence verification point 4 5 Window Image verification point 4 5 Index windows setting wait values for 9 7 testing existence of 4 5 testing images 4 5 unexpected during playback 9 10 WorkStation Listener information 6 26 wrapping the datapool cursor 10 16 Index 15 Using Rational Robot Index 16
216. g figure shows the main Rational Administrator window after you have created some projects Rational Administrator Of x File Edit View Insert Tools Help ELTE S22 RERPSRAQE RV ae Sn Rational Administrator fe Projects Name SampleProject ics fed MLtestrepo Location C projectdir H Rational Test Datastore Path C projectdir S ampleProje Synchronizer Rules C projects Ratior ClearQuest Database Name Sonar Versioning Requirements No a w oe hihan Versioning Test Assets No fH Rational Test Datastore TestD ataStorePath C projectdir T estD atastore Synchronizer Rules C projectdir Ratic RequisitePro Project Path P SOL Anywhere Database Servers UCMEnable No Version 4 For Help press F1 h For information about the Administrator and projects see the Rational Suite Administrator s Guide Introduction to Rational Robot Developing Tests in Robot You use Robot to develop two kinds of scripts GUI scripts for functional testing and sessions for performance testing Use Robot to gt Perform full functional testing Record and play back scripts that navigate through your application and test the state of objects through verification points Perform full performance testing Use Rational Robot and Rational TestManager together to record and play back sessions that help you determine whether a multiclient system is performing within user defined standards under varying loads Create and
217. grid in the dialog box Window Name OracleRootwindow Block Name HOME_BLOCK Block Name DATA_CONTROLS H Block Name CUSTOMER H Block Name PRODUCT H Block Name TOOLBAR Block Name ITEM_CONTROLS Block Name 4BOUT Canvas Name HOME_CANVAS Canvas Name DATA_CANVAS Window Name SAMPLE_WINDOW_T Window Name SAMPLE_ WINDOW 8 Complete the verification point as usual a LOY Name CUSTOMER_LOV L RecordGroup Name CUSTOMER_RAY gt gt gt CHAPTER IB Testing HTML Applications This chapter explains how to use Robot to test HTML applications It includes the following topics gt gt gt gt About Robot support for HTML applications Configuring your browser for testing Making HTML applications testable Testing data in HTML elements How Robot maps HTML elements Supported data tests for HTML testing Testing properties of HTML elements Playing back scripts in Netscape Navigator Recording tips Enhancing object recognition of HTML elements About Robot Support for HTML Applications Rational Robot provides comprehensive support for testing HTML applications that run on the World Wide Web Robot lets you test both static and dynamically generated pages accessed from both standard and secured HTTP servers regardless of make or model Robot examines the data and properties of each HTML element letting you test the elements that appear on your Web pages including table data links and form elem
218. he as security or some other terminology Refer to your server documentation for details on how to enable the cache It is also a good idea to make sure the cache is enabled on your browser It is enabled by default To specifically enable the cache 1 2 Start Netscape and click Edit gt Preferences Expand the Advanced category and select Cache When cache is enabled the Preferences Cache dialog box displays values greater than 0 for Memory Cache and Disk Cache The Preferences Cache dialog box has the following default settings Memory Cache 1024 KBytes Disk Cache 7680 KBytes Disk Cache Folder Should point to your user profile directory in the directory where you installed Netscape Testing Data in HTML Elements To disable the cache set the Memory Cache and the Disk Cache to 0 Testing Data in HTML Elements Use the Object Data verification point to test the data in HTML elements For example you can use this verification point to test whether a purchase order has been processed or whether a Submit button returns the page that it is supposed to For more specific information about verification points see Chapter 4 Creating Verification Points in GUI Scripts To test an HTML element s data 1 Start recording in Robot as described in Enabling HTML Testing in Robot on page 13 3 Navigate to the Web page that contains the elements to test For example navigate to the page that is returned after the user s
219. he sqa file you can also test the properties of LOVs and record groups using the Object Properties verification point Capturing Data in an LOV Associated with a Text Item If an LOV is associated with a text item point to the text item to capture the data in the LOV LOV associated with text pS Data Items by i Customer List Customer ID 1 Ocean Parts Ltd Acme Metal Working Corp A1 Woodworking Ltd NOOSE WHO SRT ET RO TAE Barrymore Company Text item Hem BC Manufacturing Inc Olympic Fabricators Inc 23 Broadway Woll Engineering Co Address Baton SOS o Beerina Bearina Inc Choose customer directly E Find Cancel CO Je Jak To capture the data 1 Display the form containing the LOV 2 Make sure the LOV is closed You can capture the data in an LOV only when the LOV is closed Testing an Object s Data Start creating an Object Data verification point When the Select Object dialog box appears drag the Object Finder tool to the text item and release the mouse button If the Select Object dialog box still appears click OK The Object Data Tests dialog box appears 5 From the Data test list select LOV Contents Object Data Tests 1 x Selected object Textltem Name CUSTOMER CUSTOMERNA Data test Lov Contents Displayed Records Entire T able LOV Contents oaeen or the LUY corresponding to text item for the data columns liste
220. he C preference 2 11 Recording GUI Scripts 2 12 Changing the Order of Object Recognition Methods To change the order of the object recognition methods for an object type 1 Open the GUI Record Options dialog box See Setting GUI Recording Options on page 2 5 2 Click the Object Recognition Order tab 3 6 General Robot Window Object Recognition Order Warming Changes made to the recognition method order take place immediately and cannot be undone by the Cancel button Warning Changes made to the recognition method order are shared by all users of the repository The Object order preference does not affect other users Object order preference Object type AnimateControl Move Up Move Down Default Recognition method order ObjectName Select a preference in the Object order preference list If you will be testing C applications change the object order preference to C Recognition Order From the Object type list select the object type to modify The fixed set of recognition methods for the selected object type appears in the Recognition method order list in its last saved order Select an object recognition method in the list and then click Move Up or Move Down Changes made to the recognition method order take place immediately and cannot be undone by the Cancel button To restore the original default order click Default Click OK NOTE Cha
221. he application since the last build You can evaluate these differences to determine whether they are actual defects or deliberate changes Restoring the Test Environment Before Playback The following table shows the general process for the regression testing phase Task 1 Prepare for playback by restoring the test environment and setting the playback options See Restoring the Test Environment Before Playback on page 9 3 Setting GUI Playback Options on page 9 4 2 Play back each script against a new build of the application under test Playing Back a GUI Script on page 9 19 3 Analyze the results using the TestManager log Viewing Results in the TestManager Log on page 9 21 and the TestManager Help 4 Use the appropriate Comparator to determine the cause of verification point failures If failed Analyzing Verification Point Results with the Comparators on page 9 22 and the verification points are the result of intentional Comparators Help changes to the application under test update the baseline data using the appropriate Comparator 5 Use the log to enter defects The TestManager Help 6 If necessary revise the scripts to bring them up to date with new features in the application under test Play back the revised scripts against the current build and then reevaluate the results Chapter 5 Editing Compiling and Debugging Scripts Restoring the Test Environment Before Playbac
222. he settings in this dialog box NOTE By default the Usage column see page 10 19 contains the value EXCLUDE for each script variable listed in the grid This means that Robot does not create a datapool column for these variables when it creates the datapool To have Robot automatically create datapool columns when it creates the datapool change the Usage values to INCLUDE or OVERRIDE 4 When finished making any changes click Save The DATAPOOL CONFIG section of the script is updated according to the values set in the Configure Datapool in Test Script dialog box Using Datapools with Sessions 5 Take one of these actions Click Create to define and populate the new datapool Ifthe datapool you are trying to create already exists the Create button does not appear in the dialog box Instead the Edit Specification button appears allowing you to edit datapool column definitions and the Edit Existing Data button appears allowing you to edit datapool values Click Close if you do not want to define and populate a datapool at this time 6 Ifyou clicked Create in the previous step continue by following the instructions in the section Step 2 Defining Datapool Columns and Generating the Data on page 10 20 Here is how the Configure Datapool in Test Script dialog box maps to the DATAPOOL CONFIG section of a script Configure Datapool in Script Eid Because Obey Usage is selected and the Persistent Datapool name Classi
223. her Rational Products Rational Robot is integrated with many other Rational products and components including TestManager TestFactory ClearQuest Purify Quantify PureCoverage and RequisitePro The products and components are available based on what you have installed Planning and Managing Tests in TestManager Rational TestManager is the one place to manage all testing activities planning design implementation execution and analysis TestManager ties testing with the rest of the development effort joining your testing assets and tools to provide a single point from which to understand the exact state of your project Test Manager supports five testing activities gt Plan Test The activity of test planning is primarily answering the question What do I have to test When you complete your test planning the result is a test plan that defines what to test In TestManager a test plan can contain test cases The test cases can be organized based on test case folders Using Robot with Other Rational Products gt Design Test The activity of test designing is primarily answering the question How am I going to doa test When you complete your test designing you end up with a test design that helps you understand how you are going to perform the test case In TestManager you can design your test cases by indicating the actual steps that need to occur in that test You also specify the preconditions postcon
224. ialog box Working with Sessions 7 16 A recording session contains all of the client requests and server responses issued from the time you begin recording until the time you stop recording When you work with sessions you can gt Split the session into multiple scripts gt Regenerate the scripts from the session gt View the session s properties The following sections describe each of these activities Working with Sessions Splitting a Session into Multiple Scripts Splitting a session signifies that everything you have recorded represents one logical unit of work such as a login to a database When you split a session you name the completed script and start a new script You can continue recording transactions and splitting the session into as many scripts as you want NOTE Ifyou split a session into multiple scripts you should examine the resulting scripts to make sure that they begin and end at a known state This is particularly important if you plan to use a split script as part of a loop or to run a series of scripts in an order different from how you recorded them Check the state of connections used in the script and any sqlprepare emulation commands or VU commands that declare or manipulate cursors Robot does not support session splitting for VB scripts If quick script development time is a priority perhaps because testable builds are developed daily or because Web content is updated daily splitting
225. ic page to be displayed Recording Tips Recording Mouse Movements With Dynamic HTML it is possible to cause a page to change color or to cause text on a page to update simply by moving the mouse over the page To capture these mouse movements 1 Paw 5 6 Start recording in Robot Navigate to the page that contains the Dynamic HTML Press CTRL SHIFT R to enter low level recording mode Move the pointer over the portion of the page that is affected by the mouse movement Press CTRL SHIFT R to stop low level recording mode Insert an Object Properties verification point For more information about low level recording see Switching to Low Level Recording on page 2 21 Ensuring Browser Compatibility To help ensure that scripts recorded in Internet Explorer play back as expected in Navigator observe the following recording tips gt Do not click the scroll bars in Internet Explorer during recording If you need to scroll pause the recording scroll the window and then resume recording Avoid using the Forward or Back arrows during recording in Internet Explorer If you find it necessary to use them edit your script by replacing the arrows with the following commands Browser Back Browser Forward For more information see the SQABasic Language Reference Exit Internet Explorer by clicking the Close Window button in the upper right corner of the window rather than by clicking File
226. ic tool in the GUI Playback Options dialog box you instruct Robot to call that tool to instrument the application that is to be started and then you run the instrumented application in place of the original For Java applications Quantify and PureCoverage put the JVM into a special mode to enable event monitoring when the application runs during playback When you select a diagnostic tool in the GUI Playback Options dialog box you instruct Robot to call that tool to enable event monitoring To use any of the diagnostic tools with Robot start the application as follows when recording gt Start Visual C C and Visual Basic applications with the Start Application button or menu command gt Start Java applications with the Start Java Application button or menu command For more information see Starting an Application on page 3 1 NOTE There is no support for using Robot to play back Java applets under these diagnostic tools For information about the environments that are supported directly in these tools see the documentation for the appropriate product How the Start Application and Diagnostic Tools Options Interact When you record a script you use the Start Application or Start Java Application dialog boxes to indicate how you want each application to start These dialog boxes include options for starting the application under a diagnostic tool during playback For more information see Starting an Application on page 3 1
227. ication Datapool The class is always SQL in this release One of the following values Oracle Sybase SQL Server The name of the database server as it is defined in the database environment Do not use a computer name for the name of Service This is the same name that Robot inserts into the server argument of the sqlconnect command during recording The user ID The password for this user ID Repeat the last step for each user ID and password that you need to enter Click Save and then click Close Click OK to close the Datapool Properties dialog box and then close the Manage Datapools dialog box Modifying the Authentication Datapool During Recording If you need to insert many rows of logon information into the Authentication Datapool do so through TestManager If you need to add just a few rows of logon information do so during recording when Robot prompts you for this information 6 43 Setting Recording Options Unique Features of the Authentication Datapool The Authentication Datapool is similar to other datapools that you edit with TestManager However there are differences gt An empty Authentication Datapool is included with the Rational Test software gt The Authentication Datapool is used strictly for logon information You cannot assign any standard or user defined data types to the columns in an Authentication Datapool gt Do not delete or rename the Authentication Datapoo
228. idth x zi I Show verification method OK Cancel Recapture Help Current value of trackbar 14 16 Enhancing Object Recognition of Java Components 7 Click OK to complete the verification point NOTE When you create an Object Properties verification point you can edit the list of properties that are saved with the component Robot saves the list relative to the Java class name for example Java awt Button not the Robot command name for example PushButton This allows you to save derived classes with different lists of properties For more information about adding and removing properties from the properties list see the Robot Help Enhancing Object Recognition of Java Components Robot uses recognition methods to identify components in the application under test These recognition methods are saved as arguments in scripts so Robot can correctly identify these component during playback For example Robot can identify a Java Button by the visible text displayed on the button If the text changes after the script has been recorded the script may fail when it is played back The best way to make sure that Robot recognizes a Java component is to assign a name to the object in the Java code Although Java supports several ways of doing this Robot works as follows gt Ifthe component exports a public String getName method and this method returns a name that starts with a dot character Robot uses this name to
229. ike a shuffled deck of cards With Shuffle access order each time you pick a card access a row you place the card at the bottom of the pack With Random access order the selected card is returned anywhere in the pack which means that one card might be selected multiple times before another is selected once Also with Shuffle after each card has been selected once you either resume selecting from the top of the same access order Wrap at end of file is Yes or no more selections are made Wrap at end of file is No With Random you never reach the end of the pack there is no end of file condition so Wrap at end of file is ignored Use Test Script Data Specifies the source of the values that script variables are assigned during suite runtime as follows gt Always Script variables are assigned the values provided during recording rather than values from the datapool Recorded values are listed in the Test Script Data column This option overrides the runtime meaning of the INCLUDE directive in the Usage column It also adds the flag OVERRIDE to the DATAPOOL_CONFIG section of the script This option provides a convenient way to run the script even if the datapool file is missing or incomplete gt Obey Usage Script variables associated with the INCLUDE directive in the Usage column are assigned datapool values Script variables not associated with the INCLUDE directive are assigned values in the Test Script
230. ildren of the form and canvas views and windows as children of the form Object List f f Block Name HOME_BLOCK Block Name DATA_CONTROLS H PushButton Name GO_CUSTOMER H Listltem Name CHOOSE_CUSTOMER PushButton Name PREVIOUS_RECORD L PushButton Name NEXT_RECORD Block Name CUSTOMER Block Name PRODUCT Block Name TOOLBAR Block Name TEM_CONTROLS i Block Name 4B0UT F Canvas Name HOME_CANVAS Canvas Name DATA_CANVAS H Canvas Name TOOLBAR_CANVAS Canvas Name ITEM_CANVAS Canvas Name 4BOUT_CANVAS j Window Name SAMPLE_WINDOW j Window Name SA4MPLE_WINDOW_TWO L Window Name 4BOUT_wWINDOW The following figure shows the expanded GUI view of the Window branch The expanded GUI view includes all visual items as children of the window Object List Jet ComboBox ae EONTOLS0 CUSTOME PushButton Name DATA_CONTROLS PREVIOUS_R PushButton Name DATA_CONTROLS NEXT_RECO j Textltem Name CUSTOMER CUSTOMERID Textltem Name CUSTOMER CUSTOMERNAME H Textltem Name CUSTOMER ADDRESS H Textltem Name CUSTOMER CITY H Textltem Name CUSTOMER STATE H Textltem Name CUSTOMER ZIPCODE H Textltem Name PRODUCT PRODUCT Textltem Name PRODUCT UNITSSOLD Textltem Name PRODUCT COSTPERUNIT MNN F Textltem Name PRODUCT PRICEPERUNIT 12 9 Testing Oracle Forms Applications Testing an Object s Properties You can use two methods to te
231. iles 5 8 To batch compile scripts and library source files 1 Click File gt Batch Compile Batch Compile 1 x Available Selected gt gt SEIS List GUI scripts List VU scripts C List SQABasic library source files T List only modules that require compilation cK Cancel Hep Select an option to filter the type of scripts or files you want to appear in the Available list GUI scripts VU scripts or SQABasic library source files Optionally select List only modules that require compilation to display only those files that have not yet been compiled or that have changed since they were last compiled Select one or more files in the Available list and click gt or gt gt Robot compiles the files in the same order in which they appear in the Selected list Click OK to compile the selected files Debugging GUI Scripts Locating Compilation Errors During compilation the Build tab of the Output window displays compilation results and error messages with line numbers for all scripts and library source files Default Rational Robot test1 Oy x File Edit View Record Debug Insert Tools Window Help l x Je 2 BUS eBn Z 4j Z ELE Verification Points gy Object Properti agwo fal Windows SetContext Caption Prac ListView Click ObjectIndex 1 ListView Click OhjectIndex 17 ii ListView Clickx OhjectIndex 1 ListViewl Click n ee gt C
232. ing See Performance Testing with Rational TestManager on page 1 13 Testing Applications with Rational TestFactory Rational TestFactory is a component based testing tool that automatically generates TestFactory scripts according to the application s navigational structure TestFactory is integrated with Robot and its components to provide a full array of tools for team testing under Windows NT 4 0 Windows XP Windows 2000 and Windows 98 With TestFactory you can gt Automatically create and maintain a detailed map of the application under test gt Automatically generate both scripts that provide extensive product coverage and scripts that encounter defects without recording Introduction to Rational Robot gt Track executed and unexecuted source code and report its detailed findings gt Shorten the product testing cycle by minimizing the time invested in writing navigation code gt Play back Robot scripts in TestFactory to see extended code coverage information and to create regression suites play back TestFactory scripts in Robot to debug them For more information about TestFactory see its manuals and Help Managing Defects with Rational ClearQuest Rational ClearQuest is a change request management tool that tracks and manages defects and change requests throughout the development process With ClearQuest you can manage every type of change activity associated with software development including enhan
233. ing session The Session Recorder tracks a variety of statistics about the client server interaction such as the number of bytes the client sends or receives in a call To gauge the rate at which client server activity occurs the Session Recorder displays its data at three second intervals Information in the Session Recorder window is continuously updated as the client server interaction progresses If you do not see activity in this window during recording Robot is not capturing client server traffic Stop recording and try to determine the cause of the problem NOTE The rates and statistics views are not available for custom recorders Getting Feedback During and After Recording The Session Recorder During Recording The following figure shows the Session Recorder window as it might appear during recording and the type of information that it displays Progress bars indicating the Number of calls and bytes Total number of calls and bytes number of calls and bytes in in the current 3 second in the recording session the current 3 second interval interval wv Session Recorder Calls in Interval Total interval 0 942 Calls p 3750 or Bytes p 5972 0 173448 r Annotations SyncPoint synch point Comment commenthere Start imer starttimer Ready NUM 4 Most calls and bytes in The annotations comments start stop any 3 second interval blocks timers synchronization points
234. ing the activity Insert this command immediately before the first emulation command for the activity that you are timing The start_time measurement includes the think time if any for the next emulation command in the script To exclude the think time for an emulation command insert start_time after the emulation command and use the _fs_ts read only variable For example http_request test1 001 start_time timerid _fs ts stop time timerid gt stop _time Stops timing the activity Insert this command immediately after the last emulation command for the activity that you are timing For information on using timers in VU scripts see the start_time command in the VU Language Reference For information on using timers in Visual Basic scripts see the TimerStart method in Rational Test Script Services for Visual Basic For information on using timers in SQABasic scripts see the Start Timer command in SQABasic Language Reference A block is a set of contiguous lines of code that you want to make distinct from the rest of the script Typically you use a block to identify a transaction within a script A block has the following characteristics gt Ablock begins with the comment In the VU language a block begins like this Start Block BlockName gt Robot automatically starts a timer at the start of the block In the VU language the timer looks like this start_time BlockName _fs_ts Typical
235. ing you to filter the reports with the block name To make the script easier to read To provide an immediate context for a line within the block through command IDs 8 5 Adding Features to Scripts Adding a Block To insert a block into a script 1 If the Session Insert floating toolbar is not already displayed click the Insert button on the Session Record floating toolbar Click the Start Block button at that point in the script where you want the block to begin for example just before you start to record a transaction Type the block name Robot uses this name as the prefix for all command IDs in the block The maximum number of characters for a command ID prefix is seven Click OK Record all of the client requests in the block Click the Stop Block button to end the current block and click OK NOTE When you end a block you always end the current block If you are nesting blocks you cannot specify which block you want to end the Stop Block command always applies to the innermost block For more information see Nesting Blocks on page 8 6 When you start and stop a block during recording the commands are reported as annotations in the Annotations window NOTE You can add a block during recording only not during editing Nesting Blocks To nest blocks click Start Block on the Session Insert floating toolbar to start a new block without explicitly ending the current block When you nest blocks
236. into a script Executes a single command line within a script If the command calls another script Robot executes the called script as if it were a single instruction and moves to the command immediately following the script call If the command is the last line in a called script Robot returns to the calling script and stops at the command immediately following the script call Step Out Enabled after you step into a script Steps out of the called script and returns to the calling script Execution stops at the command immediately following the script call Step Out is equivalent to Go Until Cursor with the text cursor placed in the calling script in the command line immediately following the script call You can also use the Next Error and Previous Error commands on the Edit menu These commands move the text cursor to the line containing the next or previous compiler error and add an X in the left margin or highlight the line Setting and Clearing Breakpoints Robot lets you set any number of breakpoints in a script A breakpoint is a location in a script where you want execution to stop When execution stops at a breakpoint you can examine the value of a variable or check the state of an object before it is modified by a subsequent command You can then resume execution until the next breakpoint or the end of the script Editing Compiling and Debugging Scripts To set and clear breakpoints 1 2 If necessary
237. ion The prefix that you set here overrides the Command ID prefix in the Generator tab Include original IORs in iiop_bind commands Select this check box to make the ior argument of every scripted iiop bind emulation command contain the stringified form of the IOR originally recorded for that object reference The ior argument is required by the IOR bind modus Clearing this box shortens scripts but you must manually enter the ior argument value when using the IOR bind modus DCOM Recording Robot records DCOM client applications that are constructed with Visual Basic compiled executables Java compiled executables or C with the restriction that the C interfaces are useable by VB they must use attributes that conform to the OLE Automation attribute DCOM recording captures distributed inter computer traffic and generates a VB script For VB script recording the VB IDE is used as the script editor In the Session Recording Options of Robot DCOM is an available protocol however DCOM refers to any distributed COM calls such as the older DCOM MTS packaging or the newer COM packaging NOTE Ifyou are recording the DCOM protocol Visual Basic version 6 must be installed on your Local computer Type Library Requirement for DCOM Recording For Robot to get data type information from DCOM components during recording the type library must be present If Robot does not locate the type library for a particular interfac
238. ion Name dialog box The following events occur Robot is minimized default behavior The Session Record floating toolbar appears default behavior You can use this toolbar to stop recording redisplay Robot split a script and insert features into a script See Using the Floating Toolbars on page 7 5 The Session Recorder icon appears on the taskbar The icon blinks as Robot captures requests and responses Recording Sessions 7 If the Start Application dialog box is displayed provide the following information and then click OK The path of the executable file for the browser or database application Optionally the working directory for any components such as DLLs that the client application needs at runtime Optionally any arguments that you want to pass to the client application The Start Application dialog box appears only if you are performing API recording or if you are performing network proxy or custom recording and selected Prompt for application name on start recording in the General tab of the Session Record Options dialog box Perform the transactions that you want to record As the application sends requests to the server notice the activity in the Session Recorder window Progress bars and request statistics appear in the top of the window If there is no activity in the Session Recorder window or if the Session Recorder icon never blinks there is a problem with the r
239. ion Record Options 2 Click the Generator tab Setting Script Generation Options The following figure illustrates the Generator tab Session Record Options 21 x General Method Method Network Method Prom Method Custom Generator Custom Generator Generator Filtering Generator per Protocol Use Generator settings to modify the contents of the generated script s gt General _ Returm Data T Use datapools Display recorded rows Command ID prefix None 0 a OOo P Verify playback row counts I Verify playback retum codes I Bind output parameters to YU variables Timing r Playback Pacing P CPU user threshold ms p 4 per command f person I Think maximum ms p 4 C none Cancel Help NOTE Depending on the script generator configuration some options on the Generator tab may not be enabled for custom script generator adapters The Generator tab allows you to specify and modify the contents of generated scripts The following sections describe these options Use Datapools Select this check box if you want Robot to generate datapool commands in the script Datapool commands allow the script to access data in a datapool A datapool allows each virtual tester running a script to send realistic data to the server If you do not use a datapool each virtual tester sends the same data to the server the data that you sent to the server when you recorded th
240. ipt to measure a variety of separate tasks You can nest timers within other timers starting and stopping the second timer before stopping the first timer and you can overlap timers stopping the second timer after stopping the first timer However you should stop a timer before starting that same timer over again If you start the same timer twice without stopping it Robot terminates the first occurrence when it starts the second If you do not explicitly stop a timer the timer is stopped automatically at the end of the transaction When you play back a script that includes timers you can view the elapsed time in the log For more information see Playing Back a Script That Includes Timers on page 3 10 Uses for Timers You can use timers to measure general application performance and specific task performance Measuring General Application Performance For general application performance start a timer perform a series of actions and create verification points with the application under test and then stop the timer When you play back the script the timer measures the amount of time it took for the application to complete all of the actions The log shows the timing results Measuring Specific Task Performance For specific task performance you often use timers with verification points that have wait state values For more information see Setting a Wait State for a Verification Point on page 4 8 You use the wait state value
241. iptable protocols it records Manual Filtering If selected Robot displays a list of connections consisting of a client a server and the protocol used in the client server traffic This list appears immediately after recording and just before Robot generates the script When the list appears select one or more connections to include in the script If cleared Robot does not display a list of connections NOTE Ifyou select Manual Filtering Robot attempts to detect the computer name of each client and server it records before it generates the script This can increase script generation time If you select both Auto Filtering and Manual Filtering the list of connections includes all captured protocols gt Protocols that you listed in the Selected protocols box are marked for inclusion in the script gt Protocols that you listed in the Available protocols box are marked for exclusion from the script You can change these inclusion exclusion designations in the Manual Filtering dialog box so that requests for any captured protocol can be included in or excluded from the script For information about using this dialog box see Choosing the Protocols to Include in a Script on page 7 11 Setting Script Generation Options Protocol Lists When the Auto Filtering check box is selected the following lists are enabled gt gt Available protocols Protocols that are available for capture but that you want to exclude
242. ipts are generated from the recorded client requests and server responses Robot stores the recorded requests and responses in a session file The following steps outline the general process for recording a session 1 Set the session recording options Recording options tell Robot how to record and generate scripts You set recording options to specify The type of recording you want to perform such as API network proxy or custom The recording method you choose determines some of the other recording options you need to set 6 1 Setting Recording Options Script generation options such as specifying whether you want the script to include datapool commands or think time delays and whether you want to filter out protocols to control the content of the script General recording options such as the prefixes to assign to default script and session names 2 Start the recording session With the API recording method you must start recording before starting the client application at which point Robot prompts you for the name of the client With the other recording methods you can start recording before or after you start the client Start the client application 4 Record the transactions During recording you can split the session into multiple scripts each representing a logical unit of work Optionally Insert timers blocks comments and other features into the script during recording 5 Close the client
243. it back to its position as a title If a verification point captures only column titles Robot selects the Move column titles to grid check box Titles are moved to the grid so that data exists in the grid for testing This check box is not available for list boxes combo list boxes and combo boxes Editing Captured Data in a Data Grid After selecting the data to test but before saving the verification point you can edit the data to test for the following verification points Clipboard Menu and Object Data You can edit the data in any cell of a data grid Editing data is useful if you want to change the baseline for a verification point based on a new specification or anticipated changes to the application under test By editing data before playback you often avoid a verification point failure Editing Data for a Clipboard or Object Data Verification Point To edit the data for a Clipboard or Object Data verification point 1 Double click a cell in the data grid The pointer changes to a text cursor 2 Edit the data in the cell 3 To accept the changes press ENTER To cancel the changes press ESC NOTE To edit the titles in a data grid select the Move column titles to grid or Move top menus to grid check box 4 2 Creating Verification Points in GUI Scripts Editing Data for a Menu Verification Point To edit the data for a Menu verification point gt Double click a cell in the data grid to open the Edit Menu Item dia
244. it state value of 30 seconds gt An expected result of Fail Creating Verification Points in GUI Scripts Because the expected result is a failure you are telling Robot that you expect the window not to exist within 30 seconds When you play back this verification point if the window cannot be found at any time during the 30 seconds the verification point passes If the window is found during the 30 seconds the verification point fails To set the expected result when creating a verification point 1 Start to create a verification point See Starting to Create a Verification Point on page 4 7 2 Inthe Verification Point Name dialog box click Pass or Fail You might also want to add wait state values to the verification point See Setting a Wait State for a Verification Point on page 4 8 Selecting and Identifying the Object to Test 4 10 When you create certain verification points you need to select the object to test You do this by pointing to the object with the Object Finder tool or by selecting the object from a list of all objects on the Windows desktop When you point to an object you can use one of several methods to visually identify the object before you actually select it Selecting the Object to Test There are two ways to select the object to test gt Point to it in the application This is useful for selecting visible objects gt Select it from a list of all objects on the desktop This is useful f
245. jfc After you download the Swing foundation classes install them NOTE When you run the Java Enabler the Swing foundation classes are automatically installed For information see Running the Java Enabler on page 14 5 Installing Swing Under Windows NT 4 0 To install the Swing foundation classes on a computer running Windows NT 4 0 1 Double click the file that you just downloaded to install Swing on your computer Click Start gt Settings gt Control Panel Double click System Click the Environment tab Click CLASSPATH under System Variables au WwW DN Move the cursor to the end of the Value box Type a semicolon and the full path to the swingall jar file This file is installed when you install Swing For example if you installed Swing 1 1 at the root of your C drive you would type the following jc swing 1 1 swingall jar Click Set Click OK Setting Up the Sample Java Applet Installing Swing Under Windows XP or Windows 2000 To install the Swing foundation classes on a computer running Windows XP or Windows 2000 1 a au RF WwW ND Double click the file that you just downloaded to install Swing on your computer Click Start gt Settings gt Control Panel Double click System Click the Advanced tab Click Environment Variables Click CLASSPATH under System Variables and click Edit Move the cursor to the end of the Variable Value box Type a semicolon and the full path to the swingall jar file
246. just a single script consider adding the procedure to the script rather than to a library source file NOTE You can also call procedures in dll files from SQABasic scripts and library files However you cannot use Robot to create and edit dll files as you can sbl and rec files Customizing SQABasic Scripts Creating and Editing sbl Library Source Files To create a new sbl library source file 1 Click File gt New gt SQABasic File 2 Click Library Source File and click OK You name the file or accept the default name the first time you save it A library file cannot have the same name as a script file that calls it For instance Myscript rec cannot call a function in Myscript sbl To edit an existing sbl library source file 1 Click File gt Open gt SQABasic File 2 In Files of type select Library Source Files sbl 3 Click the file to edit and click Open Creating and Editing rec Library Source Files To create a new rec library file 1 Click File gt New gt Script 2 Type the name of the file to create and optionally a description 3 Click the file type GUI if it is not already selected 4 Click OK To edit an existing rec library file 1 Click File gt Open gt Script 2 Click the name of the file to edit and click OK Adding Procedures to the Global Library Source File For your convenience Robot provides a blank library source file called Global sbl You can add procedures
247. k The state of the Windows environment as well as your application under test can affect script playback If there are differences between the recorded environment and the playback environment playback problems can occur Before playing back a script be sure that your application under test is in the same state it was in when you recorded the script Any applications and windows that were open active or displayed when you started recording the script should be open active or displayed when you start playback In addition be sure that any relevant network settings active databases and system memory are in the same state as when the script was recorded 9 3 Playing Back GUI Scripts Setting GUI Playback Options GUI playback options provide instructions to Robot about how to play back scripts You can set these options either before you begin playback or early in the playback process To set GUI playback options gt Open the GUI Playback Options dialog box by doing one of the following Before you start playback click Tools gt GUI Playback Options Start playback by clicking the Playback Script button on the toolbar In the Playback dialog box click Options GUI Playback Options 4 _ For detailed information about an item click the question Wait State Unexpected Active Window mark and then click the item Error Recovery Trap Diagnostic Tools g Playback Log Caption Matching Set
248. kup file before the file is enabled Enable all FMB files in selected directory Enables every fmb file in the directory If this check box is not selected only the fmb file in the Oracle FMB file box is enabled Generate each selected FMB file Generates each fmb file after enabling it If this check box is not selected you need to generate each fmb file from the Oracle Forms 6 0 Builder Oracle Forms 5 0 Builder or Oracle Forms 4 5 Designer after the Enabler runs 12 4 5 10 Making Oracle Forms Applications Testable Click Advanced to open the following dialog box Database Directories General Database connection parameters Userid p Password me Database Ifyou selected the Generate each selected FMB file option type your database connection parameters in the Database tab Click the Directories tab If you need to change the default locations of the Object Testing Library and Oracle home directory select Override Oracle paths in registry Click each Browse button and select the new location Click the General tab Database Directories General Log I White status output to log file Log file ENABLER LOG Browse To send the output in the Status box of the Enabler to a log file that you can view or print select Write status output to log file In the Log file box use the default log file name type a new name or click Browse and
249. l gt You should not add to or remove the columns in the Authentication Datapool gt The Authentication Datapool is not associated with the DATAPOOL CONFIG statement or any datapool commands Managing Proxies If you are using the proxy recording method create a proxy and identify client server pairs that communicate through the proxy After you have defined a proxy relationship you can manage your proxies as follows gt Starting and stopping proxy service gt Monitoring proxy activity gt Deleting a client server pair gt Deleting a proxy gt Reassociating a proxy with a client server pair The following sections describe these functions Starting and Stopping Proxy Service 6 44 Proxy service is a system service that lets you use the proxy recording method Proxy service starts automatically when you gt Install TestStudio gt Start your system gt Open the Session Record Options dialog box and click the Method Proxy tab Proxy service stops automatically when you shut down Windows Managing Proxies Starting or Stopping Proxy Service Generally keep proxy service running even when you shut down Robot If you do need to stop proxy service or start it up again after stopping it follow these steps 1 Click Tools gt Session Record Options Click the Method tab and make sure that Proxy recording is selected Click the Method Proxy tab WN Click Proxy Admin The Proxy Administration dialog b
250. l Testing Products Installation Guide NOTE You do not need to enable applications created in Visual Basic 5 0 and later PowerBuilder or PeopleTools Setting GUI Recording Options GUI recording options provide instructions to Robot about how to record and generate GUI scripts You can set these options either before you begin recording or early in the recording process To set the GUI recording options 1 Open the GUI Record Options dialog box by doing one of the following Before you start recording click Tools gt GUI Record Options Start recording by clicking the Record GUI Script button on the toolbar GUI In the Record GUI dialog box click Options Recording GUI Scripts GUI Record Options 7 For detailed information about Object Recognition Order Web Browser an item click the question General Robot Window mark and then click the item r Script autonaming Prefix l r Identify list selections by Contents Index r Identify menu selections by Text Leo r Record unsupported mouse drags as Mouse clicks if within object Mouse drags I Save window positions T Auto record window size T Record object text I Define unknown objects as type Generic T Record think time I Record delay after Enter key Cancel Help 2 Set the options on each tab 3 Click OK Naming Scripts Automatically Robot can assist you in assigning names to scripts with its script au
251. l machine records traffic from all of the computer s ports To record traffic from a particular port click Manage Computers to define the computer network name and port number of interest Selecting a Network Card If you are using network recording and the Local computer has more than one network interface card installed you must identify the card to use as follows Windows NT 4 0 operating system 1 Click Start gt Settings gt Control Panel Double click the Network icon Click the Bindings tab In the Show Bindings for box select all services OP oR sy In the list of services expand the Rational Test Network Driver item by clicking the icon before it Click the network interface card that you want to use Click Move Up until the selected card is at the top of the list Click OK SOP O00 EN OS Reboot the computer Instead of moving the name of the interface card that you want to use to the top of the list click Disable to disable all of the other interface cards Windows 2000 and Windows XP do not have binding requirements If you have more than one network card installed in a Windows 2000 or Windows XP environment you can create a new connection to the network card you want to use in Network and Dial up Connections For more information refer to the Windows 2000 or Windows XP Help Proxy Recording With proxy recording client server traffic is routed through a proxy computer NOTE This document uses the
252. l the subprocedures in the script CustomVP Variables and constants that are visible to all modules are listed under the heading Globals Deleting Scripts To delete scripts from the project 1 Click File gt Delete 2 Select one or more scripts from the list To change the list of scripts select a query from the Query list 3 Click Delete Click OK to confirm the deletion 4 Click Close Deleting a GUI script from the project also deletes its corresponding script file rec executable file sbx verification points and low level scripts Deleting a virtual user script deletes the s file and its properties but not the associated watch file wch 9 15 Editing Compiling and Debugging Scripts 5 16 gt gt gt Part Ill Developing VU Scripts gt gt gt CHAPTER 6 Setting Recording Options This chapter describes how to choose recording methods set recording options and set script generation options It includes the following topics gt About session recording gt Setting the recording method gt Setting script generation options gt Setting general recording options gt Defining a client or server computer gt Removing a computer or port gt Authenticating logon information p gt Managing proxies About Session Recording A Robot recording session contains all the client requests and server responses issued from the time you begin recording until the time you stop recording Test scr
253. laces selected data on the Example The objects that you should test are the Cut command on the Edit Example You create verification points to test that 1 the Cut command exists on the Edit menu and is enabled and 2 the Clipboard contains the information gt Clipboard gt To test the feature what object or objects should you test menu and the data on the Clipboard gt What kind of verification points do you want to create cut to it gt What type of verification points do you create to accomplish the kind of object testing that you want Example You create a script that contains two verification points an Object Data verification point to test that the Cut command exists on the Edit menu and that the state of the Cut command is enabled a Clipboard verification point to test that the selected information is actually placed on the Clipboard Tasks Associated with Creating a Verification Point 4 6 The following table provides an overview of the major tasks that you perform when you create a verification point and where to look in this chapter for instructions The specific steps depend on the type of verification point that you create Task 1 Start to create a verification point See The next section Starting to Create a Verification Point 2 Set a wait state Setting a Wait State for a Verification Point on page 4 8 3 Set the expected result Setting the Expected Result for a Verific
254. leTools menu object PSNavigator Performs an action on a PeopleTools Navigator window or a navigator map in the PeopleTools Business Process Designer PSNavigatorvP Creates a verification point on a PeopleTools Navigator window or a navigator map in the PeopleTools Business Process Designer PSPanel Performs an action on a PeopleTools panel PSPanelvP Creates a verification point on a PeopleTools panel PSSpin Performs an action on a PeopleTools spin control 16 3 Testing PeopleTools Applications 16 4 Continued Command Description PSSpinvP Creates a verification point on a PeopleTools spin control PSTree Performs an action on a PeopleTools tree object PSTreeHeader Performs an action on a column header in a PeopleTools tree object PSTreeHeadervVP Creates a verification point on a column header in a PeopleTools tree object PSTreevP Creates a verification point on a PeopleTools tree object CHAPTER 17 Testing Delphi Applications This chapter describes the Delphi 3 0 4 0 and 5 0 support in Rational Robot It includes the following topics gt gt gt gt About Rational Robot support for Delphi Making Delphi applications testable Testing a component s properties Testing a component s data About Rational Robot Support for Delphi With Rational Robot you get comprehensive support for testing your Delphi applications With its Object Testing technology Robot examines
255. lets that run in the following environments gt Internet Explorer 4 0 or later with the Microsoft Java Virtual Machine JVM or with the Sun plug in gt Netscape 4 05 or later with the Netscape JVM or with the Sun plug in gt Microsoft Appletviewer gt Sun Appletviewer from the Java Developer Kit JDK 1 1 4 or later Support for Testing Java Applications Robot provides support for testing stand alone Java applications that run in the following environments gt Sun JDK 1 1 4 to 1 3 gt Sun Java Runtime Environment JRE 1 1 4 to 1 3 gt Microsoft JVM jview 3 1 You can create Robot scripts that play back Java applications under Rational Quantify and PureCoverage For information see Setting Diagnostic Tools Options on page 9 11 Supported Foundation Class Libraries With Robot you can test Java objects that are instances of the following class libraries or objects that are derived from any of these class libraries gt Abstract Windowing Toolkit AWT AWT is a collection of core graphical user interface classes that run on any supported Java platform 14 3 Testing Java Applets and Applications gt Java Foundation Class JFC JFC is an extension to AWT that provides additional graphical user interface classes such as Swing Accessibility Drag and Drop Java 2D Java 3D gt Windows Foundation Classes WFC Java programs using WFC components run only on Microsoft JVMs gt
256. lications in a script to start under the same tool This is especially useful if you want to run all the applications under a different tool each time you play back the script For example suppose you have a shell script that calls three scripts Each script starts one application and you want to start them all under Purify When you started each application during recording you would select Using settings from GUI Playback Options dialog box When you played back the script you would select Rational Purify in the GUI Playback Options dialog box The tools options are enabled in the dialog box if the tools are installed Robot uses Set timeout multiplier value to multiply wait state and delay values during playback For information see Setting the Diagnostic Tools Options on page 9 14 Inserting a Call to Another Script While recording or editing a GUI script you can insert a call to a previously recorded GUI script This lets you avoid repetitive actions in the application under test by taking advantage of scripts that already exist To insert a call to a previously recorded script while recording or editing 1 Do one of the following Ifrecording click the Display GUI Insert Toolbar button on the GUI Record toolbar Ifediting position the pointer in the script and click the Display GUI Insert Toolbar button on the Standard toolbar 3 5 Adding Features to GUI Scripts Pa 2 Click the Call Script button on the
257. ling One or All Scripts and Library Source Files 5 8 Batch Compiling Scripts and Library Source Files 5 8 Locating Compilation Errors 00 02 e ee eee 5 9 Debugging GUI Scripts 000 000 5 9 Setting and Clearing Breakpoints 000 5 11 Executing to a Selected Line 0 0 0 cee eee eee 5 13 Executing in Animation Mode 0000000 5 13 Examining Variable Values 0 00 e eee eee 5 13 Deleting Scripts seven eee el ea Site ee ee ieia 5 15 Contents Part Ill Developing VU Scripts 6 Setting Recording Options About Session Recording 0 0 cece cece eee 6 1 Setting the Recording Method 0 00002 e eee 6 2 APE RECOTd IIS a e lit fel E net atad aah wich eat ole A at peel 6 5 Network Recording 0 00 000 c cece eee eee eee 6 6 Proxy Recording 0 cee eee 6 7 Custom Recording o o pn i taeda hep ERE 6 11 Custom Recording for the BEA WebLogic Environment 6 12 Setting Script Generation Options 0 0 0 erene 6 14 Modifying the Contents of a Script 00200 6 14 Script Generation Setting Filtering Options 6 22 Providing Protocol Specific Information 6 27 Setting General Recording Options 000004 6 36 Autonaming Prefixes y onein ie ea Ee A eee ee 6 37 Start Application seeren nare ie o A e ch A biel 6 38 Setting the Recorder Window
258. log box Change a menu command name by editing its text Type an ampersand amp before the letter to be used as the mnemonic accelerator Menu item Text Renatme Change the item type as needed Custom C Separator Menu state C Enabled C Disabled I Checkmark Grayed Change the menu state as needed Cancel Help Restrictions on Editing Data When you edit data in a data grid gt You cannot edit column row or menu titles unless you use the Move column titles to grid or Move top menus to grid option gt You cannot insert additional columns or rows gt You cannot use the Numeric Range verification method because this method does not compare the data to the values in the grid Instead it compares the data captured during script playback according to the From and To values that you specify Editing the data in the grid has no effect Changing a Column Width in a Data Grid 4 22 The column widths in the data grid default to fit the longest data string You can adjust the widths of any of the columns in the grid by dragging the lines between the columns Drag these lines to change column widths Bw customername address 2 ABC Manufacturing Inc 23 Broadway Dayton 3 Acme Metal Working Corp 909 East Greenway Concord Tala Woodworking Ltd 542 Great venue Needham 5 Barrymore Company 8431 Main Street New xok m 4 Editing a Verifica
259. lopment Phase 0 0 00 2c ee eee 9 2 Regression Testing Phase 0 00 cece eee eee 9 2 Restoring the Test Environment Before Playback 9 3 Setting GUI Playback Options 0 0 00 e ee eee 9 4 Acknowledging the Results of Verification Point Playback 9 5 Setting Log Options for Playback 000 9 5 Setting Wait State and Delay Options 9 7 Setting Error Recovery Options 00 000 9 9 Setting Unexpected Active Window Options 9 10 Setting Diagnostic Tools Options 0005 9 11 Rational Robot User s Guide Setting the Trap Options to Detect GPFs 9 17 Playing Back a GUI Script 0 0 eee eee 9 19 Viewing Results in the TestManager Log 4 9 21 Analyzing Verification Point Results with the Comparators 9 22 10 Working with Datapools What Is a Datapool 0 eee eee 10 1 Data pool Tal s t i ie Ba eh E E E bea E E eh lh 10 2 Datapool Cursors ith Bo RN hoa Meth Moya 10 3 Datapool Limits 0 cee eee eee 10 4 What Kinds of Problems Does a Datapool Solve 10 4 Planning and Creating a Datapool 0000s 10 5 Data TYPES wigs EE pone cd oe Sh here MaRS hen Pe Ras 10 9 Standard and User Defined Data Types 0 4 10 9 Finding Out What Data Types You Need 10 10 Creating User Defined Data Types 0 10
260. ly the start_time emulation command is inserted after the first action but with an argument to use a read only variable that refers to the start of the first action gt The ID of every emulation command in a block is constructed the same way that is by the block name followed by a unique three digit auttonumber Blocks For example in the VU language http_header recv BlockName002 200 When you end a block command IDs are constructed as they were before you started the block For example if the last command ID before the block was Script025 the next command ID after the block is Script026 A block ends with a stop_time command plus a comment For example in the VU language stop time BlockName Stop Block A script can have up to 50 blocks When you end a block Robot automatically ends the current block In other words blocks can be nested but they cannot be overlapped For example Valid Blocks Invalid Blocks Block1Start Block1Start Block2Start Block2Start Block2Stop Block1Stop Block1Stop Block2Stop You cannot extend a block over multiple scripts If you attempt to split a script in the middle of a block Robot ends the block when it ends the initial script Why Use Blocks You might use blocks for the following reasons gt To associate the block and timer names with the emulation command that performs the transaction To include the block name in TestManager reports thus enabl
261. memory leak of 33 bytes from 1 block allocated in std 10 17 00 12 57 10 PM fiov7700 124851 PM Purify E FMM Freeing mismatched memory in free 1 occurrence 10 17 00 12 57 10 PM Purify E FMM Freeing mismatched memory in free 1 occurrence 10 17 00 12 57 10 PM Purify Exiting with code 0 000000000 10 17 00 12 57 10 PM Purify Program terminated at 10 17 00 12 52 46 10 17 00 12 57 10 PM Application Start 10 17 00 12 57 12 PM Quantify Elapsed Time 226836 ms 10 17 00 01 00 43 PM Quantify Measured Cycles 140455 0 ms 10 17 00 01 00 43 PM Quantify Timed Cycles 510159413207 10 17 00 01 00 43 PM Purify Summary 4 err rigs n 10 M Quantify Summary 0 errors 0 wamings i 10 17 00 01 00 43 PM Coverage Summary 0 errors 0 warnings 0 informationals 10 17 00 01 00 43 PM Script End POC 10 17 00 01 00 44 PM Computer End 10 17 00 01 00 44 PM Test Case Results Details B E E Test Plans H E Iterations p K Planning Execution E4 Results 9 Analysis Ready admin Currentlv Selected Fiter Z Astat y Exploring Oracle tryit 0 Rational ClearQuest RA BP e testitest rsp Rational ER test Rational TestM RER 1 03PM A summary line at the end of the log indicates the total number of errors warnings and informational messages for each tool The highlighted line in the figure above is an example of a summary line Double click a log event to open up both gt The script in Ro
262. method 4 15 Authentication Datapool 6 41 features 6 44 modifying with Robot during recording 6 43 modifying with TestManager 6 42 when to modify 6 42 automatic protocol filtering 6 24 automatic timing blocks 8 4 emulation commands 8 2 autonaming GUI scripts 2 6 autonaming scripts and sessions 6 37 batch compiling scripts and library source files 5 8 BEA WebLogic 6 12 blocks 8 4 adding during recording 8 6 nesting 8 6 breakpoints setting and clearing 5 11 Browser NewPage command 13 16 browsers playing back scripts in Internet Explorer 13 2 playing back scripts in Netscape Navigator 13 13 recording scripts in Internet Explorer 13 2 recording scripts in Netscape Navigator 13 2 Build tab of Output window 5 9 built in data tests A 1 By Content identification method 4 16 By Key Value identification method 4 17 By Location identification method 4 16 By Title identification method 4 16 Index 1 Using Rational Robot C C applications enabling for testing 2 5 recognition order preference 2 9 C Recognition Order preference 2 9 cache enabling for Netscape recording 13 4 cached responses in HTTP scripts 6 27 calling scripts from within scripts 3 5 Case Insensitive verification method 4 14 Case Sensitive verification method 4 14 changing object class mappings 2 14 script properties in Robot 2 23 clearing breakpoints 5 11 client computers associating with a server 6 11 defining for network or proxy
263. mn value pairs If there are no key columns Robot uses as many column value pairs as necessary to uniquely identify the clicked row starting with the leftmost column In PowerBuilder the value of any property of a DataWindow or DataWindow subobject can be an expression For example you can have the background color of a DataWindow dynamically vary based on a formula or comparison If a property s value comes from an expression an Object Properties verification point performed on a DataWindow returns both the current value and an Expression property whose value is the expression In this case you can test the actual result and the expression itself Testing DataStore Controls and Hidden DataWindows For example if the value of Background Color is an expression an Object Properties verification point returns both gt The Background Color property with a value that is the actual result of the expression gt The Background Color Expression property with a value that is the expression The value of an Expression property is always a string Selected Object D WColumn Name sales_rep Objects DWColumn Name sales_rep Properties E L DropDownDatawWindow DropDown Alignment 0 Left g H DW Column Name emp_Iname Background Color C IRGB 255 2554 Current color E H DW Column Name emp_fname Background Color Expression _ if lsRowModified L Expression E H DWT ext Index 1 VisualT ext Nam B
264. more Company 8431 Main StretNew York Barrymore Company 8431 Main Stret New York Baseline Playback Pass By Title Use this method to verify that the recorded values remain with their titles names of menus or columns during playback even though the columns may have changed locations Tasks Associated with Creating a Verification Point The following figure shows baseline data captured using By Title During playback the verification point passes because the recorded values under the menu title remain the same even though the File and Edit menus have changed positions File Edit Edit File New Ak Undo Ctrl4 Z Undo Ctri New Ctrl N Open Ctrl 0 Open Save Ctl S Cut Ctrl X Cut Ctrl X Save Ctrl S Save As Copy Ctrl C Copy Ctrl C Save As Paste Ctrl V Paste Ctrl Baseline Playback Pass By Key Value Use this method to verify that the recorded values in a row remain the same during playback This method is location independent If rows are added or deleted the verification point passes as long as the recorded values in the row remain the same This method also lets you add up to eight keys to the columns in the data grid The keys function like a primary key in a database table Each key uniquely identifies a column so that Robot can easily locate and retrieve the records you select If you add a key to a column Robot searches for the recorded values in the key column during playback After Robot loca
265. mponents with the Object Data verification point Robot includes several Java specific object types for testing Java components including JavaPanel JavaWindow JavaSplitPane JavaMenu JavaPopupMenu JavaTable JavaTableHeader and JavaTree Robot scripts can be played back on a variety of Windows platforms including Windows NT 4 0 Windows XP Windows 2000 and Windows 98 and are transportable across the various Java platforms The following matrix presents an overview of the Java support in Robot Supported Class Libraries Sun JDK 1 1 1 2 1 3 Java Virtual Machines JVM Microsoft Java SDK 3 1 Netscape 4 x Applets only AWT AWT AWT JFC Swing JFC Swing JFC Swing WFC Symantac Visual Cafe Symantac Visual Cafe Symantac Visual Cafe KL Group KL Group KL Group Extensibility Extensibility Extensibility For information about support for additional Java environments and foundation classes see the Rational Web site at www rational com About Robot Support for Java Robot Support for Testing Java Applets and Applications A Java applet is a Java program embedded inside a Web page or displayed with an applet viewer Java applications are stand alone programs that require a Java Virtual Machine JVM in order to run Java applications create their own windows and are not embedded inside Web pages Support for Testing Java Applets Robot provides support for testing Java app
266. n 007 sting 20 INCLUDE PRODUCTS_COMPOSER_1 string Beethoven V008 string 379 80 xV010 prea Order Initiated INCLUDE xV001 string addee INCLUDE xV001_1 string INCLUDE xVO002 string OVERRIDE xV003 string INCLUDE xV004 string INCLUDE xV005 string INCLUDE xV006 string INCLUDE xV007 string INCLUDE xVO008 string Save E 4 TIED tis A ceo 7 00270 014 Admin A For more information about the parts of the DATAPOOL_CONFIG section of a script see the description of DATAPOOL_CONFIG in the VU Language Reference NOTE Typically a script has just one DATAPOOL CONFIG section If a script has multiple DATAPOOL CONFIG sections for example to accommodate a script that accesses multiple databases and servers the Configure Datapool in Test Script dialog box accesses the first one To edit the others you must edit the script directly 10 15 Working with Datapools 10 16 Modifying DATAPOOL_CONFIG Use the following table to help you define the fields and columns in the Configure Datapool in Test Script dialog box see step 3 in the previous instructions Field or Column Description Datapool name The name assigned to the datapool The datapool name defaults to the script name You cannot modify Datapool name Wrap at end of file Sets the action to take after the last row in the access order is reached gt Yes
267. n Insert toolbar The Session Record and Session Insert toolbars can be enabled for custom recording For more information refer to the Session Recording and Script Generation Extensibility Reference If Problems Occur During Script Generation If problems occur during script generation the following message appears in the status bar of the Generating Scripts dialog box Completed with warnings and or errors To see the list of errors click Details If the text of an error is truncated do one of the following gt Double click the text to see the entire message gt Press CTRL C to copy the text to the Clipboard Providing a Missing Password 7 6 During recording if you provide a user ID and password required to access the database Robot attempts to detect this login information If Robot detects this login information it writes the information to the Authentication Datapool During script playback TestManager checks the Authentication Datapool whenever an emulated user needs to provide a valid user ID and password when accessing the database If Robot cannot detect a password that you provided during recording and it cannot find a valid password for the associated user ID in the Authentication Datapool Robot prompts you to provide the password just before generating the scripts you recorded Recording a Single Script in a Session Robot prompts you to provide each password that it could not detect one by one in the
268. n access the following properties Object Type Properties List of values LOV X_Pos Y_ Pos Auto_Refresh Group_Name Width Height Record group Row_Count Selection_Count The following example uses the SQAGet Property command to assign the value of the Group_ Name property of an LOV object to a variable called Value Sub Main Dim Result As Integer Dim Value As Variant Window SetTestContext Name OracleRootWindow Result SQAGetProperty Type Form Name FORM NAME Type LOV Name LOV_NAME Group Name Value MsgBox Value End Sub 12 13 Testing Oracle Forms Applications Testing an Object s Data You can use the Object Data verification point to test the data in the following Oracle objects gt Base table blocks and items gt LOV and record group objects NOTE Before you can test an Oracle Forms application run the Enabler For instructions see Making Oracle Forms Applications Testable on page 12 2 For instructions about testing an object s data see Object Data Verification Point in the Robot Help Index Testing Base Table Blocks and Base Table Items 12 14 Several predefined data tests are supplied with Robot to test any base table block or base table item These tests include gt Current Record Captures the currently selected record gt Displayed Records Captures the currently displayed records gt Entire Table Captures the entire contents of the database table asso
269. n scripts and files Click File gt Save All You can save only within the current project Printing a Script or SQABasic File To print an open script or SQABasic file 1 Ifnecessary click File gt Page Setup to set up the format of printed output To add information to the page header or footer use print codes For a description of these codes click the Help button in the Page Setup dialog box 2 Click File gt Print 3 Set the print options as needed and click OK Robot uses standard Windows Print Setup dialog boxes For more information see your Windows documentation Compiling Scripts and SQABasic Library Source Files When you play back a GUI script or virtual user script or when you debug a GUI script Robot compiles the script if it has been modified since it last ran You can also compile scripts and SQABasic library source files manually Editing Compiling and Debugging Scripts Compiling One or All Scripts and Library Source Files You can compile the active script or file or you can compile all scripts and files in the current project To Do This Compile the active script or library Click File gt Compile source file Compile all scripts and library source Click File gt Compile All files in the current project Use this if for example you have made changes to global definitions that may affect all of your SQABasic files Batch Compiling Scripts and Library Source F
270. n styles FreeForm Grid OLE RichText and Tabular Robot records coordinates for all other DataWindow presentation styles and for DropDownListBoxes Value Based Recording By using value based recording Robot lets you record actions on a DataWindow and lets you play back those actions regardless of the position of records in the database Value based action parameters are written to a script as column value pairs using either the column number or the column name 15 3 Testing PowerBuilder Applications Testing an Expression Value of a DataWindow Property 15 4 In the following example when you select a cell in the tabular DataWindow Robot records a column value pair to uniquely identify the row that was clicked If you select this cell DataWindojw Address Zipcode Telephone 23 Broadway 44234 216 888 1234 i Acme Metal Working Corp B09 East Greenway Rand A1 Woodworking Ltd 642 Great Avenue Needham Barrymore Company 6431 Main Street New York i Robot writes this in the script DataWindow Click Name dw_customer_info Name customername E ColName customerid Value 1 The column value pair identifies the clicked row This script shows that Robot recorded a Click Inthe DataWindow dw_customer_info Inthe column customername Inthe row witha customerid of 1 Robot detects which columns in a DataWindow are key columns and then uses the key columns in the colu
271. n the suite automatically generates the proper script commands to extract their actual values Before you record a script you can tell TestManager to correlate all possible values the default not to correlate any values or to correlate only a specific list of variables that you provide To specify the level of data correlation 1 Click Tools gt Session Record Options 2 Click the Generator per protocol tab 3 At Correlate variables in response select one of the following a All All variables are correlated You should generally select this option Select another option only if you encounter problems when you play back the script b Specific Only the variables that you select are correlated c None No variables are correlated If you select All or Specific your generated VU or VB scripts contain the function http find values This function finds the value of items that the server returns and the user does not change It then correlates these values and places them in a system defined variable in the form SgenRes_00n Examine the script to determine whether the proper values are correlated If you want fewer values to be correlated change the Correlate variables in response option to Specific and then use the Add and Remove buttons to select only the names that you want to correlate For example assume you enter data in a form during recording and the form has a field that you cannot modify for example UNITED ST
272. nce Testing with Rational TestManager 1 13 Managing Requirements with Rational RequisitePro 1 13 Hosting Robot Applications on a Terminal Server 1 14 Starting Robot and Its Components 0 000004 1 14 TOSSING OM reed Spates eh Os witch Gat eae ME ire enh eee oh 1 14 Opening Other Rational Products and Components 1 16 Tasks You Can Perform with Robot and Its Components 1 17 Rational Robot User s Guide Part Il Developing and Playing Back GUI Scripts Recording GUI Scripts The Recording Process 000 0000 c cece ee eee eee eee ee 2 1 The Recording Workflow 0 0 00000 c eee eee eee 2 2 Before You Begin Recording 0 eee eee ee 2 2 Establishing Predictable Start and End States for Scripts 2 3 Setting Up Your Test Environment 2 3 Creating Modular Scripts 0 0 0 0 cece eee eee 2 3 Creating Modular Scripts with UNC 4 2 4 Enabling IDE Applications for Testing 000 2 4 Setting GUI Recording Options 0 0 0002 us 2 5 Naming Scripts Automatically 0 0 0000004 2 6 Controlling How Robot Responds to Unknown Objects 2 7 Selecting an Object Order Preference 00000 2 9 Using Advanced Features Before Recording 2 11 Customizing the Object Recognition Method Order 2 11 Mapping Object Types and Classes Before Recording
273. nd click Rename Type the new name and press ENTER Click the top of the script in the Script right pane Click Edit gt Replace uF wer Type the old name in the Find what box Type the new name in the Replace with box 6 Click Replace All 4 25 Creating Verification Points in GUI Scripts Copying a Verification Point 4 26 You can copy a verification point into the same script or into another script in the same project Copying a verification point involves two tasks gt Copying the verification point name in the Asset pane in one script and pasting it into the Asset pane in the same script or a different script This puts a copy of the verification point and its associated files in the project Copying the verification point command from the script and pasting it into the same script or a different script To copy a verification point 1 2 Right click the verification point in the Asset left pane and click Copy In the same script or in a different script in the same project right click Verification Points in the Asset pane Click Paste to paste a copy of the verification point and its associated files into the project If a verification point with that name already exists Robot appends a unique number to the name You can also copy and paste by dragging the verification point to Verification Points in the Asset pane Click the top of the Script right pane of the original script Click
274. nds or toolbar buttons Some of the Edit menu commands are disabled if you are debugging To stop debugging click Debug gt Stop Adding a User Action to an Existing GUI Script ml User actions are actions such as keystrokes and mouse clicks that help you navigate around the application After you record a script you might decide to add new user actions such as selecting a menu command to the script To add a new action to an existing script 1 If necessary open the script by clicking File gt Open gt Script If you are currently debugging click Debug gt Stop In the Script window click where you want to insert the new actions Make sure that the application under test is in the appropriate state to begin recording at the text cursor position 4 Click the Insert Recording button on the Standard toolbar The Robot window minimizes by default or behaves as specified in the GUI Record Options dialog box 5 Continue working with the application under test as you normally do when recording a script Adding a Feature to an Existing GUI Script Features you might want to add to an existing script include verification points timers and comments You can easily add these features while you are recording a script or after you finish recording To add a feature to an existing GUI script 1 If necessary open the script by clicking File gt Open gt Script 2 Ifyou are currently debugging click Debug gt Stop Wo
275. ng Supported Data Tests for HTML Testing The following table describes the data tests that are available for each Robot object type supported in the HTML environment For information about creating your own data tests see Appendix A Working with Data Tests Robot Object Type Supported Data Test Description of Data Test PushButton Contents Captures and compares visible text CheckBox RadioButton HTMLtText Captures and compares the HTML source EditBox ComboBox Contents Captures and compares the text of all items in the box ListBox ItemData Captures and compares the value attribute in the HTML source HTMLText Captures and compares the HTML source HTMLLink Contents Captures and compares the href of the anchor that is the URL of the destination HTMLText Captures and compares the HTML source HTMLImage HTMLText Captures and compares the HTML source of the image HTMLDocument Contents Captures and compares the visible text of the entire document including text in all of the elements in HTML forms such as list boxes and combo boxes HTMLText Captures and compares the HTML source of the entire document Document URL Captures the URL of the document Document Title Captures the title of the document HTMLTable Contents Captures and compares the visible text of the entire table HTMLText Captures and compares the HTML source of the table HTMLActiveX None 13 11 Testing HTML Applic
276. ng To use the network recording method 1 Click Tools gt Session Record Options 2 Click the Method tab and click Network recorder Click the Method Network tab and select the client server pair that you will record The default is to record all of the network traffic to and from your computer For information see Selecting a Client Server Pair below 4 Click the Generator Filtering tab to specify the network protocols to include in the script that Robot generates For information see Script Generation Setting Filtering Options on page 6 22 Selecting a Client Server Pair The Method Network tab contains the following lists of computer addresses Select one item in each list Client The client s network name or IP address and optionally the port number Server The server s network name or IP address and optionally the port number Ifa computer that you want to specify is not listed define the computer as described in Defining a Client or Server Computer on page 6 39 You can choose Any or Local machine instead of a specific computer name gt Ifyou select Any for either the client or the server Robot records traffic for all clients or all servers on the network gt Ifyou select Local machine for the client the default Robot records traffic from the Local computer Robot determines the computer s network name automatically You do not have to specify it Setting the Recording Method Loca
277. ng keystrokes to the application Setting GUI Playback Options To set the delay options for commands and keystrokes 1 Open the GUI Playback Options dialog box See Setting GUI Playback Options on page 9 4 2 Click the Playback tab Playback Log Caption Matching Script control 00 miliseconds C Use recorded think time l Delay between keystrokes fo a milliseconds C Use recorded typing delays 3 Click Delay between commands Type the delay value This is the delay between each user action command and between each verification point command during playback Click Delay between keystrokes Type the delay value Click OK or change other options Setting Error Recovery Options Use the error recovery options to specify how Robot handles script command failures and verification point failures To set the error recovery options 1 Open the GUI Playback Options dialog box See Setting GUI Playback Options on page 9 4 2 Click the Error Recovery tab Error Recovery Trap Diagnostic Tools m On script command failure C Continue execution Skip current script m On verification point failure Continue execution Skip current script Abort playback Playing Back GUI Scripts 3 To specify what Robot should do if it encounters a failure click one of the following options under both On script command failure and On verification point failure Continue ex
278. nges to the recognition method order are stored in the project For example if you change the order for the CheckBox object the new order is stored in the project and affects all users of that project Using Advanced Features Before Recording Creating a New Object Order Preference Robot has two predefined object order preferences lt Default gt and C Recognition Order You can create additional preferences to handle special situations To create a new object order preference 1 In an ASCII editor create an empty text file with the extension ord Save the file in the Dat folder of the project Click Tools gt GUI Record Options Click the Object Recognition Order tab From the Object order preferences list select the name of the file you created Ore OT Ss lS Change the method order to customize your preferences Mapping Object Types and Classes Before Recording As explained in Controlling How Robot Responds to Unknown Objects on page 2 7 Robot recognizes all standard Windows GUI objects and many custom objects You can also set a recording option so that Robot either automatically maps unrecognized objects to the Generic object type or stops during recording so that you can map the object to a standard object type If you know in advance that the application under test contains a custom object or any object that Robot does not recognize you can create a custom object mapping before you start recording You do this by
279. not open click File gt Open gt Script Select the script and click the Properties button In the Script Properties dialog box define the properties For detailed information click Help Click OK If you record over an existing GUI script you overwrite the script file however any existing properties are applied to the new script Coding a GUI Script Manually By far the fastest and easiest way to generate a GUI script is to let Robot record your actions and generate the script automatically However you can also manually code a GUI script using the SQABasic scripting language To code a script manually 1 2 In Robot click File gt New gt Script Type a script name 40 characters maximum and optionally a description of the script Click GUI 2 23 Recording GUI Scripts 4 Click OK Robot creates an empty script with the following lines Sub Main Dim Result As Integer Initially Recorded 01 17 00 14 55 53 Script Name GUI Script End Sub 5 Begin coding the GUI script For information about using the SQABasic scripting language see the SQABasic Language Reference In Robot click Help gt SQABasic Reference Testing Your Recorded Script After you record a script you can p gt Play it back using the same version of the application under test gt Edit and compile it gt Debug it These steps are described briefly in the following sections Playing Back the Script After
280. nsert the Rational Suite CD ROM into your CD ROM drive 2 Do one of the following From the Windows taskbar Choose Start gt Run From Program Manager Choose File gt Run Type drive SETUP EXE and choose OK to start the Rational Setup wizard When the list of Rational Test Enablers appears choose Rational Test Delphi Enabler 5 Follow the onscreen instructions to complete the installation Running the Rational Test Delphi Enabler 17 2 After you install the Object Testing Utilities run the Delphi Enabler which adds one line of code to your project and compile the project You only need to run the Enabler once for each project you want to make testable NOTE The Rational Object Testing Library is not visible is nonintrusive and has no license restrictions on it Therefore you can leave it in the application when you distribute it Making Delphi Applications Testable Adding the Rational Object Testing Library To add the Object Testing Library to your project 1 Click Start gt Programs gt Borland Delphi gt Rational Test Delphi Project Converter to open the Enabler Click Browse under Delphi Project Select the project you want to make Robot testable and click OK Choose the correct compiler version depending on which version of Delphi you have installed on your computer Select Add Rational Object Testing Library Optionally uncheck Backup Project File if you don t want a backup file to
281. nt playback expectations from those used in the original script When you regenerate scripts you cannot add client server requests to those that you originally recorded However you can remove some recorded requests through protocol filtering NOTE Script names resulting from regeneration are set at recording When you regenerate a session s scripts you overwrite all of the previously generated scripts in the session For example to change options in the Generator tab 1 Click Tools gt Session Record Options Click the Generator tab Specify the script options to include in the new script and then click OK PF WN Click Tools gt Regenerate Test Scripts from Session to regenerate the script Viewing Session Properties 7 20 Session properties include the list of scripts in the session and a description of the session While viewing a session s properties the only session property that you can modify is its description Other session properties are automatically defined when you create the session To view and optionally modify session properties while you are regenerating a session s scripts in Robot 1 Click Tools gt Regenerate Test Scripts from Session Click the name of the session whose properties you want to view Click Properties AWN When finished click OK to save any changes or click Cancel Coding a Script Manually 5 In the Regenerate Test Scripts from Session dialog box click Cancel
282. o obtain the most up to date Java support simply rerun the Java Enabler To run the Java Enabler 1 Make sure that Robot is closed 2 Click Start gt Programs gt Rational product name gt Rational Test gt Java Enabler 3 Select one of the available Java enabling types JavaEnabler Types x Please select the type of JavaEnabling you want Repository lt Not Yet Selected gt f Quick This method only searches existing Java i aa Environments in the registry for enabling A Complete es This method searches all the system drives for java environments to enable NOTE this process can take a few minutes Web Update Check the web for the latest JavaEnabler Special Java Proxies m Enable proxies stored in the Rational repository 14 5 Testing Java Applets and Applications 14 6 Rational Test Enabler for Java Select the environments to enable The following environments for Java testing have been found Please select those you wish to enable Components Netscape 4 8 0 2 1 v lExplorer 4 72 3110 0 1 Description C Program chance Files Netscape Communicator program nets Space Required 19K Space Available 0 KB Click Next Click Yes to view the log file NOTE Ifthe Java Enabler does not find your environment you must upgrade to one of the supported versions and rerun the Java Enabler For a list of supported environments see About Robot Support fo
283. o remove Click Edit and make the changes Click Close Authenticating Logon Information If you are running tests against a database that requires a user ID and password you must provide them when the script is recorded and when the script is played back 6 4 Setting Recording Options During recording Robot detects the user ID password and other logon information When successful Robot stores this information in an Authentication Datapool In addition Robot adds the user ID but not the password to the script During playback when a user ID and password are required for a database Robot finds the user ID in the script and then finds a password in the Authentication Datapool that is associated with the user ID Robot uses the first active password that it finds for the user ID When to Modify the Authentication Datapool If Robot detects the user ID password and other login information provided during recording it updates the Authentication Datapool automatically If your login information does not subsequently change you never need to modify the Authentication Datapool However there are times when modifying the Authentication Datapool is necessary gt If Robot cannot detect the password during recording For example Oracle passwords are almost always transmitted in encrypted form As a result you typically need to enter Oracle passwords into the Authentication Datapool p gt Ifyou change your password after
284. object To set the method De 1 Ifrecording click the Open Robot Window button on the GUI Record toolbar to restore the Robot window 2 Click Tools gt General Options and click the Preferences tab Inverts screen colors as you point to an object ENitor Preferences Object Mapping Displays a TestTip that describes the al ese eeen nacar object type as you point to an object i for example PushButton niat erei bins meneeng i i Displays a TestTip that describes both the object type and the object recognition method as you point to an object Show recognition method V Show development environment Displays the development environment name if known in the TestTip NOTE To change the selection indicator temporarily while pointing to objects press CTRL or SHIFT Creating Verification Points in GUI Scripts Selecting a Verification Method When you create certain verification points you can select a verification method The verification method specifies how Robot compares the baseline data captured while recording with the data captured during playback Object Data Verification Point ioj x Selected object ListView ObjectIndex 1 Data test Contents Verification method Select a verification _ _ICase Sensitive z method to specify how fal Robot compares the data Case Sensitive Case Insensitive Numerical Equivalence Numerical
285. object information and compares it with the baseline NOTE This section gives an overview of how to insert a verification point For detailed information about verification points see Chapter 4 Creating Verification Points in GUI Scripts Inserting Verification Points To insert a verification point while recordin or editin a script 8 8 fo 1 Do one of the following Ifrecording click the Display GUI Insert Toolbar button on the GUI Record toolbar Ifediting position the pointer in the script and click the Display GUI Insert Toolbar button on the Standard toolbar 2 Click a verification point button on the GUI Insert toolbar ua E 0 Atie Fab PpPBeAey un ee 2 S4RE Ge 2 53 s S 3 2 7 Zy amp a o a 5 S og 5 3 xe YD YW ot oO 2 T e os 4 oq 3 en a a on D L oa Ssa g e T R me R E NOTE To insert a File Comparison File Existence or Module Existence verification point open the Robot window click the Open Robot Window button on the GUI Record toolbar Click Insert gt Verification Point and the appropriate menu command 3 Inthe Verification Point Name dialog box edit the name of the verification point as appropriate Robot automatically names the verification point with the verification point type and adds a number if there is more than one of the same type in the script 3 7 Adding Features to GUI Scripts Verification Point Name 27x Name W Wait state
286. objects in your program as given in the Visual Basic source code and use those names for object recognition gt Capture properties of Visual Basic objects using the Object Properties verification point gt Capture the data underlying a Visual Basic data control using the Object Data verification point As an example suppose you have a label in a Visual Basic form If you click the label during Robot recording the label s name appears in the Robot script If you create an Object Properties verification point on the label the label s name is captured The name by which Robot identifies the object is the same as its Visual Basic name as shown in the Visual Basic Properties window Testing Visual Basic Applications Label Label z Alphabetic JcseoneedT IM The object name that appears in D Left JustiF the Visual Basic Properties window 1 3D False Tl gaani Label Click Name Label1 is the same name that appears in the Robot script when you click the object Object Properties Verification Point ojx Selected object Label Name Labell Properties Edit List Eti and the same name that is captured when you create an Object Properties verification point on the object OLEDropMode 0 None RightToLeft False Tablndex 0 I Show verification method Cancel Recaptue Help NOTE To test Visual Basic 4 0 applications add the Rational ActiveX Test
287. obot looks for file sets to import If a file of the same name with one or more of these four extensions resides within the same directory Robot imports all of the files For example if you have a test wch test xml test ids and test ext file in the same directory Robot imports all four of the files To import only one file either rename the file or move it to another directory Exporting a Session To export a session from the current test datastore to any location within the computer s file system 1 Click Tools gt Export Session 2 Click the session to export 7 18 Working with Sessions 3 Type in the export path or click Browse to select the export path 4 Click OK Robot exports four session file types watch files wch XML files xml annotation files ids and extension files ext File sets are exported so any files specified for export with any of these four extensions that have the same name are exported To export only one file either rename the file or move it to another directory Regenerating Scripts from a Session You might want to regenerate a session s scripts for a variety of reasons for example to overwrite edits you made to the original scripts restoring the scripts to the original recorded transactions or to change the script generation options When you regenerate scripts from a session the regenerated scripts inherit the properties of the original scripts At any time yo
288. of a new script record the script first After recording click File gt Properties For more information see Defining Script Properties on page 2 23 Click OK to start recording The following events occur Ifyou selected a script that has already been recorded Robot asks if you want to overwrite it Click Yes If you record over a previously recorded script you overwrite the script file but any existing properties are applied to the new script Robot is minimized by default For information see Restoring the Robot Main Window During Recording on page 2 18 The floating GUI Record toolbar appears You can use this toolbar to pause or stop recording display Robot and insert features into a script For more information see Using the GUI Record and GUI Insert Toolbars on page 2 19 Start the application under test as follows a Click the Display GUI Insert Toolbar button on the GUI Record toolbar b Click the appropriate Start button on the GUI Insert toolbar c Fill in the dialog box and click OK NOTE It is essential that you start the application correctly depending an the type of application and how you plan to play it back For information see Starting an Application on page 3 1 Recording a New GUI Script 10 Perform actions as needed to navigate through the application 11 Insert features as needed You can insert features such as verification points comments and timers For information
289. og Event column The result appears in the Result column To view the description select the log event and click View gt Properties Click the Result tab Inserting Delay Values 3 12 During playback of a GUI script Robot adds a delay value between each user action command and between each verification point command You can set this value in the Playback tab of the GUI Playback Options dialog box For more information see Setting Wait State and Delay Options on page 9 7 At times during playback you may need to have Robot pause for a specific amount of time before executing a particular command For example an additional delay may be necessary if the application accesses a network server printer or other remote system In these cases if script playback does not wait it can become out of sync with the application by executing script commands before the application is ready for them When you insert a delay value into a script the script waits for the amount of time you specified before playback continues This delay is useful when you can calculate the amount of time needed for a process to finish before playback resumes Using the Insert Menu NOTE Ifyou are testing an application in which time estimates are not predictable you can define a wait state for a verification point instead of inserting a delay value With a wait state playback waits based on specific conditions rather than on absolute time For more information
290. oject outside of configuration management Connect to a project See projects that are not on your machine register a project Delete a project Create and manage users and groups for a Rational Test datastore Create and manage projects containing Rational RequisitePro projects and Rational Rose models Manage security privileges for the entire Rational project Create a test datastore using SQL Anywhere See Notes below What Is Rational Robot gt Convert an existing Microsoft Access test datastore to a SQL Anywhere test datastore NOTE When you create a test datastore the Rational Administrator uses Microsoft Access for the default database engine However if more than one user will access the test datastore simultaneously use Sybase SQL Anywhere for the database engine To create a test datastore using SQL Anywhere software click Advanced Database Setup in the Create Test Datastore dialog box See the Rational Administrator online Help for more information NOTE You must install Sybase SQL Anywhere software and create a SQL Anywhere database server before you create a new SQL Anywhere test datastore or convert an existing Microsoft Access test datastore to a SQL Anywhere test datastore For information about installing SQL Anywhere software and creating a SQL Anywhere database server see Rational Testing Products Installation Guide To manage a Sybase SQL Anywhere database server see the Sybase Help The followin
291. ols NOTE This chapter describes datapool access from scripts played back in a TestManager suite For information about datapool access from GUI scripts played back in Robot see the online help for Rational Robot What Is a Datapool A datapool is a test dataset It supplies data values to the variables in a script during script playback Datapools let you automatically pump test data to virtual testers under high volume conditions that potentially involve hundreds of virtual testers performing thousands of transactions Typically you use a datapool so that gt Each virtual tester that runs the script can send realistic data which can include unique data to the server gt Asingle virtual tester that performs the same transaction multiple times can send realistic data to the server in each transaction 10 1 Working with Datapools If you do not use a datapool during script playback each virtual tester sends the same literal values to the server the values that were captured when you recorded the script For example suppose you record a session script that sends order number 53328 to a database server If 100 virtual testers run this script order number 53328 is sent to the server 100 times If you use a datapool each virtual tester can send a different order number to the server Datapool Tools You create and manage datapools with either Robot or TestManager as follows Activity Robot TestManager Automa
292. om custom recordings are also stored in the test datastore Recording a Single Script in a Session Restoring Robot During Recording When you begin recording Robot becomes minimized by default allowing you unobstructed access to the client application At any time during recording you can restore the Robot window without affecting the client server traffic you are recording by using one of the methods listed below For example you might want to restore the Robot window to insert features such as timers blocks and synchronization points through the Robot Insert menu rather than through the floating toolbar When Robot is minimized during recording or is hidden behind other windows during recording bring it to the foreground in one of the following ways p gt Click the Open Robot Window button on the Session Record floating toolbar gt Click the Robot icon on the Windows taskbar gt Use the standard Windows ALT TAB key combination Recording a Single Script in a Session Use the following procedure to record a single script in a session 1 In Robot click the Record Session button Alternatively click File gt Record Session or press CTRL SHIFT R 2 Type the session name 40 characters maximum or accept the default name Specify the script name when you finish recording the script If you have not yet set your session recording options do so now by clicking Options 3 Click OK in the Record Session Enter Sess
293. om the server Last You cannot use Last with HTTP or socket protocols Ifyou select Last enter the number of rows to retrieve in the box that appears to the right of the Display recorded rows list Display recorded rows Last 100 None Do not insert any retrieved data into the script Display recorded rows is supported only for Sybase SQL Server ODBC HTTP TUXEDO and socket protocols Verify Playback Row Counts This option specifies whether rows affected by a SQL statement or the number of bytes affected by a request to a Web server are inserted into the script This information helps you determine whether the statement or request executed during playback behaves as it did during recording If a different number is returned during playback the Test Log window notes the discrepancy 6 17 Setting Recording Options 6 18 Verify playback row counts has the following meanings State of check box Meaning The check box is selected Insert into the script the number of rows or bytes affected by a SQL statement or Web request The check box is cleared Do not insert the number of affected rows or bytes into the script For an example of the effect that this check box has on a generated script see Example of the Verify Playback Check Boxes on page 6 18 NOTE This option is not supported for VB scripts Verify Playback Return Codes This option specifies whether you want the return code for SQL stat
294. omatically adds to the end of the script Robot adds this information to a session script when you select Use datapools in the Generator tab of the Session Record Options dialog box The DATAPOOL_ CONFIG section contains a line for each value assigned to a script variable during recording In the following example the value 329781 is assigned to the variable CUSTID INCLUDE CUSTID string 329781 For more information about the DATAPOOL_ CONFIG section of a script see Step 1 Editing Datapool Configuration on page 10 14 Data Types gt With GUI scripts search the script for each value that you provided to the application during recording Later replace these literal values with variables During playback the variables will be supplied values from the datapool Finding Values in GUI Scripts Here are two examples of literal values in GUI scripts The values are in bold type Credit Card Type ComboBox Click ObjectIndex 1 Coords 104 7 ComboListBox Click ObjectIndex 1 Text Discover Credit Card Expiration Date EditBox Left Drag ObjectIndex 4 Coords 19 13 16 12 InputKeys 12 31 99 To make the task of searching for values easier insert a descriptive comment into the script before providing a value to the client application during recording NOTE The only values that Robot records are those that you specifically provide during recording If you accept a default Robot does not record that value Cr
295. ompiling testl rec testl rec 8 Error Unknown function Windows testl rec 11 Warning No DIM statement for Variabl testl rec 12 Error Unknown function ListViewl1 1 warning s 2 error s Build tab shows J compilation results Taan io ALOE 00008 001 admin To locate compilation errors in the Script window do one of the following gt Double click the error or warning in the Build tab Robot moves the cursor to the beginning of the line and inserts an X in the left margin or highlights the line gt Click Edit gt Next Error or Edit gt Previous Error Robot moves the cursor to the beginning of the line and inserts an X in the left margin or highlights the line p gt Click Edit gt Go to Line type the line number and click OK Robot moves the cursor to the beginning of the line Debugging GUI Scripts Robot includes a complete built in debugging environment to assist you during the development phase of your GUI scripts NOTE Robot does not have a debugging environment for virtual user scripts Before you start to debug you must have an open GUI script The script can be gt A script that you have just recorded gt A script that you have opened by clicking File gt Open gt Script Editing Compiling and Debugging Scripts 5 10 To debug a GUI script use the Debug menu commands or toolbar buttons on the Standard toolbar or Playback toolbar When you start to debug Robot automaticall
296. onal Test gt TestManager and then opening the log To have Robot prompt you before it overwrites a log select Prompt before overwrite log Click one of the following Specify log information at playback At playback displays the Specify Log Information dialog box so that you can specify the build log folder and log Use default log information At playback uses the same build and log folder that was used during the last playback Uses the script name as the log name Click OK or change other options Setting GUI Playback Options Setting Wait State and Delay Options In most cases it is important for the playback of a GUI script to be synchronized with the application under test so that Robot executes commands in the script only after the application is ready to receive them Robot attempts to maintain this synchronization automatically for you using several techniques You can refine the synchronization by setting the following options in the GUI Playback Options dialog box gt Wait states for windows gt Delays between commands p gt Delays between keystrokes These options are described in the following sections NOTE Ifa script needs to wait before executing a particular command insert a delay for that command only For information see Inserting Delay Values on page 3 12 If you are testing an application in which time estimates are not predictable you can define a wait state for a verification point so
297. one Cancel Help 6 35 Setting Recording Options To assign an identifying prefix 1 Click Tools gt Session Record Options 2 Click the Generator per protocol tab Select DCOM at the Protocol section and then select an event label The label you select determines the prefix of the emulation command IDs in your script User Generated Lets you generate a command ID prefix After you select this option click the Command ID prefixin the Generator tab and then enter the prefix that you want generated If you do not enter a prefix the command ID follows the name of your script For example if you do not enter a prefix and the script is named Accounting the command IDs are ACCOUNT 001 ACCOUNT 002 and so forth SCRIPT NAME The command ID prefix is the script name If your script is named Accounting the command IDs are ACCOUNTINGO01 ACCOUNTING002 and so forth Method The command ID prefixes are the method names in your program Class The command ID prefixes are the class names in your program Any commands within a class follow the class name Class Method The command ID prefixes are in the format class name method name Library Class Method The command ID prefixes are in the format library name class name method name None Command IDs are omitted from your script Setting General Recording Options 6 36 Robot lets you set general recording options which apply to all session recordin
298. ons 6 40 To add a client or server computer 1 2 10 Click Tools gt Session Record Options Click the Method Network tab or Method Proxy tab depending on whether you are adding a computer for network or proxy recording Click Manage Computers Click New In the Name box of the Computers group type a name to associate with the network name of the computer that you are adding You can assign any name up to 40 characters Type the computer s network name For Windows NT you can find the computer s network name in the Identification tab of the Network dialog box Start gt Settings gt Control Panel gt Network gt Identification For Windows 2000 you can find the computer s network name in the Network Identification tab Start gt Settings gt Control Panel gt Network and Dial up Connections gt Advanced gt Network Identification For Windows XP you can find the computer s network name in the System tab Start gt Control Panel gt Performance and Maintenance gt System gt Computer Name Alternatively you can type the computer s IP address associated with the network name However because DHCP provided IP addresses can change ideally you should type a network name Optionally click Ping to make sure that the network name you just typed is correct If it is correct Successful Ping of network name appears in the status bar Select Client System to list this comp
299. ons to an SQABasic header file save the file before you compile a script or library file that references the header file Save the header file by clicking the Save toolbar button You do not compile SQABasic header files Using Filters to Open SQA Basic Files You can add filters to the registry to affect the files displayed in the Open dialog box To do this 1 Run the Regedit command to open the Registry Editor 2 Add the SQA Basic Filter setting to the HKEY CURRENT_USER Software Rational Software Rational Test 8 Robot Robot section using the following syntax Use the following syntax to add a filter to the registry Filterl Description filterl patternl filterl pattern2 etc Filter2 Description filter2 patternl filter2 pattern2 etc etc For example SBL source files sbl sbh sbl sbh text files txt txt Adding Features to GUI Scripts Header and Library Source File Examples The following examples show how a script can reference gt Variables and constants declared in a header file gt Procedures declared in the header file and defined in a library source file To run the example type the contents of each example file into an empty rec script file sbh header file and sbl library source file Before attempting to run the script save the sbh file and compile the sbl file NOTE These examples are also provided in the Robot Help See header files in the Help Index You can copy the ex
300. onto Robot or one of its components you provide your user ID and password which are assigned by your administrator You also specify the project to log onto To log on gt From Start gt Programs gt Rational product name start Rational Robot or one of its components to open the Rational Login dialog box Starting Robot and Its Components Rational Test Login Type your user ID and password If you do not know these see User Nang your administrator admin Password Select a project To change i projects later exit all Robot components and log on again Project Projects are created in the MLtestrepo z Browse Rational Administrator j Location Displays the location of the J projects MLtestrepo tsp selected project OK Cancel Click OK to log on Introduction to Rational Robot Opening Other Rational Products and Components Once you are logged onto a Robot component you can start other products and components from either The Tools menu Window Help Extension Manager Inspector Object Data Test Definition Raton TesiManager Rational ClearQuest Rational TestEactory Rational Purify Rational SiteCheck Rational Quantify Rational Administrator Rational PureCoverage General Options GUI Playback Options GUI Record Options Session Record Options Import Session Regenerate Test Scripts from Session Interfaces Manage Script Queries
301. ool columns Type also includes the names ofall the standard data types User defined data types are flagged in this list with an asterisk NOTE You can assign data from a standard data type to a user defined data type For information see Rational TestManager User s Guide Generating Unique Values from User Defined Data Types 10 12 You may want a user defined data type to supply unique values to a script variable during playback To do so the user defined data type must contain unique values In addition when you are defining the datapool in the Datapool Specification dialog box make the following settings for the datapool column associated with the user defined data type gt Set Sequence to Sequential gt Set Repeat to 1 gt Make sure the No of records to generate value does not exceed the number of unique values in your user defined data type For information about the values you set in the Datapool Specification dialog box see Rational TestManager User s Guide Using Datapools with Sessions Generating Multi Byte Characters If you want to include multi byte characters in your datapool for example to support Japanese and other languages that include multi byte characters you can do so in either of these ways gt Through a user defined data type For information see the section Creating User Defined Data Types on page 10 11 The editor provided for you to supply the user defined data fully sup
302. ool for session scripts 1 Plan the datapool Determine the datapool columns you need In other words what kinds of values names addresses dates and so on do you want to retrieve from the datapool and send to the server Typically you need a datapool column for each script variable that you plan to assign datapool values to during recording For example suppose your client application has a field called Order Number During recording you type in a value for that field With session scripts the value is automatically assigned to a script variable During playback that variable can be assigned unique order numbers from a datapool column This stage requires some knowledge of the client application and the kinds of data that it processes To help you determine the datapool columns you need record a preliminary session script Rational Robot automatically captures all the values supplied to the client application during recording and lists them in the DATAPOOL CONFIG section at the end of the script For more information see Finding Out What Data Types You Need on page 10 10 10 5 Working with Datapools 10 6 Generate datapool code Toaccess a datapool at runtime a script must contain datapool commands such as commands for opening the datapool and fetching a row of data With session scripts a DATAPOOL_CONFIG section must also be present This section contains a variety of information about how the datapool is c
303. ool in Test Script dialog box Either accept the defaults in the Configure Datapool in Test Script dialog box or make any appropriate changes Use the table on page 10 16 to help you modify the settings in this dialog box When finished making changes click Save Click Edit Specification to open the Datapool Specification dialog box where you update datapool column definitions For information about the data types and other properties you can define for a datapool column see Rational TestManager User s Guide To see an example of datapool columns defined in the Datapool Specification dialog box see Rational TestManager User s Guide To insert one or more new columns into the datapool file a Click the row located either just before or just after the location where you want to insert the new datapool column Note that the order in which datapool column names are listed in Name determines the order in which values are stored in a datapool record An arrow appears next to the name of the datapool row you clicked b Click either Insert before or Insert after depending on where you want to insert the datapool column c Type a name for the new datapool column 40 characters maximum Make sure there is a script variable of the same name listed in the Configure Datapool in Test Script dialog box Case of the names must match Using Datapools with Sessions 7 When finished modifying datapool columns type a number in the
304. or Server Computer on page 6 39 gt Proxy service is running For more information see Starting and Stopping Proxy Service on page 6 44 To create a proxy computer 1 Click Tools gt Session Record Options Click the Method tab and make sure that Proxy recorder is selected Click the Method Proxy tab Click Proxy Admin a RF wr In the Proxy Port list specify the proxy computer s port number Note that Robot has already detected and specified the proxy computer s name You can specify any available port number Avoid the well known ports those below 1024 If you specify a port number that is unavailable Robot prompts you for a new port number 6 In the Server Port list select a server involved in the test 7 Click Create Proxy The proxy computer is added to the Existing Proxies list Setting the Recording Method Identifying Client Server Pairs Clients and servers communicate through the proxy A client and server that communicates through a proxy is called a client server pair Before you identify a client server pair be sure that the network names or IP addresses of all the clients and servers in your test appear in the Method Proxy tab If none are listed click Manage Computers to define them For information about how to define a client or server computer see Defining a Client or Server Computer on page 6 39 To associate each client in your test with its matching server 1 Click Tools gt S
305. or a particular script variable Optionally you can accept all the default settings that Robot specifies when it creates this section in a session script For information about editing the DATAPOOL_CONFIG section of a script see Step 1 Editing Datapool Configuration on page 10 14 Defining the datapool columns that you determined you needed during the planning stage For example for an Order Number column you can specify the maximum number of characters that an order number can have and whether the Order Number column must contain unique values Planning and Creating a Datapool For information about defining datapool columns see Step 2 Defining Datapool Columns and Generating the Data on page 10 20 You also assign a data type to each datapool column Data types supply a datapool column with its values For information about data types see Data Types on page 10 9 Generating the data Once you configure the datapool and define its columns populate the datapool simply by clicking Generate Data With Robot you can create and populate a datapool immediately after recording or at any other time as long as the datapool commands are in the script NOTE You can also create and populate a datapool file manually and import it into the project For more information see Rational TestManager User s Guide 10 7 Working with Datapools 10 8 The following figure illustrates the three stages of datapool creation Plan
306. or detailed information about each verification point and how to create it see the Robot Help Verification Point Type Example Alphanumeric P Program lt gt Program Captures and tests alphanumeric data in Windows objects that contain text such as edit boxes check boxes group TARH boxes labels push buttons radio buttons toolbars and fioo z lt 100 windows captions You can use the verification point to verify that text has not changed to catch spelling errors and to ensure that numeric values are accurate Clipboard f ClipBook Viewer Clipboard n 308 Fie Edit Security View Window Help Captures and compares alphanumeric data that has been M onth Sales copied to the Clipboard To use this verification point the 1 4200 aie wa 6100 application must supply a Copy or Cut capability so that you can place the data on the Clipboard This verification point is useful for capturing data from spreadsheet and word processing applications as well as terminal emulators 2 3 7300 4 7300 El Clipboard File Comparison Compares two specified files during playback The comparison is based on the contents of the files and their sizes not on the file names or dates When you create the verification point you specify the drive directory and file names During playback Robot compares the files byte for byte File Existence Verifies the existence of a specified file during pl
307. or selecting hidden objects To select the object to test 1 Start creating the verification point See Starting to Create a Verification Point on page 4 7 Tasks Associated with Creating a Verification Point 2 In the Verification Point Name dialog box type a name and click OK to open the Select Object dialog box Drag over an object and release the mouse button Drag the Object Finder tool pver an object and then release the left mouse button to sel ct the object To select from a list of all objects on the Desktdp click Browse Shows the type after you select an object Object Fite tool nu Click to select Selected object TreeView OCX from alist of all Visual Basic objects on the desktop Select to have the _ Automatically close dialog box after object selection dialog box close after you select an object OK Cancel Help 3 Do one of the following Select Automatically close dialog box after object selection to have the Select Object dialog box close after you select the object to test Clear Automatically close dialog box after object selection to have the Select Object dialog box reappear after you select the object to test You need to click OK to close the dialog box To select a visible object directly from the application continue with step 4 To select an object from a list of all objects on the desktop skip to step 5 4 To select a visible object directly from the
308. ording on page 7 10 Click OK The Generating Scripts dialog box displays This dialog box shows the progress of automatic script generation When script generation ends the message Completed successfully appears in the status bar and the OK button is enabled During script generation you might see The Missing Password dialog box For more information about this dialog box see Providing a Missing Password on page 7 6 The Manual Filtering dialog box For information about this dialog box see Choosing the Protocols to Include in a Script on page 7 11 Click OK in the Generating Scripts dialog box The script that you recorded appears in the Robot window Using the Floating Toolbars When you begin to record a script Robot displays a floating toolbar by default The Session Record toolbar gives you access to activities you might want to perform while Robot is hidden from view during recording If you click the button on the far right of the Session Record toolbar you display the Session Insert toolbar This toolbar lets you insert features into the script and start another application during recording Recording Sessions The following figure shows the Session Record toolbar and the Session Insert toolbar Open Robot window Comment Synchronization Stop ve point ees Session Inset at ae to fo by amp fe fe Split session into scripts vz Z a Start stop Start stop timer block Open Sessio
309. ording to recognize a PeopleTools component by its field name in the database Robot provides end to end automated testing of your PeopleTools applications as follows If You Have Purchased Then A PeopleTools application Your PeopleTools package includes a PeopleTools only version of Robot Rational Robot Support for testing PeopleTools applications with Robot is available in addition to all the other features of Robot Rational TestFoundation You have access to a testing methodology and a comprehensive collection of prerecorded scripts for PeopleTools applications 16 1 Testing PeopleTools Applications You can use Robot to test the following PeopleTools components Grids Tab controls Menu objects Toolbars Navigator Panels Trees Panels Tree Views Spin controls Verifying That the PeopleTools Extension Is Loaded To test PeopleTools applications first verify that the Robot PeopleTools extension is loaded in Robot To verify that the extension is loaded 1 Start Robot Click Tools gt Extension Manager Verify that PeopleTools is selected If not select it w DN To improve the performance of Robot clear the check boxes of all environments that you do not plan to test 5 Exit Robot The next time you start Robot only the extensions for the selected environments are loaded Testing a Component s Properties There are two methods that you can use to test the properties attributes of a P
310. ost of the data types in the Type column are standard data types shipped with TestManager Two data types Product List and Color List are user defined data types Columns to generate in the datapool file B Datapool Speci cation Customer Orders Data types that supply data to datapool columns Insert before Datapool Fields e4 Name Type I Sequence Repeat Length Decimals Interval Minimum Maximum Sq Insert after P First Name Names First Sequential 1 20 0 0 0 0 Last Name Names Last Sequential 1 20 0 0 0 0 PAA Street Address Street Sequential 1 30 0 0 0 0 Inserts new City Cities U S Sequential 1 20 0 0 0 0 dat I Zip Zip Code 5 Digit Sequential 1 5 0 0 0 0 arapoo Order Number Integers Signed Unique 1 E o 1 70000000 99999989 columns Product Product List Sequential 1 15 0 0 0 0 Color Color List Sequential 1 15 0 0 No of records to generate fioo Save Cancel Help Number of rows to generate in the datapool file Analyzing Results in the Log and Comparators You use TestManager to view the logs that are created when you run scripts and schedules Use the log to gt View the results of running a script including verification point failures procedural failures aborts and any additional playback information Reviewing the results in the log reveals whether each script and verification point
311. ough the Robot and SQABasic Help systems wherever you see the link to the Robot Java API Overview Supported Data Tests for Java Testing The following table describes the data tests that are available for each Robot object type supported in the Java environment Robot Object Type Supported Data Test Description of Data Test PushButton Label Contents Captures and compares visible text CheckBox Contents Captures and compares visible text RadioButton Java Active State Displays Selected or Not Selected depending on the current state EditBox Contents Captures and compares visible text Java Active State Captures and compares selected text ScrollBar TrackBar Contents Java Active State Displays the current value Displays the Value Unit Increment and Block Increment ListBox ComboBox Contents Captures and displays all elements in the list box combo ComboListBox box or combo list box Java Active State Captures and displays the currently selected elements TabControl Contents Captures and displays all of the tabs Java Active State Captures and displays the currently selected tab JavaTree Contents Captures and displays the contents of the Java tree 14 14 Java Active State Captures and displays the currently selected elements in the Java tree Continued Robot Object Type Supported Data Test Testing Properties of Java Components Description of Data Test
312. ox appears The Status box shows whether proxy service is Running or Stopped If proxy service is Stopped click Start to run it If proxy service is Running click Stop to stop it If you are using Windows NT 4 0 you can also start and stop proxy service as follows 1 Click Start gt Settings gt Control Panel 2 Double click Services 3 Select ProxyServer Service 4 Click either Start or Stop If you are using Windows 2000 you can also start and stop proxy services as follows 1 Click Start gt Programs gt Administrative Services 2 Double click Services 3 Select ProxyServer Service 4 Click either Start or Stop If you are using Windows XP you can also start and stop proxy services as follows 1 Click My Computer gt Control Panel gt Administrative Tools Double click Services Select ProxyServer Service PF WN Click either Start or Stop Re creating Proxies After Proxy Service Is Stopped The proxy computers are listed in the Existing Proxies grid of the Proxy Administration dialog box 6 45 Setting Recording Options When proxy service stops either explicitly or during Windows shutdown all proxy computers are deleted Therefore you must create new proxy computers before you start proxy recording For information about creating a proxy computer see Creating a Proxy Computer on page 6 10 Proxy service is not automatically shut down and therefore proxy computers are not delete
313. p codes detecting 9 17 J Japanese characters 10 10 10 13 Java applets 6 26 Java applets and applications 14 3 Java Developer Kit JDK 14 3 Java Enabler 14 4 Java extension enabling 14 1 Java Virtual Machine JVM 14 1 Jolt protocol 6 25 K Kanji characters 10 13 Katakana characters 10 13 keep alives in HTTP scripts 6 27 Key Value identification method 4 17 keyboard actions tracking during recording 2 21 keys using to compare data in columns 4 17 keystrokes waiting for during playback 9 7 L library source files 7 22 compiling 5 7 creating and editing 3 15 global 3 15 role of 3 14 links testing HTML 13 8 Location identification method 4 16 Log button 9 6 log messages adding to GUI scripts 3 11 Index log options for GUI script playback 9 5 login information Authentication Datapool 6 41 automatic detection 6 41 user ID and password 6 41 logs definition 9 5 low level recording copying scripts 5 5 deleting scripts 5 6 hot keys for 2 21 renaming scripts 5 4 switching to 2 21 viewing scripts 5 4 M manual protocol filtering 6 24 7 11 mapping clients and servers for proxy recording 6 11 illustration of proxy mapping 6 8 object types and classes 2 13 proxy computer with a server 6 10 measuring duration of events 3 8 Menu verification point 4 4 menus testing 4 4 4 20 missing passwords 7 5 7 6 modifying object class mappings 2 14 Module Existence verification point 4 4 modules testing existenc
314. passes If the field contains any text or numeric value during playback the verification point fails You can use this method on a list if you do not highlight any of the items in the list This method is used only with the Alphanumeric verification point Selecting an Identification Method An identification method tells Robot how to identify the values to compare during record and playback For example suppose you want to test that the values of one row in a table remain the same during record and playback You could specify an identification method so that Robot can identify the values regardless of the location of the row in the table When you create certain verification points you can select an identification method for data that appears in a data grid A data grid shows data in rows and columns in a Robot dialog box Data grids are used when you create a Clipboard Menu or Object Data verification point You can also select an identification method for properties that have a list or array value when you create an Object Properties verification point If the data is displayed in a two dimensional grid select two identification methods one for columns and one for rows If the data is displayed in a one dimensional grid select only one identification method There are four identification methods By Content By Location By Title and By Key Value For a complete list of the identification methods see List of Identification Me
315. pear in the Asset pane in the Script window File Comparison File Existence Module Existence Window Existence and Alphanumeric if the verification method is Numeric Equivalence or Numeric Range You can rename copy or delete these verification points directly in the script 4 23 Creating Verification Points in GUI Scripts Viewing a Baseline File 4 24 To view the baseline file of a verification point in a Comparator In the Asset left pane in Robot right click the verification point name and click View Baseline or double click the name As the following figure shows Robot opens the baseline file of an Object Properties verification point in the Object Properties Comparator Afi test oj x a Verification Points Initially Recorded 1 170244 Right click a See Script Name test1l a s verification point E Object Data COP and Easte dow SetTestContext capi ult ListViewVP Compar dow ResetTestContext Click View Baseline Delete Rename File Edit View Help gt jarne Properties to view the baseline file in Name AutoArrange True x BackColor C DRGBI192 192 192 BackColor Link None EditLabels True Enabled True Focus True the appropriate Comparator Once the baseline file opens in the appropriate Comparator you can view and edit the data Editing data is useful if you want to change the baseline data
316. points each with a unique name The same is true of a suite A given synchronization point name can be referenced in multiple scripts and or suites The following sections describe the various ways to insert synchronization points Synchronization Points Inserting a Synchronization Point During Recording To insert a synchronization point into a script during recording 1 Ifthe Session Insert floating toolbar is not already displayed click the Insert button on the Session Record floating toolbar 2 Click the Sync Point button immediately before you begin to record the activity that you are synchronizing For example to synchronize multiple virtual testers so that they all submit a query at the same time first insert the synchronization point and then perform the user action that sends the query to the server 3 Type the synchronization point name 4 Click OK When you insert a synchronization point during recording the command is reported as an annotation in the Annotations window Inserting a Synchronization Point During Editing You can only use the Session Insert toolbar to insert a synchronization point into a script during recording To insert a synchronization point during editing type a synchronization point command into a script For information on inserting synchronization points in VU scripts see the sync_point command in the VU Language Reference For information on inserting synchronization points in Visual B
317. ports Input Method Editor IME operation An IME lets you type multi byte characters such as Kanji and Katakana characters as well as multi byte ASCII from a standard keyboard It is included in the Japanese version of Microsoft Windows Through the Read From File data type For information see the section Rational TestManager User s Guide Using Datapools with Sessions Robot can insert datapool commands into a performance testing session automatically If you want Robot to do so take these steps before you begin to record a session 1 In Robot click Tools gt Session Record Options 2 Click the Generator tab 3 Select Use datapools and click OK 4 Record your transaction s and then stop recording The datapool commands are included in the script that Robot generates during recording Next you create the datapool itself as described in the following section Creating a Datapool with Robot In Robot you create a datapool in two basic steps 1 Edit the DATAPOOL_ CONFIG section of the session script or accept the defaults See the next section Step 1 Editing Datapool Configuration Define datapool columns and generate the data See Step 2 Defining Datapool Columns and Generating the Data on page 10 20 You cannot automatically generate data for a datapool that has more than 150 columns 10 13 Working with Datapools 10 14 NOTE DATAPOOL_CONFTIG is included only in session scripts As a result
318. ptures traffic between a designated target and an application that you want to test For this type of recording to work and for the resulting script to play back an API Recorder Adapter a Generator Filter Adapter and an API Script Generator Adapter must be properly installed and configured Upon startup if Robot detects installed adapters API recording and script generation are extended to include one or more protocols These protocols are selected in the Generator Filter tab To use these adapters you must 1 Install and configure each of the adapters 2 Select API recorder in the Method tab In the Generator Filtering tab select the protocol corresponding to the installed generator filter adapter from the Available protocols box and move it to the Selected protocols box An installed generator filter adapter is an exclusive protocol that cannot be selected in combination with other protocols Setting Recording Options For more information refer to the Session Recording and Script Generation Extensibility Reference Network Recording With network recording Robot records packet level traffic at the OSI network interface layer using the promiscuous mode of your network card Network recording is media independent supporting standards such as Ethernet Token Ring and Fiber Distributed Data Interface FDDI Network recording occurs on the wire rather than on the client as with API recording Choosing Network Recordi
319. r Java on page 14 2 The following table describes what the Java Enabler does to update the various Java environments With This Java Environment Sun JDK 1 1 The Java Enabler Updates the CLASSPATH on Windows 95 and Windows 98 and the system CLASSPATH on NT 4 0 Windows XP and Windows 2000 to include the path to the sqarobot jar file Sun JRE 1 1 Updates the CLASSPATH on Windows 95 and Windows 98 and the system CLASSPATH on NT 4 0 Windows XP and Windows 2000 If the CLASSPATH is not used by the Java application manually add the sqarobot jar file to the CLASSPATH used by the application Sun JDK 1 2 gt Copies the sqarobot jar file to the Jre Lib Ext directory gt Updates the accessibility properties file to reference the Robot runtime monitor class Java 2 SDK Standard Edition V13 gt Copies the sqarobot jar file to the Jre Lib Ext directory gt Updates the accessibility properties file to reference the Robot runtime monitor class Setting Up the Sample Java Applet Continued With This Java Environment The Java Enabler Microsoft JVM Updates the trusted CLASSPATH in the registry Netscape JVM gt Copies the sqarobot jar file to the Java Classes directory within the Netscape directory structure gt Copies the sqajava dll file to the Java Bin directory gt Updates the awt properties file in the Java Classes directory Verifying That the Java Extension Is Loaded To test
320. racle name of the LOV or record group The names of the data columns and each column s data type char number or date You may need to get this information from the developer of the form 2 In the same directory as the form s executable fmx file create a text file with the same name as the fmx file but with an sqa extension For example if the form s executable file is Oraapp32 fmx create a text file named Oraapp32 sqa 3 Inthe sqa text file type An LOV section containing the names of all LOVs to test A RECORD_GROUP section containing the names of all record groups to test The name of each LOV the name of each column and the data type of each column The name of each record group the name of each column and the data type of each column 12 15 Testing Oracle Forms Applications 12 16 The following figure shows an example LOV section 9 LOU LOU CUSTOMER_LOU Record Group section _____ RECORD_GROUP RECORD_GROUP CUSTOHER_RECORD_GROUP LOVname _____ dts CUSTOMER_LOV Column names and types Columns CUSTOMERID NUMBER CUSTOMERNAME CHAR Record Group name CUSTOMER_RECORD_GROUP Column names and types Columns CUSTOMERID NUMBER CUSTOMERNAME CHAR After you create the sqa file you can capture the data in gt An LOV associated with a text item gt Any LOV or record group Once you create t
321. ram files rational rational test 7 samples web def File Edit View ListView Tools olx Help owm HS amp O0 J List Views Defects Ill Site During playback i p SiteCheck lists all the defects on your Web site H A about images offices partners services default htm PODOB l ol For Help press F1 X about statist a about information info bak offices regions swoffice html Internal Link Not Found n a services office officeplans htm Internal Link Not Found n a services area images biglogo Slowly Downloading Page 56 62 Second s to Load about information default zip Internal Link Not Found n a images biglogo ipa about about htm about about htm about about htm x offices tegions neoffice html x offices regions seoffice html cist View All Defects 26 items found Defect Information Internal Link Not Found Internal Link Not Found n a 24 50 Second s to Load services office officeplans F services home homeplans F about statistics stats htm n a n a Slowly Downloading Page Page Has Broken Link Page Has Broken Link Page Has Broken Link Internal Link Not Found Internal Link Not Found For more information about SiteCheck see the SiteCheck Help For more information about the Web Site verification points see the Robot Help Using Robot with Ot
322. rary 6 34 U UAEs detecting 9 17 unexpected active windows definition 9 10 detecting during playback 9 10 options for GUI script playback 9 10 unique datapool rows user defined data types and 10 12 unknown objects controlling how Robot responds to 2 7 defining during recording 2 20 defining while creating data tests A 5 unrecoverable application errors detecting 9 17 usage directives for datapools 10 19 user actions adding to existing GUI scripts 5 2 definition 2 1 user IDs modifying list of in Robot 6 43 modifying list of in TestManager 6 42 supplying 6 41 Index 14 user defined data types creating 10 11 role of 10 9 unique values 10 12 when to use 10 10 User Defined verification method 4 15 users See also GUI users virtual testers V Value identification method 4 17 values supplied during recording 10 20 variable names and datapool column names 10 19 variable values examining 5 13 Variables window 5 13 verification methods for verification points 4 14 verification points 4 1 adding 3 6 before you create 4 6 copying 4 26 definition 2 1 deleting 4 26 editing 4 23 expected results 4 9 failures 9 9 identification methods 4 15 identifying objects to test 4 13 library files and 3 14 renaming 4 25 selecting objects to test 4 10 types 4 3 verification methods 4 14 viewing in Comparators 4 24 9 22 wait state values 4 8 Verify that selected field is blank verification method 4 15 verifyin
323. re setting in the Error Recovery tab of the GUI Playback Options dialog box You can change the default values for the retry time and the timeout by changing the wait state options To set the wait state options 1 Open the GUI Playback Options dialog box See Setting GUI Playback Options on page 9 4 2 Click the Wait State tab Wait State Unexpected Active Window Automatic wait for window Retry test every E seconds Timeout after 20 seconds 3 To specify how often Robot checks for the existence of a window type a number in the Retry test every box 4 To specify how long Robot waits for a window before it times out type a number in the Timeout after box 5 Click OK or change other options NOTE This synchronization is used only in Object Oriented Recording In contrast low level scripts are processed in real time They play back at the same speed at which they were recorded and do not use automatic wait settings Setting Delay Options for Commands and Keystrokes By default Robot pauses 100 milliseconds between each user action command and between each verification point command during playback If you find that Robot consistently gets ahead of your application under test during playback you can increase the time that Robot waits between these commands Also if you find that your application under test does not see all of the keystrokes that Robot sends it you can have Robot wait between sendi
324. re trademarks or registered trademarks of Rational Software Corporation in the United States and in other countries All other names are used for identification purposes only and are trademarks or registered trademarks of their respective companies Microsoft the Microsoft logo the Microsoft Internet Explorer logo DeveloperStudio Visual C Visual Basic Windows the Windows CE logo the Windows logo Windows NT the Windows Start logo and XENIX are trademarks or registered trademarks of Microsoft Corporation in the United States and other countries Java and all Java based marks are trademarks or registered trademarks of Sun Microsystems Inc in the United States and other countries FLEXIm and GLOBEtrotter are trademarks or registered trademarks of GLOBEtrotter Software Inc Licensee shall not incorporate any GLOBEtrotter software FLEXIm libraries and utilities into any product or application the primary purpose of which is software license management PATENT U S Patent Nos 5 193 180 and 5 335 344 and 5 535 329 and 5 835 701 Additional patents pending Purify is licensed under Sun Microsystems Inc U S Patent No 5 404 499 GOVERNMENT RIGHTS LEGEND Use duplication or disclosure by the U S Government is subject to restrictions set forth in the applicable Rational Software Corporation license agreement and as provided in DFARS 277 7202 1 a and 277 7202 3 a 1995 DFARS 252 227 7013 c 1 ii Oct 1988 FAR 12 212 a 1995
325. realms Robot has two verification points for use with Web sites gt Use the Web Site Scan verification point to check the content of your Web site with every revision and ensure that changes have not resulted in defects Use the Web Site Compare verification point to capture a baseline of your Web site and compare it to the Web site at another point in time The following figures show the types of defects you can scan for using a Web Site verification point and the list of defects displayed in SiteCheck Web Site Scan verification point that checks for defects on your Web site During recording insert a Identify the types of defects you would like to find IV Internal links not found M Orphans IV Extemal links not found MV Viruses IV Pages with broken links IV Pages slow to download IV Pages that have permanently moved Slow page threshold seconds 20 IV Assertions Scan Options m Identify the browser that you would like to be identified as during a site scan Generic C Netscape Navigator 3 x Netscape Navigator 4 x C MS Internet Explorer 3 x C MS Internet Explorer 4 x MS Internet Explorer 5 x m Do you want to run Rational SiteCheck now to add ActiveScan entries or Assertions C Yes To enter or update ActiveScan entries or Assertions No If the ActiveScan entries and Assertions for this site are up to date Introduction to Rational Robot test10 Web Site Scan actYLZS c prog
326. reated and accessed Datapool code is generated in either of these ways With session scripts Robot generates datapool code automatically when you finish recording a script Robot is aware of all the variables in the script that are assigned values during recording and it matches up each of these variables with a datapool column To have Robot generate datapool commands automatically during recording make sure Use datapools is selected in the Generator tab of the Session Record Options dialog box and then record the script With GUI scripts you manually insert the datapool commands and match up script variables with datapool columns For information about coding datapool commands see Using Datapools with GUI Scripts on page 10 24 Create and populate the datapool After the datapool commands are in the script you can create and populate the datapool To start creating and populating a datapool for a session script you are editing in Robot click Edit and then Datapool Information If you are creating a datapool for exclusive use by a GUI script use TestManager to create and populate the datapool For more information see Rational TestManager User s Guide Creating and populating a datapool for a session script involves these general steps Editing the DATAPOOL CONFIG section of the script For example you might want to change the default datapool access flags or exclude a datapool column from being created f
327. recording 6 40 removing 6 41 selecting for network recording 6 6 client requests monitoring during recording 7 8 recording 7 3 client server pairs deleting 6 47 6 48 identifying for proxy recording 6 11 reassociating with a proxy 6 48 Clipboard verification point 4 3 clipboard testing content of 4 3 columns in data grids changing widths 4 22 testing titles 4 20 transposing with rows 4 23 columns in datapools adding 10 20 10 22 configuring through the script 10 19 defining 10 20 Index 2 editing column definitions in Robot 10 22 editing values in Robot 10 23 including or excluding 10 19 maximum number 10 4 10 13 10 21 names correspond to script variables 10 19 values supplied by data types 10 9 command IDs 6 32 6 33 6 35 prefix 6 16 prefix for all commands 6 16 TUXEDO prefixes 6 32 command line options S 9 comments adding to scripts during editing 8 13 adding to scripts during recording 8 13 comments in GUI scripts 3 11 compiling locating errors 5 9 scripts and library source files 5 7 computers defining for network or proxy recording 6 40 removing 6 41 selecting a network interface card 6 7 connections in session recording 6 24 7 12 constant values examining 5 13 contained scripts 7 19 Content identification method 4 16 cookie prompt disabling in Internet Explorer 13 2 disabling in Netscape Navigator 13 2 copying data tests A 8 low level scripts 5 5 scripts 7 26 verification points 4 26 CPU
328. rences Click the Roaming Access category B S Click the Item Selection tab Making HTML Applications Testable 5 Uncheck Cookies 6 Click OK Making HTML Applications Testable To make HTML applications testable gt gt gt Verify that the HTML extension is loaded in Robot Enable HTML testing in Robot For recording on Netscape enable caching on the server These steps are described in the following sections Verifying That the HTML Extension Is Loaded To test HTML applications you must first make sure that the HTML extension is loaded in Robot To do this 1 wD 5 Start Robot Click Tools gt Extension Manager Verify that HTML MSIE or HTML Navigator is selected If not select it To improve the performance of Robot clear the check boxes of all environments that you do not plan to test Exit Robot The next time you start Robot only the extensions for the selected environments are loaded Enabling HTML Testing in Robot After loading the HTML extension you must enable HTML testing so that Robot can recognize HTML elements You can do this either by starting Internet Explorer or Netscape Navigator through the Robot Start Browser command or by loading the Rational ActiveX Test control To enable HTML testing using the Start Browser command 1 Start recording in Robot To record click the Record GUI Script button on the Robot toolbar For details see Recording a New GU
329. rently in each browser In addition be aware of the following areas in which Navigator playback differs from Internet Explorer playback gt The following Robot object types which represent the Microsoft implementation of Dynamic HTML are not recognized by Robot during Navigator playback HTMLActiveX HTMLEmbed HTMLScriptlet The following Robot object types do not support Robot action commands such as Click Drag and Scroll during Navigator playback HTMLTable HTML Not all of the object properties recognized by Internet Explorer during recording are supported by the Navigator extension In addition other object properties may have different values because of browser differences gt Recording Tips The current Robot implementation of Navigator record and playback requires a Web server that allows disk caching Cache must be enabled on the server for Netscape record and playback to work Recording Tips This section provides suggestions to help you record scripts in Robot It contains the following tips gt gt gt gt Capturing the properties of Java applets in HTML pages Synchronizing pages Recording mouse movements Ensuring browser compatibility Capturing the Properties of Java Applets in HTML Pages There are two ways to capture the properties of a Java applet embedded in a Web page You can either capture the properties of the entire window or you can capture the prope
330. retrieval you could take the following general steps 1 While recording the script named VU 1 in this example that submits the query and displays the result perform the following actions a Insert a synchronization point named Test Query into the script b Click the Start Block button see page Adding a Block on page 8 6 The block times the transaction you are about to perform The block also associates the block and timer names with the name of the emulation command that performs the transaction c Submit the query and wait for the results to be displayed d Click the Stop Block button While recording the virtual tester that provides the workload insert another TestQuery synchronization point just before you begin to record the activity that provides the load for example just before you click the button to submit an order form Name this script VU2 Add VU1 and VU2 to a suite Run the suite a number of times each time using a different number of the VU2 virtual testers However you only need one VU1 user in each test Theoretically as the number of synchronized VU2 virtual testers increases the time reported by the VU1 timer should also increase In this example the Test Query synchronization point ensures that gt All VU2 virtual testers submit their forms at the same time thereby providing maximum concurrent workload The VU1 virtual tester submits its query at the same time that the VU2 virtual
331. rking with Low Level Scripts 3 Inthe Script window click where you want to insert the feature Make sure that the application under test is in the appropriate state to insert the feature at the text cursor position 4 Do one of the following o0 Toadd the feature without going into recording mode click the Display og GUI Insert Toolbar button on the Standard toolbar The Robot Script window remains open To start recording and add the feature click the Insert Recording button on the Standard toolbar The Robot window minimizes by default or behaves as specified in the GUI Record Options dialog box Click the Display GUI Insert Toolbar button on the GUI Record toolbar Wil oo oo 5 Click the appropriate button on the GUI Insert toolbar NOTE The following features are not on the GUI Insert toolbar File Comparison File Existence Module Existence and Delay To add these features to your script open the Robot window if necessary by clicking the Open Robot Window button on the GUI Record toolbar Click the Insert menu and then click the appropriate command 6 Continue adding the feature as usual For more information about the features you can add see Chapter 3 Adding Features to GUI Scripts Working with Low Level Scripts As indicated in Switching to Low Level Recording on page 2 21 Robot has two recording modes gt Object Oriented Recording mode gt Low level recording mode If you turn on lo
332. roblem During recording you create a personnel file for a new employee using the employee s unique social security number Each time the script is played back there is an attempt to create the same personnel file and supply the same social security number The application rejects the duplicate requests Solution Use a datapool to send different employee data including unique social security numbers to the server each time the script is played back Planning and Creating a Datapool Problem You delete a record during recording During playback each instance and iteration of the script attempts to delete the same record and Record Not Found errors result Solution Use a datapool to reference a different record in the deletion request each time the script is played back Problem The client application reads a database record while you record a script for a performance test During playback that same record is read hundreds of times Because the client application is well designed it puts the record in cache memory making its retrieval deceptively fast in subsequent fetches The response times that the performance test yields will be inaccurate Solution Use a datapool to request a different record each time the script is played back Planning and Creating a Datapool Here is a summary of the stages involved in preparing a datapool for use in testing The order shown is the typical order for planning and creating a datap
333. rotocols in the generated scripts For example select this box to capture requests from a Java applet that communicates with a server through sockets TUXEDO protocol TestManager plays back traffic from one TUXEDO connection at a time If you record traffic from multiple TUXEDO connections you can specify which conversation to generate in the following WorkStation Listener WSL boxes WSL Host The name of the workstation listener host WSL Port The TCP IP port number for the host If you provide workstation listener information you must supply values for both boxes In addition you can specify the conversation to generate by supplying values for the following user defined fields of the TPINIT request message These fields are set by the client in the TPINIT typed buffer that is passed as an argument to the TUXEDO API function tpinit You can define either or both of the following fields If you define both the request message must contain both field values that is a logical AND operation Usrname The user name Cltname The client name Setting Script Generation Options When specifying a TUXEDO connection use either the WSL or TPINIT method or use both methods NOTE The TPINIT method is an advanced method for specifying a TUXEDO connection Typically it is used only if the WSL method does not produce satisfactory results Providing Protocol Specific Information If you are recording HT TP
334. rsion to another and allows for the reuse of scripts between Windows NT 4 0 Windows 2000 and Windows 98 With its Object Testing technology Robot examines data and properties that are not visible to the user Robot uses Object Oriented Recording to recognize an Oracle Forms object by its internal name You can use Robot to test Oracle Forms objects including gt Windows gt Forms gt Canvas views gt Oracle Trees Tree views gt Base table blocks single and multi record gt Items including OLE containers 12 1 Testing Oracle Forms Applications Making Oracle Forms Applications Testable Before you can test your Oracle Forms applications you must gt Install the Rational Test Oracle Forms Enabler gt Run the Enabler on your application and generate the form s afterward gt Verify that the Robot Oracle Forms extension is loaded Installing the Rational Test Oracle Forms Enabler You can install the Enabler from the Rational Software Setup wizard For instructions see the Rational Testing Products Installation Guide Then run the Enabler which instruments the code in your fmb file to make your application testable by Robot Running the Enabler on Your Application After you install the Enabler enable every form in your application The following sections explain gt What happens when you run the Enabler gt How to run the Enabler gt What to distribute with your application What H
335. rt gt Start Timer just before you click the button to send the query This action inserts the VU emulation command start_time into the script 2 Stop the timer click Insert gt Stop Timer as soon as the results appear This action inserts the VU emulation command stop_time into the script When you stop a timer you can reuse that timer s name in another timer There is no practical limit to the number of timers that you can add to a script You can nest timers within other timers by starting and stopping the second timer before stopping the first timer and you can overlap timers by stopping the second timer after stopping the first timer If you do not explicitly stop a timer no response time is reported for that activity You cannot extend a timer over multiple scripts The following illustration shows the start_time and stop_time emulation commands for a timer named query1 Think time Prepare and send query1 Retrieve results Continue of query1 i processing test 0 secs n nnn secs start_time query1 stop_time query1 Timers Why Use Timers Use timers in the following cases gt To time an overlapping sequence of events Insert a start_time command followed by several stop_ time commands You cannot overlap blocks although you can nest them gt Totimea specific portion of the script Insert the start_time and stop_time commands exactly where you want when
336. rt Windows session Trap restarts Windows Call user defined sub procedure Trap calls the subprocedure in the module that you specify Select this option to specify your own custom SQABasic error handling Type the names of the library source file with an sbl extension and the subprocedure 7 Click OK or change other options Analyzing Results in the Sqatrap log File If you select the Start Trap option and an error occurs during playback Robot appends the error data to the existing Sqatrap log file in the Rational installation directory or creates a new file if one does not exist To start with a clean Sqatrap log file delete the old file This file provides information about the state of the Windows session that was running Playing Back a GUI Script The Sqatrap log file can contain a variety of information about failure events The following failure information is always written to Sqatrap log gt Contents of the stack for the current task gt Names of functions that were called just before the error occurred gt Contents of CPU registers gt Date Time stamp and Fault Number Other information can be written to Sqatrap log depending on settings in the Trap tab of the GUI Playback Options dialog box To see a sample Sqatrap log file see Sqatrap log file in the Robot Help Index Playing Back a GUI Script To play back a GUI script 1 Prepare for playback by restoring the test environment For information s
337. rties of the applet itself Either way you should first click Tools gt Extension Manager in Robot to verify that the Java extension is loaded To capture the entire window including the applet 1 2 Add an Object Properties verification point With the Object Finder tool point to the title bar of the browser window until Window appears in the TestTip Click OK NOTE Do not point to the HTMLDocument object type This object type provides minimal detail about Java applets To capture only the properties of the Java applet 1 2 Add an Object Properties verification point With the Object Finder tool point to the Java applet until JavaWindow appears in the TestTip Click OK 13 15 Testing HTML Applications Synchronizing Pages 13 16 Whenever you click a page for the first time Robot inserts a Browser NewPage command into the script This command causes Robot to wait for the contents of the page to fully load before continuing and also helps prevent timing problems that could cause scripts to fail when they are played back The following scenarios illustrate how this works For more information about page synchronization see the description of the Browser command in the SQABasic Language Reference Capturing Properties or Data of Window Objects Any time you plan to capture the data or properties of a window object be sure to click in the window before inserting an Object Data or Object Properties veri
338. s Generic Class MDIClient ClassIndex 1 nonvisual objects Window Name SAMPLE WINDOW xl OK Cancel Help 12 11 Testing Oracle Forms Applications 12 12 NOTE To capture the properties of all of the objects drag the Object Finder tool to the Developer 2000 Forms Runtime window and release the mouse button instead of clicking Browse Using Browse is usually faster because you can select only the objects that you want to test from the Object List before the properties are captured 4 Expand the Form branch by double clicking the plus sign All of the blocks canvas views and windows appear as children of the form Items appear as children of a block For information about working with the Object List see Selecting the Object to Test on page 4 10 The form includes blocks items canvas views and windows Object List t Wi 1 indow Name 0racleRootwindow Block Name HOME_BLOCK PushButton Name GO_CUSTOMER Listltem Name CHOOSE_CUSTOME PushButton Name PREVIOUS_REG PushButton Name NEXT_RECORD Textltem Name LO _TEXT_ITEM Block Name CUSTOMER Block Name PRODUCT Block Name TOOLBAR Block Name ITEM_CONTROLS Block Name 480UT Canvas Name HOME_CANVAS Canvas Name DATA_CANVAS Canvas Name TOOLBAR_CANVAS Canvas Name ITEM_CANVAS Canvas Name 4BOUT_CANVAS Window Name 4BOUT_WINDOW Window Name SAMPLE_WINDOW_TW Block Name DATA_CONTROLS A Bel
339. s either directly to script files or to included library source files The custom procedures you add to library source files can be called from procedures in other files scripts and other library source files gt By using SQABasic header files to declare custom procedures constants and variables Items declared in an SQABasic header file are available to multiple script and library source files gt By usinga script template The template contains information that you want to appear in every new script and rec library file that you create This section describes the basic information you need to know to use Robot to create and edit library source files and SQABasic header files For syntax and other detailed information about using these files see the SQABasic Language Reference Information about using the template appears at the end of this section Library Source Files 3 14 You can use Robot to create and edit two types of SQABasic library source files gt sbl These have project wide scope but they do not support verification points They are stored in the SQABas32 folder of the project gt rec These have project wide scope and they do support verification points They are stored in the Script folder of the project The rec files are also used as GUI scripts Library source files are useful for storing custom procedures that multiple scripts need to access If a custom procedure needs to be accessed by
340. s name Robot displays the class names already available for that object type in the Object classes list box Click Add Type the class name you identified in step 1 and click OK Click OK NOTE An object class can be mapped to only one object type If you try to map an object class to more than one object type a message asks you to confirm that you want to remap the class Modifying or Deleting a Custom Class Name To modify or delete a custom class name 1 2 Click Tools gt General Options and then click the Object Mapping tab From the Object type list select the standard object type that is associated with the object class name Robot displays the class names already available for that object type in the Object classes list From the Object classes list select the name to modify or delete Recording a New GUI Script 4 Do one of the following To modify the class name click Modify Change the name and click OK To delete the object class mapping click Delete Click OK at the confirmation prompt 5 Click OK NOTE You cannot modify or delete a built in class name Recording a New GUI Script To record a GUI script 1 Prepare to record the script See Before You Begin Recording on page 2 2 2 Ifnecessary enable your application for testing See Enabling IDE Applications for Testing on page 2 4 3 Make sure your recording options are set appropriately for the recording session Se
341. se low level recording when you are testing functionality that requires the tracking of detailed mouse actions such as in painting drawing or CAD applications To switch between the two modes during recording do one of the following gt gt Press CTRL SHIFT R Click the Open Robot Window button on the GUI Record toolbar or press CTRL SHIFT F to bring Robot to the foreground Click Record gt Turn Low Level Recording On Off NOTE To redefine hot keys click Tools gt GUI Record Options click the Robot Window tab and type the letter for the hot key 2 21 Recording GUI Scripts Ending the 2 22 When you switch to low level recording mode Robot does the following gt Records low level actions in a binary script file that cannot be edited and stores this file in the project gt Addsa PlayJrn1 command to your script that references the low level script file Robot gives each low level script a consecutive number These numbers appear in the Asset pane in the Script window under Low Level Scripts Ea Notepad Test iof x E Verification Points Initially Recorded EB Object Data Script Name Notepad EX Object Properties Result WindowVP Cor 3 Low Level Scripts Result WindowVP Cor PlayJrni command tow level referencing script Q0lin End Sub low level script 001 project X To view the contents of the low level binary file double click the file in the As
342. see Chapter 3 Adding Features to GUI Scripts 12 If necessary switch from Object Oriented Recording to low level recording For information see Switching to Low Level Recording on page 2 21 Object Oriented Recording examines Windows GUI objects and other objects in the application under test without depending on precise timing or screen coordinates Low level recording tracks detailed mouse movements and keyboard actions by screen coordinates and exact timing 13 When finished click the Stop Recording button on the GUI Record toolbar a The Robot main window appears as follows The script that you recorded appears in a Script window within the Robot main window The verification points and low level scripts in the script if any appear in the Asset pane on the left The text of the script appears in the Script pane on the right gt Default Project Rational Robot Notepad Test Iof xi File Edit View Record Debug Insert Tools Window Help Script window le FN 2 OEM FEMA S e MPSS i Notepad Test 5 A Verification Points Sub Main Asset pane EB Object Data Dim Result As Integer ET Object Properties Script pane F Low Level Scripts EJ 001 Initially Recorded 05 22 98 15 15 09 Script Name Notepad Test Result WindowVP CompareData Captions Result WindowVP CompareProperties Caj PlayJrnl 001 xj Output window Hl I Lan ART ey af
343. set pane This displays an ASCH version of the binary file in Notepad The file lists the actions that occurred during low level recording For more information see Working with Low Level Scripts on page 5 3 Recording of a GUI Script You should finish recording by returning the application under test to the same state it was in when recording began This lets you play back the script without manually resetting the environment If you started recording from the Windows desktop stop recording at the desktop If you started recording from the main window of the application stop recording at the main window making sure that the window is in the same state is was in when you started recording For example if the application is an editor and it had no documents open when you started recording make sure that no documents are open when you stop recording To end the recording of a script click the Stop Recording button on the GUI Record toolbar Defining Script Properties Defining Script Properties Script properties include gt gt gt gt The script s name description owner purpose and test environment Related assets such as test requirements Notes and specification files Custom keywords You can define or edit script properties after you record the script To define script properties 1 3 Do one of the following Ifthe script is open click File gt Properties Ifthe script is
344. sitePro you can gt Customize the requirements database and manage multiple requirement types gt Prioritize sort and assign requirements gt Control feature creep and ensure software quality gt Track what changes have been made by whom when and why gt Integrate with other tools including Rose ClearCase Rational Unified Process and SoDA Introduction to Rational Robot Hosting Robot Applications on a Terminal Server Robot supports the following Terminal Server environments gt Citrix MetaFrame WIN2K Citrix MetaFrame client gt Microsoft Terminal Server WIN2K Microsoft Terminal Server client gt Windows 2000 Server gt Windows Terminal Server Windows NT4 The server hosts both the application under test and Robot Robot runs on the client as a terminal server session Rational Robot supports GUI script recording and playback on the server or from the client The TestManager Log Viewer edition can be run from the server or from the client Robot requires floating licenses for terminal servers NOTE Make sure that the screen resolution for the client matches the screen resolution on the server Starting Robot and Its Components Before you start using Robot you need to have gt Rational Robot installed For information see the Rational Testing Products Installation Guide gt A Rational project For information see the Rational Suite Administrator s Guide Logging On When you log
345. so on Robot can record the sizes and positions of all open windows when you start recording based on the recording options settings For information about setting the recording options see Setting GUI Recording Options on page 2 5 During playback Robot attempts to restore windows to their recorded states and inserts a warning in the log if it cannot find a recorded window In general close any unnecessary applications before you start to record For stress testing however you may want to deliberately increase the load on the test environment by having many applications open Creating Modular Scripts Rather than defining a long sequence of actions in one GUI script you should define scripts that are short and modular Keep your scripts focused on a specific area of testing for example on one dialog box or on a related set of recurring actions When you need more comprehensive testing modular scripts can easily be called from or copied into other scripts They can also be grouped into shell scripts which are top level ordered groups of scripts Recording GUI Scripts The benefits of modular scripts are gt gt gt They can be called copied or combined into shell scripts They can be easily modified or rerecorded if the developers make intentional changes to the application under test They are easier to debug Creating Modular Scripts with UNC When projects containing GUI or Manual scripts are to be
346. splays a yellow arrow in the left margin of the currently executing line or highlights the line When playing back a script in animation mode you may want to increase the delay between commands This slows down the execution of user action commands and verification point commands so you can view line by line animation more clearly For information see Setting Delay Options for Commands and Keystrokes on page 9 8 Examining Variable Values You can examine variable and constant values in the Variables window as you play back scripts during debugging The Variables window appears in the lower right corner of the Robot main window If the Variables window is not open click View gt Variables to open it 5 13 Editing Compiling and Debugging Scripts 5 14 Variables window Default Rational Robot CustomVP File Edit View Record Debug Insert Tools Window Help 8 x i Sea g eGadmar z Dim currMetapath As String Current baseline meta file path al Dim currFilepath As String Current baseli e data file path Dim loggedMetapath As String Logged baseline meta file path Dim loggedFilepath As String Logged baseline data file path Dim actFilepath As String Actual data file path Dim captureResult as Integer Result of MyVP d ta capture Dim compareResult as Integer Result of custom Verif pt MyVP compareResult True Default to true captureResult True Default to true xx
347. split a script at the point where you want to send a query you can ignore the logon password and other preliminary requests you needed to make to get to the query s starting point Canceling a Script in a Single Script Session 7 10 If you have not split the session into multiple scripts you can cancel both the script and the session and then stop recording as follows 1 During recording click the Stop button on the Session Record floating toolbar 2 In the Stop Recording dialog box click Ignore just recorded information 3 Click OK in the Stop Recording dialog box 4 Click OK to delete the session Choosing the Protocols to Include in a Script Canceling the Current Script in a Multi Script Session When you record a session click the Split Script button to create multiple scripts To cancel the current script keep the other scripts that you recorded in this session and then continue recording 1 During recording click the Split Script button on the Session Record floating toolbar 2 In the Split Script dialog box click Ignore just recorded information 3 Click OK You can now begin recording a new script To cancel the current script keep the other scripts that you recorded in this session and then stop recording 1 During recording click the Stop button on the Session Record floating toolbar In the Stop Recording dialog box click Ignore just recorded information Click OK Ber i Click OK in the G
348. st Start creating the Object Properties verification point as usual For instructions see Object Properties verification point in the Robot Help Index Assign a name wait state and expected result for the verification point and then click OK as described in Tasks Associated with Creating a Verification Point on page 4 6 14 15 Testing Java Applets and Applications 5 Inthe Select Object dialog box drag the Object Finder tool over the page until the component that you want to test appears in the TestTip as described in Selecting and Identifying the Object to Test on page 4 10 For example to test for the current minimum and maximum values in a trackbar drag the Object Finder tool over the component until Trackbar appears in the TestTip See the following example File Options Dialogs ee Try Itt Tree Grid and Buttons Text Text Pane Vertical Sliders m 200 400 This is for uses which require more editing flexibility 160 300 ty Object Finder tool 120 TestTip ar 6 Release the mouse button If the Select Object dialog box is still open click OK Horizontal Slider SSS The object s properties appear Selected object Trackbar ndex 2 Properties Maximum value of trackbar maximum minimum J Minimum value of trackbar opaque orientation showing True toolTipText ulClassID SliderU valid True value 100 visible w
349. st select WebLogic EJB uk Ww DN In the Script Generator list select WebLogic EJB Setting the Recording Method The following figure illustrates the Method tab when custom recording using WebLogic EJB is selected Session Record Options weblog ess fweblegc EI If the WebLogic Server is running when recording is initiated the following prompt displays Ez WebLogic EJB Recorder Click Yes to start recording or No to terminate the request Refer to the Session Recording and Script Generation Extensibility Reference for more information 6 13 Setting Recording Options Setting Script Generation Options Although you should set script generation options before you record a session you can also change these options after you record a session After recording you can regenerate the script with new options without recording the session again The script generation options enable you to gt Modify the contents of the script for example by specifying whether the script includes datapool commands or think time delays gt Set filtering options to control the size of the script for example by selecting certain protocols to be included and excluding the other protocols gt Modify a script that contains specific protocol requests for example controlling settings for HTTP Oracle Tuxedo or IIOP Modifying the Contents of a Script 6 14 To modify the contents of a script 1 Click Tools gt Sess
350. st Bel A Veril n Points Sub Main Shows the ES Object Properties Dim Result As Integer Robot creates i EB Object Data ascript as you senpr assets EES Low Level Scripts Initially Recorded 08 14 98 10 10 33 work fa o Script Name Notepad Test startApplication C WINNT Notepad exe Result WindowVP CompareProperties Ca Result WindowVP CompareData Caption PlayJrnl 001 End Sub Shows compiler 2llCompiling Notepad Test rec lip warning s 0 error s TTA cuits A coo 7 00011 001 Admin The Object Testing technology in Robot lets you test any object in the application under test including the object s properties and data You can test standard Windows objects and IDE specific objects whether they are visible in the interface or hidden In functional testing Robot provides many types of verification points for testing the state of the objects in your application For example you use the Object Properties verification point to capture the properties of an object during recording and to compare these properties during playback Introduction to Rational Robot The following figure shows the Object Properties Verification Point dialog box Lists the names and values of all properties for the selected object Selected object Window Caption Font Objects 7 You can change the property values Highlights the indow Caption Font JE Edit Lit l
351. st the properties of an Oracle object gt Object Properties verification point Use to test properties while recording or editing a script gt Object Scripting commands Use to test properties programmatically while editing a script NOTE Before you can test an Oracle Forms application run the Enabler For instructions see Making Oracle Forms Applications Testable on page 12 2 Object Properties Verification Point Use the Object Properties verification point to test any property that you can access in PL SQL the Oracle programming language for the following objects gt Visual GUI objects Chart item Push Button item Check Box item Radio Button item Display item Radio Group item Image item Text item List item Oracle VBX Control item OLE Container item Window Oracle Tree Tree view gt Nonvisual non GUI objects Block Canvas view Form NOTE To test the properties of list of values LOV and record group objects see Object Scripting Commands on page 12 13 and Testing LOVs and Record Groups on page 12 15 12 10 Testing an Object s Properties Testing Properties of Visual Objects To test the properties of a visual GUI object 1 Start creating an Object Properties verification point as usual For instructions see Object Properties Verification Point in the Robot Help Index 2 When the Select Object dialog box appears drag the Object Finder tool to the object to test and release the
352. sts are not available unless you recreate them in the new repository Custom data tests can be edited renamed and deleted When you use the Object Data verification point to test an object that has more than one data test Robot displays a list of all of the object s data tests built in and custom Working with Data Tests Object Data Tests BE Selected object Generic OC Name MSFlexGrid Data test Built in data test mma All Data supplied with Robot aaa iData Displayed Data All Vata capture of the MSFlesand Custom data test _ created by customer a Cancel Recapture Help You can select any of the tests in the list depending on what you want to capture and test For example you might have data tests defined for a grid that let you gt Capture all of the data in the grid including fixed columns and rows even if the data is not visible on the screen gt Capture only selected or displayed data in the grid Before you create a custom data test make sure you have the following gt Access to the documentation or Help that came with the object that you want to test gt A good understanding of the object s properties and how the properties relate gt A good understanding of the Object Data verification point For information see Object Data verification point in the Robot Help Index An Example of a Data Test One way to understand how to create a data test is to look at
353. t development phase Task 1 Prepare for playback by restoring the test environment and setting the playback options See Restoring the Test Environment Before Playback on page 9 3 Setting GUI Playback Options on page 9 4 2 Play back each script against the same version of the application under test that was used for recording to verify that it performs as intended Playing Back a GUI Script on page 9 19 3 Analyze the results using the TestManager log Viewing Results in the TestManager Log on page 9 21 and the TestManager Help 4 Use the appropriate Comparator to determine the cause of verification point failures Analyzing Verification Point Results with the Comparators on page 9 22 and the Comparators Help 5 If the script fails edit debug or rerecord the script so that it runs as required Chapter 5 Editing Compiling and Debugging Scripts Regression 9 2 6 Group individual scripts into a comprehensive shell script Play back the shell script to verify that the scripts work properly If necessary edit debug or rerecord the scripts Testing Phase Creating Shell Scripts to Play Back Scripts in Sequence on page 2 25 During the regression testing phase play back scripts to compare the latest build of the application under test to the baseline established during the test development phase Regression testing reveals any differences that may have been introduced into t
354. t dialog box Select the object for which you want to create the data test in one of the following ways Drag the Object Finder tool over the object and release the mouse button As you move the Object Finder tool over an object the object type appears in the yellow TestTip Click Browse to open the Object List dialog box select the object from the list and click OK The Object List dialog box shows a hierarchical list of all objects on the Windows desktop including hidden objects If the Select Object dialog box is still open click OK to close it The object classification of the selected object and its data tests appear in the Object Data Test Definition dialog box If the object is Unknown not defined the Define Object dialog box appears Select an object type and click OK to open the Object Data Test Definition dialog box For information about defining an object see Defining Unknown Objects During Recording on page 2 20 Do one of the following to display the Create Edit Object Data Test dialog box Tocreate a new test type a name 50 characters maximum in the Data test name box and click New To edit a custom test select the test from the list and click Edit To copya test and edit the copy select the test and click Copy Type the new name click OK and click Edit Working with Data Tests For example if you copied the All Data test to a new test named Displayed Data and clicked
355. t on page 4 21 To Test the Destination of a Link 1 Add an Object Data verification point 2 With the Object Finder tool select HTMLLink to test a text based link 3 Select a Contents data test to capture the URL of the destination 4 Select the Case Sensitive verification method to test for the entire URL Select the Find Sub String Case Sensitive verification method to test for part of the URL How Robot Maps HTML Elements How Robot Maps HTML Elements Robot maps HTML elements such as INPUT SELECT BODY TABLE and others to Robot object types such as PushButton ListBox and HTMLDocument The following table describes these mappings Robot Object HTML Element Description Type PushButton lt INPUT type Submit gt Used for elements in forms lt INPUT type Reset gt created with the lt INPUT gt lt INPUT type Button gt tag where the type attributed is either Submit or Reset lt BUTTON gt CheckBox lt INPUT type Checkbox gt Used for elements in forms created with the lt INPUT gt tag where the type attributed is Checkbox RadioButton lt INPUT type Radio gt Used for elements in forms created with the lt INPUT gt tag where the type attribute is Radio ComboBox lt SELECT size 1 gt Used for elements in forms lt OPTION gt created with the GREECE tag where the size attribute is lt SELECT gt equal to one ListBox lt SELECT size gt n gt Used for elements in forms lt OPTION gt
356. t protocol By default TestManager plays back all recorded Jolt sessions regardless of which Jolt servers on the network those sessions may have connected to To limit playback to Jolt sessions connected to a specific Jolt server specify values for both of the following filters JSL Host Filters out all sessions not connected to a Jolt Server Listener at a particular host address JSL Port Filters out all sessions not connected to a Jolt Server Listener at a particular TCP port number 6 25 Setting Recording Options 6 26 To play back specific Jolt sessions specify values for either or both of the following filters UserName Filters out all sessions that do not specify this value as the userName parameter of the client s JoltSession constructor UserRole Filters out all sessions that do not specify this value as the userRole parameter of the client s JoltSession constructor Socket protocols All Robot recording captures socket protocols Socket protocols are at a level below the other protocols that Robot captures The following check boxes define the socket protocols you can include in a script Well known protocols FTP Telnet Select this check box to include common socket protocols in the generated scripts These protocols typically use port numbers 1 through 1 023 for example FTP uses port 21 Unrecognized protocols Select this check box to include other socket p
357. t to the Web site at another point in time Web Site Scan Checks the contents of a Web site with every revision and ensures that changes have not resulted in defects E Rational Software The e development co ioj x File Edit View Go Favorites Help Address je http www rational com index jtmpl iil Links Rational the e development company PRODUCTS Find the Rational Software Solution you need gt Window Existence Verifies the existence and status of a specified window during playback The status can be normal minimized maximized or hidden J Control Panel PEI EG c C00 Window Image Captures a window as a bitmap The captured window is a pixel by pixel representation that includes colors height and width 3J Control Panel Oy x File Edit View Help Add Remove Console Programs ss ni 30 object s Z NOTE You can also verify objects through your own custom procedures You can then use the SQABasic verification point management commands to perform the same kind of verification and logging tasks that Robot performs automatically For more information see the SQABasic Language Reference Creating Verification Points in GUI Scripts Before You Create a Verification Point Before you create a verification point consider the following What feature in the application do you want to test Example You want to verify that the Cut command p
358. tes the values in the key column it verifies that the rest of the recorded values in each row have remained the same during playback To add or remove a key from a column position the pointer anywhere in the column and click the right mouse button The following figure shows baseline data captured using Rows By Key Value with a key in the customerid column During playback Robot searches only for the recorded value in the key column for example 2 After Robot locates the value in the key column it compares the recorded values with the baseline values The verification point passes because the recorded values exist even though the row location changes because a new record was added to the database customername customername ABC Manufacturing Inc Abbot Metals ABC Manufacturing Acme Metal Working Corp Al Woodworking Ltd MA Acme Metal Working Corp Barrymore Company NY Al Woodworking Ltd MA Baseline Playback Pass Creating Verification Points in GUI Scripts When you select Rows By Key Value gt Robot uses the Case Sensitive verification method during playback to verify values in the columns that contain keys If you select another verification method it applies to the values in the nonkey columns gt Ifyou select Numeric Range as the verification method you must use at least one key The key tells Robot how to locate a record Then Robot compares the data to the specified range of numbers gt
359. tess oom 6 eis be obs Soe eels Does 3 10 Playing Back a Script That Includes Timers 3 10 Inserting Comments eieae e ninaa Tanna ee eee 3 11 Inserting Log Messages 60 0 ee eee 3 11 Inserting Delay Values 00 0000 urrunen 3 12 Using the Insert Menu 0 000 00 cece eee eee 3 13 Customizing SQABasic Scripts 0 0 00 eee 3 14 Library Source Files n 0 0 0 0 cece eee eee 3 14 SQABasic Header Files 0 000 TA eee eee 3 16 Using Filters to Open SQA Basic Files 3 17 Header and Library Source File Examples 3 18 The Template File 520h wets Aaesigsi ok toate EREA 3 19 4 Creating Verification Points in GUI Scripts About Verification Points 0 cece eee eee eee 4 1 Verification Points and Data Files 4 1 Verification Points and Scripts 00000 4 2 Types of Verification Points 0 eee 4 3 Before You Create a Verification Point 000 4 6 Tasks Associated with Creating a Verification Point 4 6 Starting to Create a Verification Point 4 7 Setting a Wait State for a Verification Point 4 8 Setting the Expected Result for a Verification Point 4 9 Selecting and Identifying the Object to Test 4 10 Selecting a Verification Method 02 0000 4 14 Selecting an Identification Method 4 4
360. testers are loading the server thereby providing maximum workload at a critical time 8 9 Adding Features to Scripts Inserting Synchronization Points You can insert a synchronization point into a script through Robot or into a suite through TestManager gt Into a script You can insert a synchronization point into a script in one of the following ways During recording through the Sync Point toolbar button or through the Insert menu During script editing by manually typing the synchronization point command name into the script Insert a synchronization point into the script to control exactly where the script pauses execution For example you can insert a synchronization point command just before you send a request to a server You should also use this method if the synchronization point depends upon some logic that you add to the script during editing gt Into a suite You can insert a synchronization point into a suite through the TestManager Synchronization Point dialog box Insert a synchronization point into the suite to pause execution before or between scripts rather than within a script In addition inserting a synchronization point into a suite offers these advantages You can easily move the location of the synchronization point without having to edit a script The synchronization point is visible within the suite rather than hidden A script can have multiple synchronization
361. that playback waits based on specific conditions rather than on absolute time For information see Setting a Wait State for a Verification Point on page 4 8 Setting Wait State Options During playback Robot waits for windows including dialog boxes to appear before executing a user action or verification point command You can specify how often Robot checks for the existence of a window and how long it waits before it times out For example suppose that Robot is playing back a script with the following lines StartApplication MyVBApp exe Window SetContext Name Forml1 Pushbutton Click Name Command5 This example specifies that Robot should start an application find a window on the desktop named Form1 find a pushbutton named Command5 and generate a click on that button However suppose Robot gets to the Set Context line in the script and fails to find a window named Form1 This may not necessarily be an error the application may not yet have started up and created the window In this case Robot keeps looking for the window for a specified period of time 9 7 Playing Back GUI Scripts By default if Robot cannot find a window during playback it waits for 2 seconds and then looks for it again If it still cannot find the window after 30 seconds it times out and returns a command failure indication to the script Script execution continues or stops based on the On script command failu
362. the Datapool a What datapool columns do you need m What data type should you assign each column Do you need to create data types Generate the Code Session Scripts Select the Use datapools recording option Record the transaction s and then stop recording Robot automatically generates datapool commands Robot automatically matches up script variable names with datapool column names GUI Test Scripts m Manually add datapool commands to the script m Match up script variable names with datapool columns Create and Populate the Datapool Session Test Scripts a In Robot click Edit gt Datapool Information Modify DATAPOOL_CONFIG or accept the defaults Session and GUI Test Scripts m In Robot or TestManager define datapool columns including assigning a data type to each datapool column m Generate the data Data Types Data Types A datapool data type is a source of data for one datapool column For example the Names First data type shipped with Rational Test as a standard data type contains a list of people s first names Suppose you assign this data type to the datapool column FNAME When Robot automatically generates the datapool it populates the FNAME column with all of the values in the Names First data type Here is the relationship between data types datapool columns and the values assigned to script variables during playback First Name Data Type Frederick During datapool g
363. the Enabler prepends sqga_mouse_handler to each trigger This is necessary for Robot to correctly record mouse actions against these objects If you need to prevent this modification clear the Modify local WHEN MOUSE ENTER triggers option in the Enabler See the next section Running the Enabler In this case the Enabler displays warning messages in the Status window when it detects any of these local triggers You can leave the triggers and the Object Testing Library in your application when you distribute it For more information see Distributing Your Application on page 12 6 Running the Enabler To run the Enabler which adds the Object Testing Library and triggers to your application 1 Start the Rational Test Oracle Forms Enabler from the folder in which it was installed the default folder is Developer 2000 12 3 Testing Oracle Forms Applications The following dialog box appears Rational Test Oracle Forms Enabler x Oracle FMB file ooo r Enable mode Add Rational Test Object Testing Library C Remove Rational Test Object Testing Library IV Backup original FMB file I Enable all FMB files in selected directory Generate each selected FMB file Status Enable Advanced Close 2 Click Browse Select the fmb file that you want to make testable and click OK Click Add Rational Test Object Testing Library 4 Set the following options as needed Backup original FMB file Creates a bac
364. the options on each tab miliseconds Delay between keystrokes fo a milliseconds C Use recorded typing delays I Skip verification points I Acknowledge results M Robot window Minimize Robot Put Robot in background Display script only C Display menus and toolbars only 0K J Tancer Click OK or change OE Ed other options Setting GUI Playback Options Acknowledging the Results of Verification Point Playback By selecting the Acknowledge results check box you can have Robot display a results message box each time it plays back a verification point For example in the following figure the message box indicates that the verification point named Object Properties failed during playback You must click OK before playback continues During the test development phase this lets you interactively view the playback results of each verification point Rational Robot Acknowledge Verification Point Result Eq i Verification Point Object Properties failed Click OK to continue playback During the regression testing phase you usually play back scripts in unattended mode By clearing the Acknowledge results check box you can prevent Robot from displaying this message box After the script plays back you can view the results of all verification points in the log To set this option 1 Open the GUI Playback Options dialog box See Setting GUI Playback Options on page 9 4 2 Inthe
365. the password is recorded and stored in the Authentication Datapool gt Ifthe server does not allow a user to log into the database multiple times simultaneously In other words suppose Robot detects your user ID and password when you record a script Robot writes the information to the Authentication Datapool During playback TestManager retrieves your user ID and password from the Authentication Datapool and uses the information to log the virtual tester into the database Modifying the Authentication Datapool with TestManager 6 42 To modify the Authentication Datapool with TestManager 1 In TestManager click Tools gt Manage gt Datapools Click RTAuthentication the Authentication Datapool Click Edit PF WN Click Edit Datapool Data in the Datapool Properties dialog box Authenticating Logon Information 5 Each row in the Edit Datapool dialog box contains the following information Datapool Column State Class Subclass Service Login Password Meaning Whether the password in this row is ACTIVE or INACTIVE Select one of these choices from the list box If a user provides a password for a particular service and the Authentication Datapool already contains a password for that user and service Robot automatically makes the currently provided password active and the earlier password inactive If there is more than one active password Robot uses the first active password that it finds in the Authent
366. ther a failure is a defect or an intentional change to the application under test There are four Comparators as follows Comparator Description For Information See Object Properties Compares the baseline data to the Object Properties data that caused a failure for the Comparator Help Object Properties verification point Text Compares the baseline data to the Text Comparator Help data that caused a failure for the Alphanumeric verification point Grid Compares the baseline data to the Grid Comparator Help data that caused a failure for the following verification points Clipboard Menu and Object Data Image Compares the baseline image to the Image Comparator image that caused a failure for the Window Image or Region Image verification points Also lets you view unexpected active windows that cause a failure during playback To open a Comparator from the log Help gt Inthe Log Event column of a log select a verification point and click View gt Verification Point Analyzing Verification Point Results with the Comparators As the following figure shows selecting an Object Properties verification point in the log and clicking View gt Verification Point opens the Object Properties Comparator AR MLtestrepo Rational TestManager Test Log OPCtest of x File Edit View Reports Tools Window Help ajx lasssjug i e ejps s s7 PaRRE ix Suite m Test Plans H Iterations
367. thod Proxy tab Select the client server pair to delete from the Client Server pairs for recording list Click Remove and then click OK Deleting a Proxy To delete the proxy relationship between a server and its proxy 1 Bt ON St OB ON Click Tools gt Session Record Options Click the Method tab and make sure that Proxy recording is selected Click the Method Proxy tab Click Proxy Admin The Proxy Administration dialog box appears In the grid of existing proxies select the proxy to delete Click Delete Proxy In the Delete Proxy dialog box click one of the following buttons Wait for all connections to close accept new connections Delete the proxy as soon as it is no longer in use If the proxy is currently in use allow new connections This selection is associated with the proxy state CLOSE_WAIT Wait for all connections to close do not accept new connections Delete the proxy as soon as it is no longer in use If the proxy is currently in use do not allow new connections This selection is associated with the proxy state CLOSE WAIT _NOCONN Immediately close all connections Delete the proxy immediately If the proxy is currently in use close the connections 6 47 Setting Recording Options 8 Click Delete In the Proxy Administration dialog box the proxy that you deleted has either been removed or is still present but has a modified state depending on your choice in step 7 Re Cre
368. thods on page 4 18 4 15 Creating Verification Points in GUI Scripts By Content Use this method to verify that the recorded values exist during playback This method is location independent For example if you record a value of 100 the verification point passes as long as the value 100 exists during playback The following figure shows baseline data captured using Items By Content During playback the verification point passes because the recorded value exists even though its location changes Corporate Training Corporate Training Gizme Deluxe Gizmo Deluxe LEIFA L Mini Widget Mini Widget Network Services Network Services Baseline Playback Pass By Location Use this method to verify that the recorded values exist in the same locations during playback For example when you test items in a menu use By Location to verify that the locations of the recorded menu items remain the same during playback You can also use By Location to verify that the locations of recorded column and row values remain the same during playback The following figure shows baseline data captured using Columns By Location and Rows by Location During playback the verification point passes because the locations of the recorded values remain the same CustomerName Address _CustomerName Address jAcme Metal Working 909 East Green Concord Al Woodworking Ltd 542 Great Aven Needham Al Woodworking Ltd 542 Great AveniNeedham Barry
369. tically generate datapool commands in a session script Create a datapool and automatically 3 generate datapool values Edit the DATAPOOL_CONFIG section of a session script Edit datapool column definitions re and datapool values Create and edit datapool data types Perform datapool management activities such as copying and renaming datapools Import and export datapools Import data types This chapter describes how to perform all of these activities 10 2 What Is a Datapool Rational TestManager User s Guide Managing Datapool Files A datapool consists of two files gt Datapool values are stored in a text file with a csv extension gt Datapool column names are stored in a specification spc file The Robot or TestManager software is always responsible for creating and maintaining this file You should never edit this file directly csv and spc files are stored in the Datapool directory of your Robot project Unless you import a datapool the Robot or TestManager software automatically creates and manages the csv and spc files based on instructions you provide through the user interface If you import a datapool you are responsible for creating the csv file and populating it with data However the Rational Test software is still responsible for creating and managing the spc file for the imported datapool For information about importing datapools see Ra
370. time assigns a value to the script variable in Name from the corresponding datapool column You can override the runtime meaning of all INCLUDE directives by selecting Always in the Use Test Script Data group box With Always selected all script variables are assigned the associated values in the Test Script Data column gt EXCLUDE During datapool creation does not create a column for the script variable in Name During suite runtime assigns the value in Test Script Data to the script variable in Name Datapool values are not used gt OVERRIDE During datapool creation creates a column for the script variable in Name The column is assigned the same name During suite runtime assigns the value in Test Script Data to the script variable in Name Datapool values are not used You can select multiple Usage items using standard Windows selection methods for example holding down the CONTROL key while clicking each item to change When all items are selected right click on one of them to change them all Name The name of a script variable that is assigned a value during recording If Robot creates a datapool column for this variable if Usage is either INCLUDE or OVERRIDE the datapool column is assigned the same name This value can only be modified in the script Type The data type of the value in Test Script Data The data type is always string This value can only be modified in the script
371. ting an Object s Data 0 eee eens 12 14 Testing Base Table Blocks and Base Table Items 12 14 Testing LOVs and Record Groups 02 005 12 15 13 Testing HTML Applications About Robot Support for HTML Applications 13 1 Configuring Your Browser for Testing 0 13 2 Disabling the Cookie Prompt 0000004 13 2 Making HTML Applications Testable 0000004 13 3 Verifying That the HTML Extension Is Loaded 13 3 Enabling HTML Testing in Robot 0 13 3 Enabling Cache for Netscape Recording and Playback 13 4 Testing Data in HTML Elements 00000004 13 5 Additional Examples o n onua 0 13 7 How Robot Maps HTML Elements 0000004 13 9 Supported Data Tests for HTML Testing 13 11 Testing Properties of HTML Elements 13 12 Playing Back Scripts in Netscape Navigator 13 13 Configuring Robot for Netscape Playback 13 13 Differences Between Internet Explorer and Navigator 13 14 Rec rdin Tipsa sien ras hes Stee hse aes he ani lente 13 15 Capturing the Properties of Java Applets in HTML Pages 13 15 Synchronizing Pages cc 2 incase ae pace A Ge 13 16 Recording Mouse Movements 000000000 eee 13 17 Ensuring Browser Compatibility 0000 13 17 Enhancing Object Recognition of HTML Elements 13 18
372. tion Point Transposing Columns and Rows in a Data Grid You can transpose the view of the data in the grid by selecting the Transpose view check box in the Verification Point dialog box When the view is not transposed data appears in standard rows and columns Column widths are adjusted according to the contents of each column 542 Great Avenue 4 Barrymore Company 8431 Main Street 5 Olympic Fabricators Inc 7483 West Way I When the view is transposed columns become rows and rows become columns Column widths become the same size the maximum size needed Transpose view is a display option only It does not affect how Robot captures information Transpose view is not available for a menu because Robot treats each menu as a separate entity rows of menu items are not recognized For example Robot does not treat the fourth menu item in one menu and the fourth menu item in another menu as though they were in the same row Editing a Verification Point When you record a verification point in a script the verification point is stored in the project along with any associated files The verification point name appears in the Asset pane of the Robot Script window You can view and edit the baseline file of a verification point in one of the Comparators You can rename copy or delete any verification point in a script NOTE The following verification points are not stored in the project and do not ap
373. tional TestManager User s Guide NOTE TestManager automatically copies a csv file to each Agent computer that uses it If an Agent s csv file becomes out of date TestManager automatically updates it Datapool Cursor The datapool cursor or row pointer can be shared among all users who access the datapool or it can be unique for each user Sharing a datapool cursor among all users allows for a coordinated test Because each row in the datapool is unique each user can share the same cursor and still send unique records to the database Also a shared cursor can be persistent across suite runs For example suppose the last datapool row accessed in a suite run is row 100 gt Ifthe cursor is persistent across suite runs datapool row access resumes with row 101 the first time the datapool is accessed in a new suite run gt Ifthe cursor is not persistent datapool row access resumes with row 1 the first time the datapool is accessed in a new suite run NOTE GUI users can share a cursor when playback occurs in a TestManager suite but not when playback occurs in Robot For information about defining the scope of a cursor see the description of the Cursor argument on page 10 16 10 3 Working with Datapools Row Access Order Row access order is the sequence in which datapool rows are accessed at test runtime With GUI scripts you can control the row access order of the datapool cursor through the sequence argument
374. tiplies wait state and delay values Set Timeout Multiplier value 10 IV Show errors in the log c Select the type of T Show warnings in the log information to show in the T Show informationals in the log log 4 Setting GUI Playback Options NOTE Ifa diagnostic tool was selected when the application was started during recording that tool overrides the tool selected in the GUI Playback Options dialog box For Visual C C and Visual Basic applications the instrumentation added by these tools causes the application under test to run considerably slower than the uninstrumented program For Java applications the event monitoring causes the application to run slower than usual If you select Set timeout multiplier value Robot compensates for this effect by multiplying wait state values for windows wait state values for verification points and delay values between user action and verification point commands and between keystrokes by the specified value If you need to fine tune the wait states and delays further see Setting Wait State and Delay Options on page 9 7 Set timeout multiplier value is not used if the application is not run under a diagnostic tool If you selected any of the log check boxes in step 2c click the Log tab and select both Log management check boxes Log Log management M View log after playback If Output playback results to log is cleared the diagnostic tool opens inste
375. to detect the completion of a task before stopping the timer The following is an example of using timers for specific task performance testing 1 During recording start a timer 2 Start an application task or transaction for example open an application or start a database query 3 Insert a verification point with a wait state For example insert a Window Existence verification point that waits up to 30 seconds for a window that indicates the task is complete Adding Features to GUI Scripts 4 5 Stop the timer Continue recording other actions or stop the recording After you play back the script the log shows the timing results Inserting a Timer fo fo To insert a timer while recording or editing a script 1 6 Do one of the following Ifrecording click the Display GUI Insert Toolbar button on the GUI Record toolbar Ifediting position the pointer in the script and click the Display GUI Insert Toolbar button on the Standard toolbar Click the Start Timer button on the GUI Insert toolbar Type a timer name 40 characters maximum and click OK If you start more than one timer make sure you give each timer a different name Perform the timed activity Immediately after performing the timed activity click the Stop Timer button on the GUI Insert toolbar Select a timer name from the list of timers you started and click OK Playing Back a Script That Includes Timers 3 10
376. tonaming feature Autonaming inserts your specified characters into the Name box of a new script and appends a consecutive number to the prefix This is a useful feature if you are recording a series of related scripts and want to identify their relationship through the prefix in their names For example if you are testing the menus in a Visual Basic application you might want to have every script name start with VBMenu To turn on script autonaming 1 Open the GUI Record Options dialog box See Setting GUI Recording Options on page 2 5 2 Inthe General tab type a prefix in the Prefix box Clear the box if you do not want a prefix If the box is cleared you need to type a name each time you record a new script 3 Click OK or change other options Setting GUI Recording Options The next time you record a new script the prefix and a number appear in the Name box of the Record GUI dialog box In the following figure the autonaming prefix is Test When you record a new script Test7 appears in the Name box because six other scripts begin with Test GUI Record Options 1 1x General Robot Window Object Recognition Order Script autonaming Prefix Test lt The prefix in the Script autonaming box appears as the name of the new script A consecutive number is appended to the prefix Name Description Owner Created B Eil test Admin Admin E test2 Admin Admin E test3 Admin Admin
377. tructions see Creating an Object Data Verification Point on page 4 8 Use the Object Data verification point to define additional data tests For instructions see Defining a Data Test on page 4 11 NOTE Before you can test a Delphi application run the Rational Test Delphi Enabler For instructions see Making Delphi Applications Testable on page 17 2 ee Pat VI Appendixes gt gt gt APPENDIX A Working with Data Tests This appendix describes how to work with data tests which are used with the Object Data verification point This appendix includes the following topics gt gt gt gt About data tests An example of a data test Creating or editing a custom data test Copying renaming or deleting a data test For information about the Object Data verification point see Object Data verification point in the Robot Help Index About Data Tests The Object Data verification point supports data tests to capture the data in objects In general there are two types of data tests gt Built in data tests Delivered with Robot Built in tests are available to all users no matter which repository they are using These tests cannot be edited renamed or deleted but they can be copied and viewed Custom data tests Created within your organization Each custom data test is stored in the repository that was active when the data test was created If you switch to a different repository the custom data te
378. ttp_disconnect D141_217_90_ 3 80 17 A Stop Block command ends the current block blockc stop time blockc Stop Block moe_si_umich_edu_80 http_request blockB013 sae Resume blockB transaction http _nrecv blockB018 100 5076 bytes http_disconnect moe_si_umich_edu_80 A second Stop Block command ends the current block blockB stop time blockB Stop Block ntdwwaag_vl_compuserve_com_80_ 38 http_request BlockA023 2 Ae Resume blockA transaction http_nrecv BlockA031 100 3791 3787 bytes http_disconnect ntdwwaag_v1_compuserve_com_80_ 38 A third Stop Block command ends the current block blockA stop time blockA Stop Block 8 7 Adding Features to Scripts Synchronization Points A synchronization point lets you coordinate the activities of a number of virtual testers by pausing the execution of each tester at a particular point the synchronization point until one of the following events occurs gt All virtual testers associated with the synchronization point arrive at the synchronization point gt A time out period is reached before all virtual testers arrive at the synchronization point You specify the time out period in the TestManager Synchronization Point dialog box gt You manually release the virtual testers while monitoring a suite run in TestManager When one of the above events occurs
379. tures and compares the data inside standard Windows ABC Manufacturing Inc 23 Broadway Dayton objects Also provides specialized support for Acme Metal Working Corp B09 East Greenway Concord i 7 A1 Woodworking Ltd 642 Great Avenue Needham environment specific objects such as Visual Basic Data x Barrymore Company B431 Main Street New York controls ActiveX controls HTML and Java objects PowerBuilder DataWindows and Oracle Forms base table blocks Robot provides many data tests that are used with the Object Data verification point A data test is a mechanism for capturing the data of objects For information about creating your own data tests see Appendix A Working with Data Tests Object Properties BHE Captures and compares the properties of standard Windows objects Also provides specialized support for environment specific objects such as Visual Basic Data C RGB 255 255 255 controls ActiveX controls HTML and Java objects peck o Link window p orderStyle Fixed Single PowerBuilder DataWindows and Oracle Forms base table ClassName TextBox blocks DataChanged False 4 4 Continued Verification Point Type Region Image Captures a region of the screen as a bitmap The captured region is a pixel by pixel representation that includes colors height and width Types of Verification Points Example roas ivin lt gt bead Web Site Compare Captures a baseline of a Web site and compares i
380. u can regenerate a session s scripts from the session file To do so 1 In Robot click Tools gt Regenerate Test Scripts from Session 2 Click the name of the session to use You can regenerate scripts that are contained within a session but not those that have been deleted from the session To see the scripts in a session click the session name click Properties and then click Contained Scripts Click OK The Generating Scripts dialog box appears This dialog box shows how script regeneration is progressing After a few seconds or longer depending on the length of the session regeneration ends the message Completed successfully appears and the OK button is enabled 3 Click OK to acknowledge that the regeneration operation is complete Changing Recording Options When you regenerate a session s scripts you can change many of the recording options that were set when the script was recorded You can change the options in the following Session Record Options tabs gt Generator gt Generator Filtering gt Generator per Protocol 7 19 Recording Sessions For example you can gt Select Use datapools to add datapool commands to the script even if the original script had no datapool commands generated for it Conversely clear this check box to have no datapool commands included in the new script gt Select a different Display returned data value from the one used in the original script gt Set differe
381. u have made in this dialog box and then closes the dialog box When you close the dialog box requests represented by shaded items are generated to the script 7 13 Recording Sessions Example of Manually Filtering Protocols The following figure shows the Manual Filtering dialog box Specify the hierarchical order of client server and protocol names in the tree Choose a new protocol to replace the selected rotocol in the tree Sort Order Protocol Server Client fi Protocol HTTP v Eiltering C Include Exclude x Partially shaded items indicate that some connections are included and some excluded in the generated script al Specify whether to 205 138 003 220 80 include or exclude the selected item in the PB 205 065 128 125 80 generated sciipt 4204 1 76 7 198 deploy akamaitechnologies cor Shaded red items are included in the script a204 176 7 218 deploy akamaitechnologies coi 4204 1 76 7 232 deploy akamaitechnologies cot E a204 176 7 233 deploy akamaitechnologies cor Fel a204 178 123 114 deploy akamaitechnologies Tree displaying the CI hite i names of the ear white items are a204 178 123 50 deploy akamaitechnologies c recorded excluded from the script TNA 170 199 R1 darian al ara sihaakyalasian a connections gt Cancel Help Current tree order set to Protocol Server Client
382. ubmits a page to be processed Click the Object Data Verification Point button on the GUI Insert toolbar Assign a name wait state and expected result for the verification point and then click OK as described in Tasks Associated with Creating a Verification Point on page 4 6 In the Select Object dialog box drag the Object Finder tool over the page until the element that you want to test appears in the TestTip as described in Selecting and Identifying the Object to Test on page 4 10 For example to test for the existence of a particular string of text on a page any text within the lt BODY gt and lt BODY gt tags drag the Object Finder tool over the page until HTMLDocument appears in the TestTip and in the Selected Object field You can see examples of these items in the following figure 13 5 Testing HTML Applications Microsoft Internet Explorer File Edit View Go Favorites Help 8 2 6 2 a Ss ela Stop Refresh Home Search Favorites History Channels Fullscreen Mail Address ae http aries web ClassicsWeb default htm I yi Special Offer from Search CDs B Classics Online Buy I Ludwig Van Beethoven uy It Symphony No 9 The Burlington a Orchestra s classic d Confirm a recording of Order Beethoven s Ninth for only Links 12 95 Home The Burlington Orchestra About Classics Online Za Local intranet zone Object Finder tool TestTip For a list
383. uter as a client Select Server System to list this computer as a server Click Add Take the following steps to use a port number with the network name A port number is required for servers used in proxy recording a Inthe Ports group type a name to associate with the port number that you are adding You can assign any name up to 40 characters b Type the port number to use with the computer s network name c Click Apply then OK Removing a Computer or Port 11 Click Close The computer is now added to the Rational project and appears in the list of computers Alternatively you can also use Rational Administrator to define a computer If you use Administrator you can define additional information such as the computer s operating system Removing a Computer or Port To remove a client or server computer from the Method Network tab 1 Click Tools gt Session Record Options 2 Click the Method Network tab 3 Click Manage Computers 4 Inthe Name box of the Computers group select the computer name to remove from the list 5 Click Delete 6 Click Close To remove a port name and number from a computer s address or edit the information 1 Click Tools gt Session Record Options 2 Click the Method Network tab 3 Click Manage Computers 4 Inthe Name box of the Computers group select the computer name associated with the port that you are removing 5 Under Ports select the port name t
384. ve to match Numeric Equivalence Verifies that the values of the data captured during recording exactly match the values captured during playback For example if you select 24 25 during recording the test passes during playback only if the captured value is 24 25 Tasks Associated with Creating a Verification Point Numeric Range Verifies that the values of the data captured during recording fall within a specified range during playback You specify the From and To values for the numeric range During playback the verification point verifies that the numbers are within that range For example you can capture a list containing a range of salaries and then set the high and low values of the range The test passes during playback only if all of the salaries are within the set range User Defined and Apply a User Defined DLL test function Passes text to a function within a dynamic link library DLL so that you can run your own custom tests You specify the path for the directory and name of the custom DLL and the function The verification point passes or fails based on the result that it receives back from the DLL function Use the Apply a User Defined DLL test function method with the Alphanumeric verification point Use the User Defined method with all other verification points Verify that selected field is blank Verifies that the selected field contains no text or numeric data If the field is blank the verification point
385. ve verification method you can ensure that Robot always tests for the text thank you for shopping with Classics Online regardless of the text that surrounds it For more information about verification methods and the Object Data Verification Point dialog box see Working with the Data in Data Grids on page 4 19 Click OK 10 When finished click the Stop Recording button on the GUI Record toolbar Additional Examples This section provides some additional examples of creating Object Data verification points for HTML elements To Test the Contents of a List Box 1 PF WN Add an Object Data verification point Select the ListBox with the Object Finder tool Select a Contents data test Select the Case Sensitive verification method to test for the entire contents of the list box Select the Find Sub String Case Sensitive verification method to test for a subset of the list box items 13 7 Testing HTML Applications 13 8 To Test for Text within a Table 1 Add an Object Data verification point 2 Select the HTMLTable object with the Object Finder tool 3 Select a Contents data test 4 Select the Case Sensitive verification method to test for all of the text in the table Select the Find Sub String Case Sensitive verification method to test for any text item with the table You can edit the text that the verification point captures For information see Editing Data for a Clipboard or Object Data Verification Poin
386. verifying that extension is loaded 15 2 prefixes autonaming scripts and sessions 6 37 Index command ID 6 16 6 32 6 33 6 35 DCOM command ID 6 35 IIOP command ID 6 33 TUXEDO command ID 6 32 prefixes autonaming GUI scripts 2 6 printing scripts 5 7 SQABasic files 5 7 private datapool cursors 10 16 project managing with Rational Administrator 1 2 selecting 1 2 Project Enabler Delphi 17 2 project header files creating and editing 3 17 properties session 7 20 testing objects 4 4 properties of scripts accessing from session properties 7 21 defining 7 22 defining in Robot 2 23 status when re recording scripts 7 26 status when re recording sessions 7 24 7 25 protocols converting 7 15 filtering 6 22 6 24 7 11 Java applets 6 26 Jolt 6 25 selecting for scripts 6 24 socket 6 26 TUXEDO definition 6 26 proxy computers 6 8 associating with a server 6 10 computer shutdown and 6 44 creating 6 10 deleting 6 47 monitoring 6 46 Index 9 Using Rational Robot reassociating with a client server pair 6 48 redefining after proxy service is stopped 6 45 status 6 46 proxy recording 6 2 6 7 6 9 client server relationships 6 8 computer shutdown and 6 44 creating a proxy computer 6 10 defining a client or server computer for 6 40 filtering protocols 6 22 identifying client server pairs 6 11 starting applications 6 38 proxy service computer shutdown and 6 44 starting 6 44 stopping 6 44 PureCoverage using with Robot 3 3 9 11
387. w Minimize on start recording Select this check box to minimize the Session Recorder window when you start recording Clear this check box to display the window in a normal state Defining a Client or Server Computer During recording the Session Recorder icon is displayed in the taskbar to the left of the clock The icon blinks when Robot is capturing a request or response This icon serves as a visual cue that Robot is recording even when the Session Recorder window is minimized Show Rates view Select this check box to display the number of calls and bytes in the current three second interval Show Statistics view Select this check box to display the total number of calls and bytes in the recording session Show Annotations view Select this check box to display the comments start stop blocks timers or synchronization points that you insert into the script during recording Rates view Statistics view res eE r Rates Statistics Calls n Interval Total aia Cals fO 3750 Bytes in z interval Bytes 0 pieste r Annotations SyncPoint synch point Comment commenthere Ready NUM VA nnotations view Defining a Client or Server Computer If you are using network or proxy recording and the computer that you want to use is not listed in the Method Network and Method Proxy tabs you can add it to the list 6 39 Setting Recording Opti
388. w level recording Robot tracks detailed mouse movements and keyboard actions by screen coordinates and exact timing Robot records these low level actions in a binary script file You can view an ASCII version of this binary file You can also rename copy or delete the file A low level script is stored in the project and is always associated with a Robot script When you create a low level script its name appears in the Asset pane of the Script window If you delete a Robot script its associated low level scripts are also deleted Editing Compiling and Debugging Scripts Viewing Low Level Scripts You cannot edit the low level binary file but you can use Notepad to view an ASCII version of the binary file To view the low level script file 1 In the Asset left pane of the Script window expand Low Level Scripts if necessary by clicking the plus sign 2 Double click the number of the low level script that you want to view in Notepad Fi testi oix Verification Points ES Object Properti Window SetContext Ca E Object Data Window WMinimize E fe Low Level Scripts Double click the low level r m Window SetTestContext i Result ListViewVP C script in the Asset pane to view an ASCII version of the binary file Window ResetTestContex PlayJrnl 001 The low level ASCII file lists the actions that occurred during low level recording For information a
389. x Either accept the defaults in the Configure Datapool in Test Script dialog box or make any appropriate changes Use the table on page 10 16 to help you modify the settings in this dialog box When finished making any changes click Save Click Edit Existing Data 10 23 Working with Datapools 6 Inthe Edit Datapool dialog box edit datapool values as appropriate For information about editing datapool values see Rational TestManager User s Guide 7 When finished editing datapool values click Save and then click Close For an example of the datapool values that TestManager generates see Rational TestManager User s Guide Canceling Your Edits To abandon all the edits that you made in the Edit Datapool dialog box click Cancel or the ESC key With either action all your edits are abandoned and the Edit Datapool dialog box closes Using Datapools with GUI Scripts 10 24 A GUI script can access a datapool when it is played back in Robot Also when a GUI script is played back in a TestManager suite the GUI script can access the same datapool as other GUI scripts and session scripts There are differences in the way GUI scripts and session scripts are set up for datapool access gt You must add datapool commands to GUI scripts manually while editing the script in Robot Robot adds datapool commands to session scripts automatically gt There is no DATAPOOL CONFIG statement in a GUI script The command SQADat
390. y The client application accesses secure Required data from a Web server The client application accesses data Recommended First alternate Second alternate from a Web server Setting Recording Options 6 4 Situation API Network Proxy The client application accesses objects Required on a DCOM server The client application accesses an Required Oracle 8 database The client application accesses an Recommended First alternate Second alternate Oracle database For network and proxy recording supply the name of the Oracle database For more information see Providing the Name of an Oracle Database on page 6 31 The client application is not installed Recommended Alternate on the Local computer The client application is not running Recommended Alternate on Windows NT 4 Windows XP or Windows 2000 You want to record traffic from Recommended Alternate multiple client applications that reside on different computers You want to record traffic between Recommended multiple specific client and server computers Neither the client nor the server computer is on the same network segment as the Local computer Required An Ethernet switch controls network traffic and neither the client nor the server application is installed on the Local computer Required The client application accesses a Recommended Alternate TUXEDO server On the wire recording support is Recommended Alternat
391. y compiles the script if it has changed since it last ran and displays the Playback toolbar The following table describes the commands on the Debug menu Debug Command Go b Description Plays back the currently open script Executes until either the next breakpoint or the end of the script whichever comes first Go Until Cursor L Plays back the currently open script stopping at the text cursor position Executes until either the next breakpoint or the end of the script whichever comes first Animate fies NE Plays back the currently open script displaying a yellow arrow in the left margin ofeach line or highlighting the line as it executes Executes until either the next breakpoint or the end of the script whichever comes first Pause Pauses playback To resume playback click Debug gt Pause Stop Stops playback Set or Clear Breakpoint y Sets or clears a breakpoint at the cursor position Ifyou set a breakpoint Robot inserts a solid red circle in the left margin or highlights the line Ifyou clear a breakpoint Robot removes the circle or highlighting Debug Command Clear All Breakpoints Debugging GUI Scripts Description Clears all breakpoints in the script Step Into A Iml Begins single step execution The subprogram you initially step into is Main Executes one command at a time Step Over A til Enabled after you step
392. you can insert during recording Recording Sessions The activity that the window displays varies depending on your recording method gt With API recording the window displays the number of API calls and bytes sent from your computer gt With network recording the window displays the number of IP packets and the bytes in these packets However the information may not be from your computer only For example if you are recording the activities of any client in the Client list the Session Recorder window reports the activity of all clients on the network not just the activity of your computer gt With proxy recording the window displays the number of IP packets and the bytes in these packets gt Only the annotations window displays with custom recording The Session Recorder Icon During recording the icon associated with the Session Recorder window is displayed on the taskbar The icon blinks whenever Robot is capturing a request or response This icon serves as a visual cue that Robot is recording even when the Session Recorder window is minimized Canceling Scripts During Recording During session recording you can cancel script generation After you cancel them the scripts are deleted This feature is useful if you make errors while recording a session or if you want to exclude nonessential or preliminary activity such as logging in or navigating to the Web site that you want to test For example if you
393. you record a script play it back to verify that it works as intended Use the same build of the application under test that you used to record the script After you play back the script Robot writes the results to a log Use Rational TestManager to view the log The results should validate the baseline of expected behavior for the application under test For more information see Chapter 9 Playing Back GUI Scripts Editing and Compiling the Script After you play back a script you may decide to edit the script to make it more usable For example you may want to insert a new verification point or change some text of the script You may also want to print your script or compile changes For more information see Chapter 5 Editing Compiling and Debugging Scripts Debugging the Script 2 24 You may need to debug your script to locate errors Robot includes a complete built in debugging environment to assist you during the development phase of your GUI script For more information see Debugging GUI Scripts on page 5 9 Creating Shell Scripts to Play Back Scripts in Sequence Creating Shell Scripts to Play Back Scripts in Sequence After you have created each GUI script and verified that it performs as intended you may want to group the scripts into a shell script A shell script is a script that plays back other scripts in sequence For example you could have gt One script that starts your application gt A second that
394. you want to overwrite the log do one of the following Click Yes to overwrite the log Click No to return to the Specify Log Information dialog box Change the build log folder and or log information Click Cancel to cancel the playback This prompt appears if you selected Prompt before overwrite log in the Log tab of the GUI Playback Options dialog box When you begin playback the Robot main window is minimized by default You can change this behavior in the Playback tab of the GUI Playback Options dialog box NOTE To stop playback of a script press the F11 key Robot recognizes the F11 key only when playing back object oriented commands The F11 key does not stop playback during low level actions After playback you can see the results in the log as described in the next section Viewing Results in the TestManager Log Viewing Results in the TestManager Log After playback finishes you can use the log to view the playback results including verification point failures procedural failures aborts and any additional playback information AR MLtestrepo Rational TestManager Test Log OPCtest ojx ES File Edit View Reports Tools Window Help la x josss umg re ax Suite Sy Test Plans Iterations Build Log Folder Iteration EET ooo Bat Defaut ts Start Date Time fio 3 00 05 15 10 PM End Date Time ELETI JEv
Download Pdf Manuals
Related Search
Related Contents
GAZ MEDICAUX EN BONBONNES / BOUTEILLES AUX HUG UNIVERSITI TEKNOLOGI MALAYSIA TouchScreen Profiler User`s manual Operating instructions OSRAM VISION sensor Patton electronic 1082/I Network Card User Manual Configuratore web DV-RP100 取扱説明書 LTF - Language Translation Utility User Guide DTV-2U - Power Acoustik Copyright © All rights reserved.
Failed to retrieve file