Rational Functional Tester - Tips and Tricks

Similar documents
IBM EXAM QUESTIONS & ANSWERS

Passit4Sure.C _54,QA. Good explanation provided and the references added most of the questions.

IBM Rational Functional Tester

Vendor: IBM. Exam Code: C Exam Name: Rational Functional Tester for Java. Version: Demo

Introduction to IBM Rational Functional Tester 6.1 Mike Kelly

Effective test automation techniques for Rational Functional Tester

Oracle Enterprise Manager Oracle Database and Application Testing. Application Testing Suite Lab. Session S318966

J2EE Application Development : Conversion and Beyond Osmond Ng

Value of managing and running automated functional tests with Rational Quality Manager

Automated testing in ERP using Rational Functional Tester

Silk Test Workbench Getting Started with Visual Tests

SilkTest Workbench Getting Started with Visual Tests

While recording a script, the recording monitor. A. appears at the conclusion of recording B. is only displayed on the toolbar C. does not appear D.

QTP interview questions

1.00 Lecture 2. What s an IDE?

SilkTest Workbench. Getting Started with Visual Tests

Module Road Map. 7. Version Control with Subversion Introduction Terminology

with TestComplete 12 Desktop, Web, and Mobile Testing Tutorials

Create a functional test

IBM C Rational Functional Tester for Java. Download Full Version :

GETTING STARTED WITH ECLIPSE Caitrin Armstrong

Application Testing Suite OpenScript Functional Testing Introduction. Yutaka Takatsu Group Product Manager Oracle Enterprise Manager - ATS

Creating Professional Swing UIs Using the NetBeans GUI Builder

ADT: Eclipse development tools for ATL

Oliopäivät Modelling Now and in the Future, with Acronyms or without = RSA

Refactoring with Eclipse

Function names can be specified with winidea syntax for qualified names, if multiple download files and file static functions are tested.

Javadocing in Netbeans (rev )

Getting started now with Rational Performance Tester 9.1.0

TestPartner. Getting Started with Visual Tests

Replay Xcessory Quick Start

Just Enough Eclipse What is Eclipse(TM)? Why is it important? What is this tutorial about?

Application Integration with WebSphere Portal V7

Research On DB2 Performance Testing Automation

Supplement H.1: JBuilder X Tutorial. For Introduction to Java Programming, 5E By Y. Daniel Liang

Introduction to Computation and Problem Solving

Business Process Testing

3 Getting Started with Objects

DiskBoss DATA MANAGEMENT

PART 1. Eclipse IDE Tutorial. 1. What is Eclipse? Eclipse Java IDE

IBM Mobile Portal Accelerator Enablement

Marthon User Guide. Page 1 Copyright The Marathon developers. All rights reserved.

Telerik Corp. Test Studio Standalone & Visual Studio Plug-In Quick-Start Guide

Noopur Gupta Eclipse JDT/UI Committer IBM India

Analyze system performance

News in RSA-RTE 10.2 updated for sprint Mattias Mohlin, May 2018

1 Shyam sir JAVA Notes

Telerik Test Studio. Web/Desktop Testing. Software Quality Assurance Telerik Software Academy

Embedding Graphics in JavaDocs (netbeans IDE)

Module 4: Working with MPI

IBM Rational Rhapsody Gateway Add On. Tagger Manual

2 Getting Started. Getting Started (v1.8.6) 3/5/2007

INTERNAL NOTES ABOUT NAVIGATOR USER GUIDE ( ) This page will only appear in the INTERNAL version of this file. DO NOT send this version to

Embarcadero PowerSQL 1.1 Evaluation Guide. Published: July 14, 2008

Supplement II.B(1): JBuilder X Tutorial. For Introduction to Java Programming By Y. Daniel Liang

F-Secure Policy Manager Reporting Option

sqamethods Approach to Building Testing Automation Systems

JavaFX. Getting Started with JavaFX Scene Builder Release 1.1 E

2 Document Manager Lite v5.2 User Guide

Java for Programmers Course (equivalent to SL 275) 36 Contact Hours

Introduction to IBM Rational HATS For IBM System i (5250)

SilkTest 2010 R2. Release Notes

IBM Rational SoDA Tutorial

NetBeans Tutorial. For Introduction to Java Programming By Y. Daniel Liang. This tutorial applies to NetBeans 6, 7, or a higher version.

Complete Tutorial (Includes Schematic & Layout)

7 steps for digital app test automation success. October 2018

NetBeans IDE Field Guide

CO Java SE 8: Fundamentals

Client Configuration Cookbook

Before you begin this unattended testing scenario, take the time to perform the following setup tasks:

News in RSA-RTE 10.1 updated for sprint Mattias Mohlin, November 2017

WPS Workbench. user guide. "To help guide you through using the WPS user interface (Workbench) to create, edit and run programs"

Unified Functional Testing

Oracle Application Testing Suite: Introduction Student Guide

SQL Server. Management Studio. Chapter 3. In This Chapter. Management Studio. c Introduction to SQL Server

Developing with VMware vcenter Orchestrator

Introduction to IBM Rational HATS For IBM System z (3270)

Silk Test Workbench Getting Started with.net Scripts

Baselining Requirements Assets with Rational RequisitePro and Rational ClearCase. A Rational Software White Paper

Tutorial 02: Writing Source Code

UML PROFILING AND DSL

QTP MOCK TEST QTP MOCK TEST II

Modern Requirements4TFS 2018 Release Notes

The Lokalize Handbook. Nick Shaforostoff

BASIC USER TRAINING PROGRAM Module 5: Test Case Development

Introduction. Key features and lab exercises to familiarize new users to the Visual environment

Mercury LoadRunner Quick Start

Google Plugin for Eclipse

Parish . User Manual

Using the VMware vcenter Orchestrator Client. vrealize Orchestrator 5.5.1

Embarcadero DB Optimizer 1.0 Evaluation Guide. Published: July 14, 2008

Simple to purchase, flexible to use

BasicScript 2.25 User s Guide. May 29, 1996

Eclipse Tutorial. For Introduction to Java Programming By Y. Daniel Liang

The JSF Tools Project

IBM Security Access Manager for Enterprise Single Sign-On Version AccessStudio Guide IBM SC

IBM Rational Rhapsody Gateway Add On. Customization Guide

Enterprise Architect. User Guide Series. Model Navigation. Author: Sparx Systems. Date: 30/06/2017. Version: 1.0 CREATED WITH

Sonatype CLM - IDE User Guide. Sonatype CLM - IDE User Guide

Client Configuration Cookbook

Transcription:

IBM Rational Software Development Conference 2006 Rational Functional Tester - Tips and Tricks Suma Byrappa IBM Rational Swathi Rao 2006 IBM Corporation

Agenda IBM Rational Software Development Conference 2006 Functional Tester - Overview Functional Tester Tips and Tricks Demos Q&A

Functional Testing with IBM Rational Functional Tester Test automation for the novice and the professional IBM Rational Functional Tester Formerly known as Rational XDE Tester Automated functional and regression testing tool for Web based, Java,.NET, Siebel, Terminal based and SAP (coming soon) applications Key Benefits Minimize test maintenance with scripts that are resilient to application changes Wizard enhanced automation to speed test creation for the new user Powerful scripting language and IDE for the professional tester

Functional Testing 3 Step Automation Process Record, Enhance, Execute Recorder Test scripts are recorded on the fly, as user navigates application Verification Points and Data Driven Tests can be added while recording Scripts RFT uses VB.Net or Java to create easy to understand object-oriented scripts Scripts can be enhanced to add conditional branching, refactoring, datapooling etc. Playback Scripts are executed Discrepancies are logged

Verification Points Functional Tester Sees Object Data You See controls or objects Functional Tester Sees Object Properties Automated Validation Functional Tester captures data and properties that can be invisible to users During script execution, current results are compared to stored baselines Discrepancies are flagged and reported to user in test log

Dynamic Verification through Regular Expressions Dynamic Data/Content Matching Order ID ID changes with with each each order placed Use pattern matching technique to verify dynamic data and create robust tests Test Test Passes Fails when comparing static pattern baseline to baseline dynamic to to dynamic data data data E.g. Instead of validating Order ID 230, validate Order ID ### or Order ID 2## This allows for a wide variety of acceptable responses as well as restrictions on acceptable responses when validating the application s behavior

Data Driven Testing Reuse the same script to replicate different (realistic) scenarios Abstracts the test data from the test script Modify test data without affecting the test script Add new test cases by modifying the data and not the test script Share the test data with many test scripts Wizard driven process No programming involved Import data from external sources

Object Maps IBM Rational Software Development Conference 2006 Static Hierarchical Representation of the Application Under Test (AUT) Static includes all relevant TestObjects in AUT, not timing-sensitive. Hierarchical strict hierarchy, no cyclic dependencies, no indirect associations Representation maintains recognition properties that describe each TestObject Eases script maintenance If object in the AUT changes, edit the object in the map All references to object in script will have the updated info

Script Assure IBM Rational Software Development Conference 2006 Version 1.0 Version 2.0 Tester Sees No User Intervention Required Tool With Sees ScriptAssure TM Determines Match

Agenda IBM Rational Software Development Conference 2006 Functional Tester - Overview Functional Tester Tips and Tricks Demos Q&A

Tip 1 : Controlling RFT Playback STOP / PAUSE Use F11 key to perform a controlled stop Closes out the log and cleans up before stopping Use stop() command to control where stop occurs Use F12 key to pause playback Don t like F11 or F12 well you can change it In {install}/ivory.properties file change property rational.test.ft.script.playback.stop.hotkey=122 rational.test.ft.script.playback.pause.hotkey=123 Stop, Pause, Resume from the Playback Monitor (Beware that moving the mouse during playback may effect script execution) Terminate playback using the stop Pause playback using the button Resume playback using the Resume button button

Tip 2 : Know Those Functional Tester Preferences Define settings for how you want the workbench, compiler, Functional Tester, etc. to work V SJ A. NV AE T

Tip 2 : Know Those Functional Tester Preferences

Tip 3 : Test Your Enablement Especially HTML!!! Note :.Net and Windows applications do not require enablement

Tip 4 : Test Object Inspector Is the SUT ready to test? What properties does it have? What is the class and object hierarchy? What methods are available to invoke? Find out with a wave of the cursor Test Object under the cursor is auto-magically explored Use Copy / Paste to capture state of a Test Object in the SUT

Tip 5 : Coming Soon Clipboard VP Support Select Script Support button on the Record Toolbar

Tip 6 : Data-Driven Testing Scripts already have a Datapool asset Private associated with one script Public associated with zero or more scripts Population of a Datapool: From a CSV file when created The CSV can be from existing TestManager Datapool Better yet let s record it

Tip 6 : Data-Driven Testing Notes No loop in script Managed by script initialize, terminate & callscript by default Can manually control Datapool iteration using DatapoolFactory.get().load(<file>) to fetch the desired Datapool Recorder dynamically populates the Datapool Playback wizard includes Iteration Count field Verification Points may contain Datapool references

Tip 7 : Private vs. Shared Object Maps Private Isolated from others Good for development May lead to redundancy Shared Shared between multiple scripts / multiple testers Single point of maintenance Can have Private maps merged into it

IBM Rational Software Development Conference 2006 Tip 7 : Object map editing flexibility Script Script Maintenance Maintenance can can outpace outpace script script development development as as the the volume volume of of tests tests grows grows Functional Functional Tester Tester includes includes an an Object Object Map Map update update tool tool which which enables enables batch batch updates updates to to aa centralized centralized object object map map Modify Modify Properties Properties or or Values Values of of objects objects Reduces Reduces time time spent spent fixing fixing individual individual scripts scripts Frees Frees up up more more time time for for script script development development

Tip 7 : Troubleshooting Object Recognition Failures If object can t be found: Is the SUT enabled & testable? Recognition properties are not resilient or The ancestry structure has changed, or Recognition properties have changed in the parent object(s) To fix object recognition: Update Recognition properties in the OME Use Regexp for object property values. For Eg: AUIML objects have randomly generated object.id properties that change with every login: W047RX7389, W37AK3896 The.id property value can be regexped to (W.+) Adjust recognition property weight to favor more resilient properties

Tip 7 : Troubleshooting Object Recognition Failures Object Map Editor Start an Application Highlight Test Objects Insert Test Objects and Unify them Update Test Object Convert to Regular Expression (& Evaluate it) Adjust Property Weight

Tip 8 : Scripting Tips IDE Support Eclipse and VS.Net are developer dream IDEs Lots of capabilities, see preferences, IDE docs All time favorite is intellisense support Position Cursor Ctrl-Space Start typing to shorten list Choose Method Note the methods signature

Tip 8 : Scripting Tips RFT Support RFT Scripting toolbar Record Support in the IDE Insert VP, Insert Test Object, Insert Data Driven Commands Find Literals and Replace with Datapool References Context menus in Script Explorer pane Insert At Cursor on a VP Remember that VPs are context sensitive and will not work anywhere Insert At Cursor on a Test Object Use Highlight to make sure the Test Object is active at the right time Interface Summary on a Test Object What methods, data types, recognition properties are available for a particular Test Object. Lots of things not available via the recorder.

Tip 9 : Extending the Screen Snapshot Support Screen Snapshot taken only on fatal script errors Log yourself using RationalTestScript methods: loginfo(string, BufferedImage) logwarning(string, BufferedImage) logerror(string, BufferedImage) plus getroottestobject().getscreensnapshot() [Any GUI Test Object].getScreenSnapshot() For example : loginfo( Script End, getroottestobject().getscreensnapshot()); loginfo( About to click OK Button, okbutton().getscreensnapshot()); Automatically snapshot application state at script end by inserting into Helper Superclass with overload of onterminate() method Constrain to top level script using ismainscript() method

Tip 10 : Event Handling Events handlers are called automatically by the RationalTestScript class oninitialize - Called at the start of every script onterminate - Called at the end of every script onambiguousrecognition Called if more than one matching object is found onobjectnotfound Called when an Object is not found during playback onsubitemnotfound - Called when a sub item cannot be found. onunhandledexception Called when unknown exceptions are thrown onvpfailure Called when the specified VP fails to compare successfully Override these methods to handle these events NOTE: Do not call these methods directly

Tip 11 : Test Object Anchors & State Specified in the Script ProcessTestObject process = startapp( ClassicsJavaA ); OkButton(process, DISABLED).click(); Anchor Test Object from which the search should start State Tip 0.5 Use ProcessTestObject as the anchor Enabled, Showing & Ready is the default Enabled Pre-6.1 Test Object ignored in find if Enabled state wrong Post-6.1 If best candidate is Disabled and looking for Enabled then wait to see if best candidate becomes Enabled Ready Browser specific, waits for page to be fully rendered

Tip 12 : You Trying to Pick an Argument? Passing data with callscript By default, automated callscript does not include arguments RationalTestScript API overloads callscript with arguments callscript( TestCallExternal ); protected java.lang.object callscript( java.lang.string scriptfullname, java.lang.object[] args)

Tip 12 : Called Script Already Takes Arguments public class TestCallExernal extends TestCallExernalHelper { public void testmain (Object[] args) { // } Add code to handle args and optionally, return value public class TestCallExernal extends TestCallExernalHelper { public int testmain (Object[] args) { for (int i = 0; i < args.length; i++) { System.out.println(args[i]); // } return -1; }

Tip 13 : Cross-Platform Use of Native Controls Using the Windows control support does not work on Linux Nested native controls in Java do not get recorded If interested in Linux playback or Native control support in a Java application use Best solution is to use TestObject.find() RationalTestScript.getTopWindows() returns IWindow[] RationalTestScript.getScreen() returns IScreen Use IWindow interface methods getchildren() gettext() IScreen interface methods include: getactivewindow() See API on-line docs for rest

Tip 13 : Example of File Download Dialog IWindow[] children = getscreen().getactivewindow().getchildren(); for (int i = 0; i < children.length; ++i) { if (children[i].gettext().equals("&open")) { children[i].click(); break; } } Find object with text &Open and click it Get children of active window

Tip 14 : Command-Line Support Executing scripts from a command line allows you to integrate Functional Tester with external test drivers, such as: STAF/STAX An open source set of communication tools and test execution tools http://staf.sourceforge.net Start enabler and application configuration tools from the command-line to initialize test environment without raising the IDE Display IDE neutral Verification Point and Object Map editors for a quick fix Script creation using the recorder or just creating an empty script

Tip 14 : Command-Line Script Execution To play back a Java script (order of args is significant): java -Drational_ft.install.dir=<Rational FT install directory> <-classpath...> com.rational.test.ft.rational_ft -datastore <directory> -log <logname> [options] -playback <script-name> [-args <values>] -Drational_ft.install.dir is going away in the next release To play back a VB.Net script: rational_ft.exe -datastore <directory> -log <logname> [options] -playback <script-name> [-args <values>] Use Java command line to record, enable, configure applications and perform other actions See help file Functional Tester Command-Line Interface in your favorite IDE

Tip 15 : Using the Debugger Functional Tester uses full-featured IDE based debugger With all those features comes a little complexity Best illustrated with a Focus on Eclipse debugger for this demonstration

Agenda IBM Rational Software Development Conference 2006 Functional Tester - Overview Functional Tester Tips and Tricks Demos Q&A

Suma Byrappa (suma.byrappa@in.ibm.com) Swathi Rao (swathi.rao@in.ibm.com)