ibm rational functional tester

15
Pg 1 IBM Rational Functional Tester Pedro Miguel Mendes 2006.04.11 For internal use only! Copyright © Infineon Technologies 2005. All rights reserved. I n f i n e o n IBM Rational Functional Tester 11 th April 2006 Pedro Miguel Mendes IFPT IT MFG DC WT For internal use only! IBM Rational Functional Tester Pedro Miguel Mendes 2006.04.11 For internal use only! Copyright © Infineon Technologies 2005. All rights reserved. Automatic GUI Testing – Regression Testing Automatic GUI Testing – Regression Testing IBM Rational FT – Main Features IBM Rational FT – Main Features Q&A Q&A IBM Rational FT Demonstrations IBM Rational FT Demonstrations IBM Rational FT – Overview IBM Rational FT – Overview Table of contents

Upload: ram-praveen

Post on 08-Apr-2015

275 views

Category:

Documents


6 download

TRANSCRIPT

Page 1: Ibm Rational Functional Tester

Pg 1

IBM Rational Functional TesterPedro Miguel Mendes2006.04.11

For internal use only!

Copyright © Infineon Technologies 2005. All rights reserved.

Inf i

neo

nIBM Rational Functional Tester

11th April 2006

Pedro Miguel MendesIFPT IT MFG DC WT

For internal use only!

IBM Rational Functional TesterPedro Miguel Mendes2006.04.11

For internal use only!

Copyright © Infineon Technologies 2005. All rights reserved.

Automatic GUI Testing – Regression TestingAutomatic GUI Testing – Regression Testing

IBM Rational FT – Main FeaturesIBM Rational FT – Main Features

Q&AQ&A

IBM Rational FT – DemonstrationsIBM Rational FT – Demonstrations

IBM Rational FT – OverviewIBM Rational FT – Overview

Table of contents

Page 2: Ibm Rational Functional Tester

Pg 2

IBM Rational Functional TesterPedro Miguel Mendes2006.04.11

For internal use only!

Copyright © Infineon Technologies 2005. All rights reserved.

Automatic GUI Testing – Regression TestingAutomatic GUI Testing – Regression Testing

IBM Rational FT – Main FeaturesIBM Rational FT – Main Features

Q&AQ&A

IBM Rational FT – DemonstrationsIBM Rational FT – Demonstrations

IBM Rational FT – OverviewIBM Rational FT – Overview

Table of contents

•Introduction

•Concepts

IBM Rational Functional TesterPedro Miguel Mendes2006.04.11

For internal use only!

Copyright © Infineon Technologies 2005. All rights reserved.

Introduction

� Information Systems increasing complexity

� Shorter development periods:

– Closer release dates

– Rapid Application Development

– Extreme Programming

� What about software quality and testing:

– Solution: Automatic Test Procedures

� “The smallest change can wreak unpredictable havoc when implications of the change are not properly understood.”IBM

Page 3: Ibm Rational Functional Tester

Pg 3

IBM Rational Functional TesterPedro Miguel Mendes2006.04.11

For internal use only!

Copyright © Infineon Technologies 2005. All rights reserved.

Concepts

� GUI Testing Tools

– Capture-Replay – (Script Generation based on user’s actions)

– Unit-Test

� Regression Testing– Execute test scripting against application builds and test results

comparison

� Techniques for script building:– Linear Scripts

� Obtained from user actions on a given GUI

– Structured Scripts� Previous + Flow Control Options

– Data-Driven� User input data (Data Base, Spreadsheet, XML File…) is detached from

user actions (usually hard-coded)

– Keyword-Driven� User actions abstractions encapsulating long low-level scripting procedures

IBM Rational Functional TesterPedro Miguel Mendes2006.04.11

For internal use only!

Copyright © Infineon Technologies 2005. All rights reserved.

Automatic GUI Testing – Regression TestingAutomatic GUI Testing – Regression Testing

IBM Rational FT – Main FeaturesIBM Rational FT – Main Features

Q&AQ&A

IBM Rational FT – DemonstrationsIBM Rational FT – Demonstrations

IBM Rational FT – OverviewIBM Rational FT – Overview

Table of contents

•Product Presentation

•Requirements

•Installation Guide

Page 4: Ibm Rational Functional Tester

Pg 4

IBM Rational Functional TesterPedro Miguel Mendes2006.04.11

For internal use only!

Copyright © Infineon Technologies 2005. All rights reserved.

Product Presentation – IBM Rational Functional Tester

� Advanced tool for regression and functional testing for GUIs:

– Web based applications

– Microsoft® Visual Studio .net®

– Java

� Automated data-driven tests

� Recording function can generate Java and VB .net scripts

� Integrated with other Rational tools:

– Clear Case for concurrent script development

– Rational Test Manager

� Tutorials require an IBM user account (freely available)

� Downloadable trial version (30 days trial license):– http://www-128.ibm.com/developerworks/downloads/r/rft/?S_TACT=105AGX14&S_CMP=DWNL

IBM Rational Functional TesterPedro Miguel Mendes2006.04.11

For internal use only!

Copyright © Infineon Technologies 2005. All rights reserved.

Requirements

� Web Browser

� Microsoft® Visual Studio® 2003 (or 2005 with 6.1.1.1 patch)

– VB .net scripting usage

� .net Framework 1.1

– .net applications

– Web applications using activeX controls

– VB .net scripting usage

– http://msdn.microsoft.com/netframework/downloads/framework1_1/

� JRE 1.3.1_02 or better

– Required for test report application

– Java scripting usage

– http://Java.sun.com/j2se/1.4.2/download.html

Page 5: Ibm Rational Functional Tester

Pg 5

IBM Rational Functional TesterPedro Miguel Mendes2006.04.11

For internal use only!

Copyright © Infineon Technologies 2005. All rights reserved.

Requirements

� Technical Requirements: http://www-306.ibm.com/software/awdtools/tester/functional/sysreq/index2.html

� In a standard IFPT DC machine some extra procedures are required:

– Removal of the Java default installation using NetInstall

– JRE install, downloaded directly from Sun

� Ensuring during installation the association of the Java Virtual Machine to a default Web Browser, preferably IE

� When the installation completes check the Control Panel and confirm the previous step

IBM Rational Functional TesterPedro Miguel Mendes2006.04.11

For internal use only!

Copyright © Infineon Technologies 2005. All rights reserved.

Requirements

� In a standard IFPT DC machine some extra procedures are required:� Add the Java lib location to the machine’s System Variables

Page 6: Ibm Rational Functional Tester

Pg 6

IBM Rational Functional TesterPedro Miguel Mendes2006.04.11

For internal use only!

Copyright © Infineon Technologies 2005. All rights reserved.

Installation Guide

1. As there is no CD drive, a drive letter must be mapped to the CD Image location (My Computer->Tools->Map Network Drive)

2. Open Windows Explorer, go to mapped network drive and run: launchpad.exe

3. Click “Install IBM Rational® Functional Tester V6.X” and wait for wizard to appear

4. Click next and accept terms and conditions

5. Choose target development IDE (Eclipse is included)

6. Confirm installation details and wait about 10 to 15 minutes (machine dependent)

IBM Rational Functional TesterPedro Miguel Mendes2006.04.11

For internal use only!

Copyright © Infineon Technologies 2005. All rights reserved.

Automatic GUI Testing – Regression TestingAutomatic GUI Testing – Regression Testing

IBM Rational FT – Main FeaturesIBM Rational FT – Main Features

Q&AQ&A

IBM Rational FT – DemonstrationsIBM Rational FT – Demonstrations

IBM Rational FT – OverviewIBM Rational FT – Overview

Table of contents

•Script Recording/Playback

•Native Objects

•Object Maps

•Verification Points

•Datapools

•GUI Element Property Extraction

•Notes

Page 7: Ibm Rational Functional Tester

Pg 7

IBM Rational Functional TesterPedro Miguel Mendes2006.04.11

For internal use only!

Copyright © Infineon Technologies 2005. All rights reserved.

Script Recording/Playback – (1/4)

� Before using record feature, make sure there are just a few processes running. Avoid having an overloaded desktop.

1. Open IBM Rational FT, either by opening Eclipse or Visual Studio.

2. Create a Functional Test Project.

IBM Rational Functional TesterPedro Miguel Mendes2006.04.11

For internal use only!

Copyright © Infineon Technologies 2005. All rights reserved.

Script Recording/Playback – (2/4)

3. Click Add Script Using Recorder

4. Recorder Console should appear after assigning a name to the script and accepting the default options.

Application launcher.

Target Test application or URL of Web Application should be declared here.

Command Line Arguments possible

Recording ConsoleEvent LoggingError Logging

Pause – Resume RecordingConsole is customizable

Page 8: Ibm Rational Functional Tester

Pg 8

IBM Rational Functional TesterPedro Miguel Mendes2006.04.11

For internal use only!

Copyright © Infineon Technologies 2005. All rights reserved.

Script Recording/Playback – (3/4)

5. When finished click Stop and the target IDE will open a file with the generated script. IBM recommends the program to be closed before the script recording is paused.

6. To Run Script use the IDE’s compile/execute functions

7. Results log is shown in the default web browser

Executed Actions Log

IBM Rational Functional TesterPedro Miguel Mendes2006.04.11

For internal use only!

Copyright © Infineon Technologies 2005. All rights reserved.

Script Recording/Playback – (4/4)

� When recording, detected components are stored in a local objectmap

� GUI objects are related to native properties with a associated threshold

� Generated code can be edited to add flow control

– Abstract top layer is not directly supported

� During playback user should not interact with the application

� Same script can be used with different builds of the same application

– Target aplications must be addedto application configuration manager

Page 9: Ibm Rational Functional Tester

Pg 9

IBM Rational Functional TesterPedro Miguel Mendes2006.04.11

For internal use only!

Copyright © Infineon Technologies 2005. All rights reserved.

Object Map - (1/2)

� Object Map (OM) creates a structure that maps detected graphicalcontrols into IBM Rational FT native/abstract objects:

– Provide platform independent API for object manipulation

– OM sharing possible

Created OM

Mapped objects into script

Create New OM

IBM Rational Functional TesterPedro Miguel Mendes2006.04.11

For internal use only!

Copyright © Infineon Technologies 2005. All rights reserved.

Object Map – (2/2)

� Object Map should only contain used objects in the script

– When an OM is created in the sequence of a Record Action, it only adds used objects to the OM

– Objects can be manually added

– GUI Controls hierarchy is preserved

– Detection parameters are editable either trough fixed parameters or regex (Perl Standart) patterns that are similar in both scripting languages.

– OM objects can be added to the script

Page 10: Ibm Rational Functional Tester

Pg 10

IBM Rational Functional TesterPedro Miguel Mendes2006.04.11

For internal use only!

Copyright © Infineon Technologies 2005. All rights reserved.

Verification Points – (1/2)

� Used to compare actual data with expected data

� Check results of executed steps by analyzing GUI control’s:

– Properties (All/Single)

– Data

– Timeout Values

� Automatic specification:

1. Choose object

2. Select VP type

IBM Rational Functional TesterPedro Miguel Mendes2006.04.11

For internal use only!

Copyright © Infineon Technologies 2005. All rights reserved.

Verification Points – (2/2)

� Verification points can also be manually specified:

– Only by code editing

– Useful when tester wants to perform the tests with its own data, which source may be:

� File

� Database

� Spreadsheet…

– As properties may be extracted from components and then used in manual VPs this option is even more useful:

– IFtVerificationPoint vpManual (Java.lang.String vpName, Java.lang.Objectactual)IFtVerificationPoint vpManual (Java.lang.String vpName, Java.lang.Objectexpected, Java.lang.Object actual)

– IFtVerificationPoint vpDynamic (Java.lang.String vpName)IFtVerificationPoint vpDynamic (Java.lang.String vpName, TestObjectobjectUnderTest)

Page 11: Ibm Rational Functional Tester

Pg 11

IBM Rational Functional TesterPedro Miguel Mendes2006.04.11

For internal use only!

Copyright © Infineon Technologies 2005. All rights reserved.

Datapool – (1/2)

� A Datapool (DP) is a test dataset, a collection of related data records which supplies data values to the variables in a test script during test script playback.

� It is a key element to execute Data-Driven Tests.

� Automatic specification (manual inserted values are made redundant):

1. Choose to Data-Drive script

2. Choose top level component that includes all the others to contain the data (assuming many values as in a form)

3. Chose objects to data-drive

4. Insert Data

IBM Rational Functional TesterPedro Miguel Mendes2006.04.11

For internal use only!

Copyright © Infineon Technologies 2005. All rights reserved.

Datapool – (2/2)

� In playback mode tester can decide how many rows are to be processed from 1 to end of datapool

� DP can be created having a CSV (Comma Separated Value) file as itsbasis, which is a common exportformat supported by many Databasequery tools such as SQLNavigator:

– http://www.quest.com/sql_navigator/

Page 12: Ibm Rational Functional Tester

Pg 12

IBM Rational Functional TesterPedro Miguel Mendes2006.04.11

For internal use only!

Copyright © Infineon Technologies 2005. All rights reserved.

Native Objects

� Native objects are not stored as serialized objects but as XML files with different types of extensions.

– /resources - folder

� This makes it easy to build applications to process these files.

� Product package doesn’t seem to provide these files’ DTD or schema.

IBM Rational Functional TesterPedro Miguel Mendes2006.04.11

For internal use only!

Copyright © Infineon Technologies 2005. All rights reserved.

GUI Element Property Extraction

� Possible to extract properties and text values from GUI components and map them into script variables.

– control().getProperty(“propertyname")

� A property VP specified with the IBM FT GUI lists all available properties for the object.

� If a kind of object takes some time to load (which is something that happens a lot in web applications due to browsers rendering engines), it is possible to specify component specific timeouts.

– waitForExistence(timeout_total, interval_per_try);

Page 13: Ibm Rational Functional Tester

Pg 13

IBM Rational Functional TesterPedro Miguel Mendes2006.04.11

For internal use only!

Copyright © Infineon Technologies 2005. All rights reserved.

Notes

� It is possible to call a script from another.

� Possible to pass arguments inside an object array.

– callScript(“ScriptName",argument_array_object);

� Called script always has to cast abstract objects to desired type.

� Notes:

– Lines of Code are almost all of type:

� Guiobject.ActiontoPerform()

� Objects in OM must all have different names

� Although no defects have been found, product documentation suggests that there may be some problems when testing C++ based GUIs

IBM Rational Functional TesterPedro Miguel Mendes2006.04.11

For internal use only!

Copyright © Infineon Technologies 2005. All rights reserved.

Automatic GUI Testing – Regression TestingAutomatic GUI Testing – Regression Testing

IBM Rational FT – Main FeaturesIBM Rational FT – Main Features

Q&AQ&A

IBM Rational FT – DemonstrationsIBM Rational FT – Demonstrations

IBM Rational FT – OverviewIBM Rational FT – Overview

Table of contents

•Product Tutorial 1

•IBM – Tutorial 1

•IBM – Tutorial 2

•Web Application – MoviesDB

•Paint .net Cube

Page 14: Ibm Rational Functional Tester

Pg 14

IBM Rational Functional TesterPedro Miguel Mendes2006.04.11

For internal use only!

Copyright © Infineon Technologies 2005. All rights reserved.

Automatic GUI Testing – Regression TestingAutomatic GUI Testing – Regression Testing

IBM Rational FT – Main FeaturesIBM Rational FT – Main Features

Q&AQ&A

IBM Rational FT – DemonstrationsIBM Rational FT – Demonstrations

IBM Rational FT – OverviewIBM Rational FT – Overview

Table of contents

•Private Objects Manipulation

•Object Map

•Datapools

•Custom .net Controls

•(MAC GUI Framework)

•Rational Test Manager Integration

IBM Rational Functional TesterPedro Miguel Mendes2006.04.11

For internal use only!

Copyright © Infineon Technologies 2005. All rights reserved.

References

� “Técnicas para Construção de Testes Funcionais Automáticos”

– Simone Antunes Correia, Alberto Rodrigues da Silva

� http://www-28.ibm.com/developerworks/rational/products/functionaltester/

� http://www.rational-ug.org/

� http://www.eecs.wsu.edu/paint.net/ - Paint .net

Page 15: Ibm Rational Functional Tester

Pg 15

IBM Rational Functional TesterPedro Miguel Mendes2006.04.11

For internal use only!

Copyright © Infineon Technologies 2005. All rights reserved.

Never stop thinking