SlideShare a Scribd company logo
Rational Robot [email_address] www.itest.co.nr
Courseware Information This introductory course is designed to familiarize testing professionals with the basics of Rational's functional test automation tool, Rational® Robot. The focus will be on applying Rational Robot to resolve common automated testing challenges and to build effective, versatile test scripts through best practices.
Rational Robot Basics 4. View logs 2. Script  Recording 3. Script  Playback 1. Rational Robot  Basics
DataPool What is Datapool Test dataset Supplies data values to the variables in a script during script playback It will automatically pump test data to virtual testers under high-volume conditions
Creation of Datapool Creating and Populating Datapool Datapool Creation Rational Robot Rational Test Manager
Datapool through Test Manager Click Tools -> Manage -> Datapools Specify Name Define Datapool fields Assign data type to the datapool columns Specify number of records to generate Click Generate Data
Rational Suite Suite Contains items such as user or computer groups Resource assigned to each group Test scripts Number of times each test script runs
Rational Suite Usage of Test Suite Assign test cases to computers and rerun the test cases without having to reassign them Run test scripts and test cases on the next available computer, thus speeding up testing process Set preconditions on items in a suite, which require that they complete successfully before the next item in the suite runs Group test scripts to emulate the actions of different types of testers Set the order in which test scripts run Synchronize testers Suite can contain GUI test scripts, VU test scripts, VB test scripts, Java test scripts or other user defined test script types
Creation of Suite Suite can be created in the following way Performance Testing Wizard Functional Testing Wizard Existing Session Existing Suite Blank Performance Testing or Functional Testing Suite
Verification Points Verification Point Point in a script that we create to confirm the state of an object across builds of the application under test. During Recording, the VP captures object information and stores it in a baseline data file. While playing back against a new build, Robot retrieves the information in the baseline file for each VP and compares it against the baseline data file.
Verification Point Types of Verification Points Alphanumeric Clipboard File Comparison File Existence Menu Module Existence Object Data Object Properties Region Image Website Compare Window Existence Window Image Window Scan
Alphanumeric VP Alphanumeric verification point will be used to capture and test alphabetic or numeric values from a single or multi-line edit box or from other Windows objects that Robot recognizes. 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 VP Clipboard verification point will be used to capture text contained in objects that cannot be captured using any of the other verification points. To use the Clipboard verification point, the application-under-test must supply a Copy or Cut capability so you can place the data in the Clipboard. This verification point is useful for capturing data from spreadsheet and word processing applications as well as terminal emulators. You cannot use it to test bitmaps.
File Verification VP File Comparison verification point will be to compare 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 the file names. During playback, Robot compares the files byte-for-byte.
File Existence VP Use the File Existence verification point to specify a file to look for during playback. 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.
Menu VP Menu verification point will be used to capture the menu title, menu items, shortcut keys, and the state (enabled, disabled, grayed, or checked) of selected menus. Robot records information about the top menu and as many as five levels of sub-menus. Robot treats menu items as objects within a menu and tests their content, state, and accelerator keys regardless of the menu item’s location.
Module Existence VP Use to verify whether a specified module is loaded into a specified context (process), or is loaded anywhere in memory.  In the Windows environment, modules are defined as executable programs (.exe), dynamic link libraries (.dll or other extension), device drivers (.sys or .drv), or display fonts (.fon). 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 may 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 VP Use the Object Data verification point to capture the data inside objects, including: Standard Window controls ActiveX controls Visual Basic Data controls HTML and Java objects Oracle Forms base-table blocks and items PowerBuilder DataWindows and DataStore controls Menus (you can also use the Menu verification point to test a  menu)
Object Properties VP Use the Object Properties verification point to capture and verify the properties of standard Windows objects. This verification point also provides specialized support for environment-specific objects such as Visual Basic Data controls, ActiveX controls, HTML and Java objects, PowerBuilder DataWindows, and Oracle Forms base-table blocks.
Region Image VP Use the Region Image verification point to select a region of the screen that Robot captures and saves as a bitmap. The captured region, which can overlap more than one window, is a pixel-by-pixel representation that includes colors, height, and width. For the verification point to pass, the location of the region and the screen resolution should be the same during record and playback.
Window Existence VP Use the Window Existence verification point to verify the existence and status of a specified window during playback. The status can be normal, minimized, maximized, or hidden. Since the Window Existence verification point does not create a baseline or actual data file, if the verification point fails, you cannot replace baseline data with actual data.
Window Image VP Use the Window Image verification point to select and capture the client area of a window. The menu, title bar, and border are not included as part of the image capture. Robot can capture any window that is partially or fully visible. The window can be overlapped by another window or partially off the screen. When this occurs, Robot captures the window, but saves the non-visible part of the window as black. The captured region is a pixel-by-pixel representation that includes colors, height, and width. For the verification point to pass, the size of the window and the screen resolution should be the same during record and playback.
Adding Datapool Commands to a GUI Script Once you finish a recording session in which you provided values to the application, edit the script and perform these basic tasks: Reference the SQAUTIL.SBH header file Substitute variables for the literal values you provided during  recording Add datapool commands that open the datapool, fetch a row of data from the datapool, retrieve the individual values in the fetched row,  and assign each value to a script variable
Datapool Command - Example '$Include "sqautil.sbh" Sub Main ... Declare variables with Dim statements   ' Open a datapool named CD Orders   Dp=SQADatapoolOpen("CD Orders")   ' Perform the transaction 100 times, using a new    set of data from the datapool each time   For x = 1 to 100 ' Fetch a row from the datapool   Call SQADatapoolFetch(dp)
Datapool Command – Example …. ' Begin the transaction 'Credit Card Number Window SetContext, "Caption=Make An Order", "" EditBox Click, "ObjectIndex=3", "Coords=13,11" ' Assign ccNum a value from datapool column #4 Call SQADatapoolValue(dp,4,ccNum)  InputKeys ccNum  ' Pass the datapool value to the application ... ' Assign other datapool values to other variables Next x Call SQADatapoolClose(dp) End Sub
Extension Manager command Tools -> Extension Manager Use to select the development environments you need to test. Opens the Extension Manager dialog box. The next time you start Robot, support for the selected environments is loaded. Use to control which Robot extensions are loaded. The Extension Manager lists the special IDE (integrated development environments) environments supported by Robot. Select only the environments you need to test. The next time you start Robot, only the selected environments are loaded. Note: Support for C++ applications is always loaded.
Selecting the IDE Extensions to Load 1. Start Robot. 2. Click Tools - > Extension Manager. 3. Select only the environments that you plan to test. To improve performance, clear the check boxes of all environments you do not plan to test. 4. Exit Robot. The next time you start Robot, only the extensions for the selected  environments are loaded.
IDE Extensions - options Verifiying that the Java Extension Is Loaded To test Java applets and applications, you must first make sure that the Java extension is loaded in Robot. The Java extension includes those additions to Robot that allow Robot to test Java. Verifying that the .NET Extension is Loaded The .NET Extension is loaded by default and is required to recognize Visual Studio.NET Windows Forms controls. To verify that the .NET extension is loaded Note: During installation Robot installs some of our assemblies to global assembly cache. If you install Robot before installing the .NET framework, this step is skipped. In order to test your .NET application, you need to either re-install Robot or copy Dotnetspy.dll and interop.mscoreee.dll into your global assembly cache.
IDE Extensions – options ….. Verifying that the HTML Extension Is Loaded To test HTML applications, you must first make sure that an HTML  extension is loaded in Robot. Verifying that the Oracle Forms Extension Is Loaded To test Oracle Forms applications, you should first verify that the  Robot Oracle Forms extension is loaded in Robot. Verifying that the PowerBuilder Extension Is Loaded To test PowerBuilder applications, you should first verify that the  Robot PowerBuilder extension is loaded in Robot. Verifying that the Visual Basic Extension Is Loaded   To test Visual Basic applications
Inspector command (Tools menu) Use to view information about the window, parent, and style of an object, including its window class, ID, and function. Opens the Inspector window. Using the Inspector Use the Inspector to examine window-type objects and display information about those objects, such as class, ID, handle, size, parent data, and style.  1. Click Tools - >  Inspector. The tool will automatically begin the object inspection. It will inspect all of the windows objects on your desktop. When it finishes, the Inspector window opens and displays the results. 2. Optionally, click Refresh Object to refresh the inspection of the selected object.
Inspector command (Tools menu) 3. Optionally, click Refresh All to refresh the inspection of all the objects. 4. You can drag the selection hand to any object and release it to inspect that object. The Inspector can assist in general window-type object identification, but it does not have the Object Testing technology of Robot. For example, the Inspector: Does not display object names. Does not detect Visual Basic "soft" controls like labels and shapes. Does not detect any objects inside of PowerBuilder DataWindows.
Functions & Sub Procedures A Sub procedure does not return a value.  A Function procedure returns a value, and can be used in an expression. To specify the data type for the return value of a function, end the Function name with a type declaration character. If no type is provided, the function defaults to data type Variant. Declares a procedure in a module or dynamic link library (DLL) Declare Sub name [ libSpecification ]  [ ( arg [ As type ], ... ) ] Declare Function name [ libSpecification ]  [ ( arg [ As type ], ... ) ] [ As functype ]
Function – Header File If the libSpecification is of the format: BasicLib "libName"  [ Alias "aliasname" ] the procedure is in another SQABasic module (.sbl or .rec) named libName.  If the libSpecification is of the format: Lib "libName" [ Alias ["]ordinal["] ]  or Lib "libName"  [ Alias "aliasname" ] the procedure is in a Dynamic Link Library (DLL) named libName.
Function - Definition The purpose of a function is to produce and return a single value of as specified type. Recursion is supported. [ Static ] [ Private ] Function name [ ( [ Optional ]arg [ As type ], ... ) ]  [ As functype ] name= expression End Function The data type of name determines the type of the return value. If you don't specify a data type, the default data type Variant is used.  When calling the function, you need not specify the type declaration character.
Function – Definition – Contd.. The Static keyword specifies that all the variables declared within the function will retain their values as long as the program is running, regardless of the way the variables are declared. The Private keyword specifies that the function will not be accessible to functions and sub procedures from other modules. Only procedures defined in the same module will have access to a Private function. SQABasic procedures use the call-by-reference convention by default. This means that if the called procedure changes the value of an argument passed in arg, the new value will apply in the calling procedure as well. This feature should be used with great care. Note: Use Sub to define a procedure with no return value.
Function - Arguments A forward declaration is needed only when function is referenced before it is defined. In this case, the BasicLib, Lib and Alias clauses are not used. Argument is passed to the sub procedure or function. Multiple arguments are separated by commas. The data type of an argument can be specified through a type declaration character or through the As clause.  Arguments of a User-Defined data type are declared through an As clause and a type that has previously been defined through the Type statement.  If an argument is an array, use empty parentheses after the argument name. The array dimensions are not specified within the Declare statement.
Function – Arguments  - Contd.. By default, the actual arguments are passed by Far reference. For external DLL procedures, there are two additional keywords, ByVal and Any, that can be used in the argument list. When ByVal is used, it must be specified before the argument it modifies. When applied to numeric data types, ByVal indicates that the argument is passed by value, not by reference. When applied to string arguments, ByVal indicates that the string is passed by Far pointer to the string data. By default, strings are passed by Far pointer to a string descriptor. Any can be used as a type specification, and permits a call to the procedure to pass a value of any data type
Function – Terminate \ Exit Terminates Loop statements or transfers control to a calling procedure. Exit {Do | For| Function | Sub} Use Exit Do inside a Do...Loop statement. Use Exit For inside a For...Next statement. When the Exit statement is executed, control transfers to the statement after the Loop or Next statement. When used within a nested loop, an Exit statement moves control out of the immediately enclosing loop. Use Exit Function inside a Function...End Function procedure. Use Exit Sub inside a
SQABasic Library   SQABasic library files let you declare custom procedures that you can call from a script file or other library file. Declare Sub MySub BasicLib "MyLib" (arg1 As String, arg2 As Integer) The word BasicLib is added to the declaration, indicating that the declared procedure MySub is in an SQABasic library file. The name of the library file (MyLib), in quote marks, follows the BasicLib designation.  The library file extension (.sbl or .rec) is not required.
SQABasic Library – Contd.. Note that the BasicLib keyword specifies that a .sbx library file (as opposed to a .dll library file) is being declared. The .sbx extension in the declaration is not required or recommended. Where to Declare an SQABasic Library File You can declare an SQABasic library file in any of these locations: In a script or other library file, for use by the procedures in that module only In a header file, for use by any module that references the header file
SQABasic Library - Types You can create and edit these types of SQABasic library files: .sbl libraries :  If a .sbl file is in the SQABasic path, it can be accessed from a file in the current project or in other projects.  .sbl library files to not support verification points. .rec libraries.: A script file used as a library file can only be accessed by files in the same project. .rec library files support verification points. Note: For your convenience, Robot provides a blank library source file, called global.sbl, in each project. You can add your custom procedures to this file and/or create new library source files.
SQABasic Library - Compile Compile the SQABasic library file before you attempt to access it at test runtime.  Compiling SQABasic library files is the same for both .sbl files and .rec files. Compiling the file also saves it. Compiled .sbl and .rec library files have the extension .sbx. When you compile a .sbl file, the .sbx file is stored in the SQABasic path   This is true even if the .sbl file is not in the SQABasic path.
DLL Library Files SQABasic procedures can call procedures stored in DLL files. For example, they can call the procedures stored in Microsoft Windows DLLs such as Kernel32.dll. Robot does not provide a tool for creating DLLs. To add procedures to a DLL file, you need a tool such as Microsoft Visual C++ or Visual Basic. Declare Sub MySub Lib "MyDLL" (ByVal arg1 As String, ByVal arg2 As Integer) Declare a DLL File in a script or SQABasic library file, for use by the procedures in that module only or in a header file, for use by any module that references the header file
Libraries - Comparision The following table summarizes the differences between library files: .sbl .rec .dll Location SQABasic path Datastore (folder TMS_Scripts) in the current project TMS_Scripts\dll folder, or a user assigned location Scope When in the SQABasic path, available to files in the same project or other projects Available to files in the same project Depends on location VP No Support Support all standard robot VP Supports Custom VP
SQABasic Header Files Types of SQABasic Header Files Header files, stored in the SQABasic path. When a header file is in the SQABasic path, it is available to all modules in the same project and in other projects. Project header files, stored in the TMS_Scripts folder of the project. Project header files are available to all modules in the same project. Both types of SQABasic header files have the extension .sbh.
SQABasic Header Files - Creation Creating a Header File To create a header file in the current SQABasic path: 1. In Robot, click File - >  New - > SQABasic File. 2. Click Header File, and then click OK. Save the file in the default location. You name the file (or accept the default name) the first time you save it.
SQABasic Header Files - Use Includes statements from the specified header or source file. '$Include: "filename"  It is recommended (although not required) that you specify a file extension of .SBH if filename is a header file. SQABasic header files can be accessed by modules within the current project or within any other project. Typically, the '$Include meta command is located before the beginning of the sub procedure.
Questions

More Related Content

PPT
Advanced Rational Robot A Tribute (http://www.geektester.blogspot.com)
PPTX
Java Profiling
PPTX
Integration Group - Robot Framework
PPTX
Robot framework
PPT
Stopping the Rot - Putting Legacy C++ Under Test
PPTX
TDD and the Legacy Code Black Hole
PPT
Functional Testing Swing Applications with Frankenstein
PPTX
Java history, versions, types of errors and exception, quiz
Advanced Rational Robot A Tribute (http://www.geektester.blogspot.com)
Java Profiling
Integration Group - Robot Framework
Robot framework
Stopping the Rot - Putting Legacy C++ Under Test
TDD and the Legacy Code Black Hole
Functional Testing Swing Applications with Frankenstein
Java history, versions, types of errors and exception, quiz

What's hot (20)

PPT
Hp Quick Test Professional
PDF
An Introduction to Java Compiler and Runtime
PPT
Log4j Logging Mechanism
PDF
PPTX
Robot framework Gowthami Goli
PPT
First QTP Tutorial
PDF
Unit testing (eng)
PPTX
Applying TDD to Legacy Code
PPT
QTP with Descriptive programming
PPTX
Java byte code & virtual machine
PPT
HP Quick Test Professional
DOCX
QTP Interview Questions and answers
PPT
PDF
Php unit (eng)
PDF
What is-java
PDF
JUnit 5 - Evolution and Innovation - SpringOne Platform 2019
PDF
Log4j in 8 slides
PPTX
JavaScript Module Loaders
PPT
Qtp - Introduction to automation basics
PDF
Java 8 Overview
Hp Quick Test Professional
An Introduction to Java Compiler and Runtime
Log4j Logging Mechanism
Robot framework Gowthami Goli
First QTP Tutorial
Unit testing (eng)
Applying TDD to Legacy Code
QTP with Descriptive programming
Java byte code & virtual machine
HP Quick Test Professional
QTP Interview Questions and answers
Php unit (eng)
What is-java
JUnit 5 - Evolution and Innovation - SpringOne Platform 2019
Log4j in 8 slides
JavaScript Module Loaders
Qtp - Introduction to automation basics
Java 8 Overview
Ad

Viewers also liked (20)

PPTX
Robot programming
PPTX
ROBOTICS AND ITS APPLICATIONS
PPT
Robotics.Ppt
PPT
line following robot
PPT
Introductionto robotics a
PPTX
Wireless Pick and Place Surveillance Robot
PPTX
Obstacle avoidance robot
PDF
Wireless Gesture Controlled Robot (FYP Report)
PPS
L’excellence à la française en 15 produits
PDF
Working Web
ODP
Catalogue fini la missmaria
PPS
Jp chez maxim's1
PDF
James Dean, en 24 années
PPTX
Buzzeum in Museum Next in London
PPT
4 basic cnc programming milling
PPTX
Robotics project ppt
PDF
O que é Human robot interaction (HRI)
ODP
Projeto Final de Computação Gráfica 2012 - FCT/UNESP
ODP
Robot Lego programado em Java
PDF
Receitas Robot De Cozinha N 16
Robot programming
ROBOTICS AND ITS APPLICATIONS
Robotics.Ppt
line following robot
Introductionto robotics a
Wireless Pick and Place Surveillance Robot
Obstacle avoidance robot
Wireless Gesture Controlled Robot (FYP Report)
L’excellence à la française en 15 produits
Working Web
Catalogue fini la missmaria
Jp chez maxim's1
James Dean, en 24 années
Buzzeum in Museum Next in London
4 basic cnc programming milling
Robotics project ppt
O que é Human robot interaction (HRI)
Projeto Final de Computação Gráfica 2012 - FCT/UNESP
Robot Lego programado em Java
Receitas Robot De Cozinha N 16
Ad

Similar to Rational Robot (http://www.geektester.blogspot.com) (20)

PDF
2 rft simplified_scripting_shinoj_z
 
PDF
RFT Simplified Scripting- Shinoj Z
PPT
QTP Online Training
PDF
Qtp certification training_material
PPS
About Qtp 92
PPS
About Qtp_1 92
PPS
About QTP 9.2
PPT
Qtp Training Deepti 2 Of 44780
PPT
Advanced driver debugging (13005399) copy
PPSX
Test Complete
PPTX
RoboCV Module 3: Delving Deeper into OpenCV
PDF
User guide of VectorCast 2024 ADA testing tool for safety critical software
PPT
Qtpppt1
PPT
Testing
PPT
Testing More With Less
PDF
Winrunner
DOC
Qtp (basics to advanced)
PDF
Qtp Interview Questions
PPT
ISTQB / ISEB Foundation Exam Practice - 6
PPT
Test automation process _ QTP
2 rft simplified_scripting_shinoj_z
 
RFT Simplified Scripting- Shinoj Z
QTP Online Training
Qtp certification training_material
About Qtp 92
About Qtp_1 92
About QTP 9.2
Qtp Training Deepti 2 Of 44780
Advanced driver debugging (13005399) copy
Test Complete
RoboCV Module 3: Delving Deeper into OpenCV
User guide of VectorCast 2024 ADA testing tool for safety critical software
Qtpppt1
Testing
Testing More With Less
Winrunner
Qtp (basics to advanced)
Qtp Interview Questions
ISTQB / ISEB Foundation Exam Practice - 6
Test automation process _ QTP

Recently uploaded (20)

PDF
Architecting across the Boundaries of two Complex Domains - Healthcare & Tech...
PDF
7 ChatGPT Prompts to Help You Define Your Ideal Customer Profile.pdf
PDF
Peak of Data & AI Encore- AI for Metadata and Smarter Workflows
PPTX
Understanding_Digital_Forensics_Presentation.pptx
PDF
Unlocking AI with Model Context Protocol (MCP)
PDF
Empathic Computing: Creating Shared Understanding
PDF
Encapsulation_ Review paper, used for researhc scholars
PDF
Network Security Unit 5.pdf for BCA BBA.
PPTX
Detection-First SIEM: Rule Types, Dashboards, and Threat-Informed Strategy
PPTX
20250228 LYD VKU AI Blended-Learning.pptx
PPTX
MYSQL Presentation for SQL database connectivity
PDF
Encapsulation theory and applications.pdf
PDF
Advanced methodologies resolving dimensionality complications for autism neur...
PDF
Approach and Philosophy of On baking technology
PDF
Optimiser vos workloads AI/ML sur Amazon EC2 et AWS Graviton
PDF
Agricultural_Statistics_at_a_Glance_2022_0.pdf
PDF
Per capita expenditure prediction using model stacking based on satellite ima...
PDF
Profit Center Accounting in SAP S/4HANA, S4F28 Col11
PDF
NewMind AI Weekly Chronicles - August'25 Week I
PDF
Spectral efficient network and resource selection model in 5G networks
Architecting across the Boundaries of two Complex Domains - Healthcare & Tech...
7 ChatGPT Prompts to Help You Define Your Ideal Customer Profile.pdf
Peak of Data & AI Encore- AI for Metadata and Smarter Workflows
Understanding_Digital_Forensics_Presentation.pptx
Unlocking AI with Model Context Protocol (MCP)
Empathic Computing: Creating Shared Understanding
Encapsulation_ Review paper, used for researhc scholars
Network Security Unit 5.pdf for BCA BBA.
Detection-First SIEM: Rule Types, Dashboards, and Threat-Informed Strategy
20250228 LYD VKU AI Blended-Learning.pptx
MYSQL Presentation for SQL database connectivity
Encapsulation theory and applications.pdf
Advanced methodologies resolving dimensionality complications for autism neur...
Approach and Philosophy of On baking technology
Optimiser vos workloads AI/ML sur Amazon EC2 et AWS Graviton
Agricultural_Statistics_at_a_Glance_2022_0.pdf
Per capita expenditure prediction using model stacking based on satellite ima...
Profit Center Accounting in SAP S/4HANA, S4F28 Col11
NewMind AI Weekly Chronicles - August'25 Week I
Spectral efficient network and resource selection model in 5G networks

Rational Robot (http://www.geektester.blogspot.com)

  • 2. Courseware Information This introductory course is designed to familiarize testing professionals with the basics of Rational's functional test automation tool, Rational® Robot. The focus will be on applying Rational Robot to resolve common automated testing challenges and to build effective, versatile test scripts through best practices.
  • 3. Rational Robot Basics 4. View logs 2. Script Recording 3. Script Playback 1. Rational Robot Basics
  • 4. DataPool What is Datapool Test dataset Supplies data values to the variables in a script during script playback It will automatically pump test data to virtual testers under high-volume conditions
  • 5. Creation of Datapool Creating and Populating Datapool Datapool Creation Rational Robot Rational Test Manager
  • 6. Datapool through Test Manager Click Tools -> Manage -> Datapools Specify Name Define Datapool fields Assign data type to the datapool columns Specify number of records to generate Click Generate Data
  • 7. Rational Suite Suite Contains items such as user or computer groups Resource assigned to each group Test scripts Number of times each test script runs
  • 8. Rational Suite Usage of Test Suite Assign test cases to computers and rerun the test cases without having to reassign them Run test scripts and test cases on the next available computer, thus speeding up testing process Set preconditions on items in a suite, which require that they complete successfully before the next item in the suite runs Group test scripts to emulate the actions of different types of testers Set the order in which test scripts run Synchronize testers Suite can contain GUI test scripts, VU test scripts, VB test scripts, Java test scripts or other user defined test script types
  • 9. Creation of Suite Suite can be created in the following way Performance Testing Wizard Functional Testing Wizard Existing Session Existing Suite Blank Performance Testing or Functional Testing Suite
  • 10. Verification Points Verification Point Point in a script that we create to confirm the state of an object across builds of the application under test. During Recording, the VP captures object information and stores it in a baseline data file. While playing back against a new build, Robot retrieves the information in the baseline file for each VP and compares it against the baseline data file.
  • 11. Verification Point Types of Verification Points Alphanumeric Clipboard File Comparison File Existence Menu Module Existence Object Data Object Properties Region Image Website Compare Window Existence Window Image Window Scan
  • 12. Alphanumeric VP Alphanumeric verification point will be used to capture and test alphabetic or numeric values from a single or multi-line edit box or from other Windows objects that Robot recognizes. 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.
  • 13. Clipboard VP Clipboard verification point will be used to capture text contained in objects that cannot be captured using any of the other verification points. To use the Clipboard verification point, the application-under-test must supply a Copy or Cut capability so you can place the data in the Clipboard. This verification point is useful for capturing data from spreadsheet and word processing applications as well as terminal emulators. You cannot use it to test bitmaps.
  • 14. File Verification VP File Comparison verification point will be to compare 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 the file names. During playback, Robot compares the files byte-for-byte.
  • 15. File Existence VP Use the File Existence verification point to specify a file to look for during playback. 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.
  • 16. Menu VP Menu verification point will be used to capture the menu title, menu items, shortcut keys, and the state (enabled, disabled, grayed, or checked) of selected menus. Robot records information about the top menu and as many as five levels of sub-menus. Robot treats menu items as objects within a menu and tests their content, state, and accelerator keys regardless of the menu item’s location.
  • 17. Module Existence VP Use to verify whether a specified module is loaded into a specified context (process), or is loaded anywhere in memory. In the Windows environment, modules are defined as executable programs (.exe), dynamic link libraries (.dll or other extension), device drivers (.sys or .drv), or display fonts (.fon). 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 may 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.
  • 18. Object Data VP Use the Object Data verification point to capture the data inside objects, including: Standard Window controls ActiveX controls Visual Basic Data controls HTML and Java objects Oracle Forms base-table blocks and items PowerBuilder DataWindows and DataStore controls Menus (you can also use the Menu verification point to test a menu)
  • 19. Object Properties VP Use the Object Properties verification point to capture and verify the properties of standard Windows objects. This verification point also provides specialized support for environment-specific objects such as Visual Basic Data controls, ActiveX controls, HTML and Java objects, PowerBuilder DataWindows, and Oracle Forms base-table blocks.
  • 20. Region Image VP Use the Region Image verification point to select a region of the screen that Robot captures and saves as a bitmap. The captured region, which can overlap more than one window, is a pixel-by-pixel representation that includes colors, height, and width. For the verification point to pass, the location of the region and the screen resolution should be the same during record and playback.
  • 21. Window Existence VP Use the Window Existence verification point to verify the existence and status of a specified window during playback. The status can be normal, minimized, maximized, or hidden. Since the Window Existence verification point does not create a baseline or actual data file, if the verification point fails, you cannot replace baseline data with actual data.
  • 22. Window Image VP Use the Window Image verification point to select and capture the client area of a window. The menu, title bar, and border are not included as part of the image capture. Robot can capture any window that is partially or fully visible. The window can be overlapped by another window or partially off the screen. When this occurs, Robot captures the window, but saves the non-visible part of the window as black. The captured region is a pixel-by-pixel representation that includes colors, height, and width. For the verification point to pass, the size of the window and the screen resolution should be the same during record and playback.
  • 23. Adding Datapool Commands to a GUI Script Once you finish a recording session in which you provided values to the application, edit the script and perform these basic tasks: Reference the SQAUTIL.SBH header file Substitute variables for the literal values you provided during recording Add datapool commands that open the datapool, fetch a row of data from the datapool, retrieve the individual values in the fetched row, and assign each value to a script variable
  • 24. Datapool Command - Example '$Include "sqautil.sbh" Sub Main ... Declare variables with Dim statements ' Open a datapool named CD Orders Dp=SQADatapoolOpen("CD Orders") ' Perform the transaction 100 times, using a new set of data from the datapool each time For x = 1 to 100 ' Fetch a row from the datapool Call SQADatapoolFetch(dp)
  • 25. Datapool Command – Example …. ' Begin the transaction 'Credit Card Number Window SetContext, "Caption=Make An Order", "" EditBox Click, "ObjectIndex=3", "Coords=13,11" ' Assign ccNum a value from datapool column #4 Call SQADatapoolValue(dp,4,ccNum) InputKeys ccNum ' Pass the datapool value to the application ... ' Assign other datapool values to other variables Next x Call SQADatapoolClose(dp) End Sub
  • 26. Extension Manager command Tools -> Extension Manager Use to select the development environments you need to test. Opens the Extension Manager dialog box. The next time you start Robot, support for the selected environments is loaded. Use to control which Robot extensions are loaded. The Extension Manager lists the special IDE (integrated development environments) environments supported by Robot. Select only the environments you need to test. The next time you start Robot, only the selected environments are loaded. Note: Support for C++ applications is always loaded.
  • 27. Selecting the IDE Extensions to Load 1. Start Robot. 2. Click Tools - > Extension Manager. 3. Select only the environments that you plan to test. To improve performance, clear the check boxes of all environments you do not plan to test. 4. Exit Robot. The next time you start Robot, only the extensions for the selected environments are loaded.
  • 28. IDE Extensions - options Verifiying that the Java Extension Is Loaded To test Java applets and applications, you must first make sure that the Java extension is loaded in Robot. The Java extension includes those additions to Robot that allow Robot to test Java. Verifying that the .NET Extension is Loaded The .NET Extension is loaded by default and is required to recognize Visual Studio.NET Windows Forms controls. To verify that the .NET extension is loaded Note: During installation Robot installs some of our assemblies to global assembly cache. If you install Robot before installing the .NET framework, this step is skipped. In order to test your .NET application, you need to either re-install Robot or copy Dotnetspy.dll and interop.mscoreee.dll into your global assembly cache.
  • 29. IDE Extensions – options ….. Verifying that the HTML Extension Is Loaded To test HTML applications, you must first make sure that an HTML extension is loaded in Robot. Verifying that the Oracle Forms Extension Is Loaded To test Oracle Forms applications, you should first verify that the Robot Oracle Forms extension is loaded in Robot. Verifying that the PowerBuilder Extension Is Loaded To test PowerBuilder applications, you should first verify that the Robot PowerBuilder extension is loaded in Robot. Verifying that the Visual Basic Extension Is Loaded To test Visual Basic applications
  • 30. Inspector command (Tools menu) Use to view information about the window, parent, and style of an object, including its window class, ID, and function. Opens the Inspector window. Using the Inspector Use the Inspector to examine window-type objects and display information about those objects, such as class, ID, handle, size, parent data, and style. 1. Click Tools - > Inspector. The tool will automatically begin the object inspection. It will inspect all of the windows objects on your desktop. When it finishes, the Inspector window opens and displays the results. 2. Optionally, click Refresh Object to refresh the inspection of the selected object.
  • 31. Inspector command (Tools menu) 3. Optionally, click Refresh All to refresh the inspection of all the objects. 4. You can drag the selection hand to any object and release it to inspect that object. The Inspector can assist in general window-type object identification, but it does not have the Object Testing technology of Robot. For example, the Inspector: Does not display object names. Does not detect Visual Basic "soft" controls like labels and shapes. Does not detect any objects inside of PowerBuilder DataWindows.
  • 32. Functions & Sub Procedures A Sub procedure does not return a value. A Function procedure returns a value, and can be used in an expression. To specify the data type for the return value of a function, end the Function name with a type declaration character. If no type is provided, the function defaults to data type Variant. Declares a procedure in a module or dynamic link library (DLL) Declare Sub name [ libSpecification ] [ ( arg [ As type ], ... ) ] Declare Function name [ libSpecification ] [ ( arg [ As type ], ... ) ] [ As functype ]
  • 33. Function – Header File If the libSpecification is of the format: BasicLib "libName" [ Alias "aliasname" ] the procedure is in another SQABasic module (.sbl or .rec) named libName. If the libSpecification is of the format: Lib "libName" [ Alias ["]ordinal["] ] or Lib "libName" [ Alias "aliasname" ] the procedure is in a Dynamic Link Library (DLL) named libName.
  • 34. Function - Definition The purpose of a function is to produce and return a single value of as specified type. Recursion is supported. [ Static ] [ Private ] Function name [ ( [ Optional ]arg [ As type ], ... ) ] [ As functype ] name= expression End Function The data type of name determines the type of the return value. If you don't specify a data type, the default data type Variant is used. When calling the function, you need not specify the type declaration character.
  • 35. Function – Definition – Contd.. The Static keyword specifies that all the variables declared within the function will retain their values as long as the program is running, regardless of the way the variables are declared. The Private keyword specifies that the function will not be accessible to functions and sub procedures from other modules. Only procedures defined in the same module will have access to a Private function. SQABasic procedures use the call-by-reference convention by default. This means that if the called procedure changes the value of an argument passed in arg, the new value will apply in the calling procedure as well. This feature should be used with great care. Note: Use Sub to define a procedure with no return value.
  • 36. Function - Arguments A forward declaration is needed only when function is referenced before it is defined. In this case, the BasicLib, Lib and Alias clauses are not used. Argument is passed to the sub procedure or function. Multiple arguments are separated by commas. The data type of an argument can be specified through a type declaration character or through the As clause. Arguments of a User-Defined data type are declared through an As clause and a type that has previously been defined through the Type statement. If an argument is an array, use empty parentheses after the argument name. The array dimensions are not specified within the Declare statement.
  • 37. Function – Arguments - Contd.. By default, the actual arguments are passed by Far reference. For external DLL procedures, there are two additional keywords, ByVal and Any, that can be used in the argument list. When ByVal is used, it must be specified before the argument it modifies. When applied to numeric data types, ByVal indicates that the argument is passed by value, not by reference. When applied to string arguments, ByVal indicates that the string is passed by Far pointer to the string data. By default, strings are passed by Far pointer to a string descriptor. Any can be used as a type specification, and permits a call to the procedure to pass a value of any data type
  • 38. Function – Terminate \ Exit Terminates Loop statements or transfers control to a calling procedure. Exit {Do | For| Function | Sub} Use Exit Do inside a Do...Loop statement. Use Exit For inside a For...Next statement. When the Exit statement is executed, control transfers to the statement after the Loop or Next statement. When used within a nested loop, an Exit statement moves control out of the immediately enclosing loop. Use Exit Function inside a Function...End Function procedure. Use Exit Sub inside a
  • 39. SQABasic Library SQABasic library files let you declare custom procedures that you can call from a script file or other library file. Declare Sub MySub BasicLib "MyLib" (arg1 As String, arg2 As Integer) The word BasicLib is added to the declaration, indicating that the declared procedure MySub is in an SQABasic library file. The name of the library file (MyLib), in quote marks, follows the BasicLib designation. The library file extension (.sbl or .rec) is not required.
  • 40. SQABasic Library – Contd.. Note that the BasicLib keyword specifies that a .sbx library file (as opposed to a .dll library file) is being declared. The .sbx extension in the declaration is not required or recommended. Where to Declare an SQABasic Library File You can declare an SQABasic library file in any of these locations: In a script or other library file, for use by the procedures in that module only In a header file, for use by any module that references the header file
  • 41. SQABasic Library - Types You can create and edit these types of SQABasic library files: .sbl libraries : If a .sbl file is in the SQABasic path, it can be accessed from a file in the current project or in other projects. .sbl library files to not support verification points. .rec libraries.: A script file used as a library file can only be accessed by files in the same project. .rec library files support verification points. Note: For your convenience, Robot provides a blank library source file, called global.sbl, in each project. You can add your custom procedures to this file and/or create new library source files.
  • 42. SQABasic Library - Compile Compile the SQABasic library file before you attempt to access it at test runtime. Compiling SQABasic library files is the same for both .sbl files and .rec files. Compiling the file also saves it. Compiled .sbl and .rec library files have the extension .sbx. When you compile a .sbl file, the .sbx file is stored in the SQABasic path This is true even if the .sbl file is not in the SQABasic path.
  • 43. DLL Library Files SQABasic procedures can call procedures stored in DLL files. For example, they can call the procedures stored in Microsoft Windows DLLs such as Kernel32.dll. Robot does not provide a tool for creating DLLs. To add procedures to a DLL file, you need a tool such as Microsoft Visual C++ or Visual Basic. Declare Sub MySub Lib "MyDLL" (ByVal arg1 As String, ByVal arg2 As Integer) Declare a DLL File in a script or SQABasic library file, for use by the procedures in that module only or in a header file, for use by any module that references the header file
  • 44. Libraries - Comparision The following table summarizes the differences between library files: .sbl .rec .dll Location SQABasic path Datastore (folder TMS_Scripts) in the current project TMS_Scripts\dll folder, or a user assigned location Scope When in the SQABasic path, available to files in the same project or other projects Available to files in the same project Depends on location VP No Support Support all standard robot VP Supports Custom VP
  • 45. SQABasic Header Files Types of SQABasic Header Files Header files, stored in the SQABasic path. When a header file is in the SQABasic path, it is available to all modules in the same project and in other projects. Project header files, stored in the TMS_Scripts folder of the project. Project header files are available to all modules in the same project. Both types of SQABasic header files have the extension .sbh.
  • 46. SQABasic Header Files - Creation Creating a Header File To create a header file in the current SQABasic path: 1. In Robot, click File - > New - > SQABasic File. 2. Click Header File, and then click OK. Save the file in the default location. You name the file (or accept the default name) the first time you save it.
  • 47. SQABasic Header Files - Use Includes statements from the specified header or source file. '$Include: "filename" It is recommended (although not required) that you specify a file extension of .SBH if filename is a header file. SQABasic header files can be accessed by modules within the current project or within any other project. Typically, the '$Include meta command is located before the beginning of the sub procedure.