Skip to main content

By clicking Submit, you agree to the developerWorks terms of use.

The first time you sign into developerWorks, a profile is created for you. Select information in your developerWorks profile is displayed to the public, but you may edit the information at any time. Your first name, last name (unless you choose to hide them), and display name will accompany the content that you post.

All information submitted is secure.

  • Close [x]

The first time you sign in to developerWorks, a profile is created for you, so you need to choose a display name. Your display name accompanies the content you post on developerworks.

Please choose a display name between 3-31 characters. Your display name must be unique in the developerWorks community and should not be your email address for privacy reasons.

By clicking Submit, you agree to the developerWorks terms of use.

All information submitted is secure.

  • Close [x]

Test automation scripting

Useful coding techniques for Rational Functional Tester scripts

Brian Bryson Photo
Brian Bryson joined IBM Rational in 1995 after having spent several years in software development. Since joining IBM Rational, he has held various positions supporting software quality tools from consultant to technical marketing. He is currently the automated software quality Evangelist for IBM Rational and spends his days speaking to customers, partners, and analysts on all matters pertaining to Software Quality. He has spoken at numerous conferences and published many articles, the most recent on patterns of success in test automation in the December 2004 issue of Software Test and Performance.

Summary:  This tutorial shows you how to work programmatically with application object properties and regular expressions. You will learn some practical strategies for test script automation as well as how to validate the contents of database tables and using a third-party application to help out your testing.

Date:  04 Apr 2005
Level:  Introductory PDF:  A4 and Letter (68 KB | 18 pages)Get Adobe® Reader®

Activity:  5278 views
Comments:  

Introduction

Overview

The purpose of this tutorial is to provide test automation developers with some practical test automation script strategies to use when creating Visual Basic.NET scripts with IBM® Rational® Functional Tester.

In this tutorial, you will learn how to do the following:

  • Work programmatically with application object properties
  • Validate the contents of database tables
  • Work programmatically with regular expressions
  • Pass information between scripts

Each of these exercises builds one upon the other. However, if you want to perform only a given section of the tutorial, the solution set that comes with this guide contains all prerequisites for each section. You'll find instructions in the Overview section of each exercise explaining how to get started from that point.


Who should take this tutorial?

For most users, their first experience with IBM Rational Functional Tester involves creating and executing a script using the Functional Tester recording mechanism. For some users this will be enough for them to implement a stable suite of regression tests.

Other users might want more. Perhaps you want to make your scripts more robust than a simple record and playback script. Perhaps you want to add conditional logic to only perform a given action should a particular condition be met. Perhaps you want to repeat actions in your scripts several times. These are just some of the examples of fundamental scripting strategies you learn here to take your scripts beyond record and playback.

This tutorial is designed for testers using IBM Rational Functional Tester with VB.NET scripting. This tutorial assumes you are familiar with the basic operation of IBM Rational Functional Tester. If you're a tester who has successfully created record and playback type scripts and now want to go to the next level, then this tutorial is for you.

If you are not yet comfortable with IBM Rational Functional Tester, you can walk through the tutorial, Automate regression tests: IBM Rational Functional Tester makes regression testing a snap. It will guide you through the basics of IBM Rational Functional Tester. Once you have mastered the skills in that introductory tutorial, you should then be able to move on to the more advanced topics covered in this tutorial.

If you are using the JavaTM scripting features of IBM Rational Tester, then this tutorial will only be of partial assistance to you. While all the concepts will apply, the code samples will be different. In each strategy section, I've devoted some time to discussing how to implement the strategy in the Java environment. You won't be able to follow the examples verbatim, but there will be enough information to get you to where you want to go.


Prerequisites

If you don't already have a copy of IBM Rational Functional Tester, you can download a fully functional trial version. Accept all default options when installing. No special configuration or installation options are necessary for this tutorial.

Functional Tester supports two scripting languages: Java and Visual Basic.NET. For users who want to craft tests using the Java language, Functional Tester includes the Eclipse open source development environment. No further installation steps are required. For those users who want to use the Visual Basic.NET scripting language, Visual Studio.NET must be installed on their systems before they install IBM Rational Functional Tester. Visual Studio.NET is available for purchase from Microsoft.

Optionally you can also download the file, RFT_Tutorial_Project.zip, which contains a Functional Tester VB.net solution project. This project contains the scripts necessary to pick up this tutorial from any given point. If you intend to go through this tutorial from top to bottom, you will not need any of the scripts in the solution project.

1 of 9 | Next

Comments



Help: Update or add to My dW interests

What's this?

This little timesaver lets you update your My developerWorks profile with just one click! The general subject of this content (AIX and UNIX, Information Management, Lotus, Rational, Tivoli, WebSphere, Java, Linux, Open source, SOA and Web services, Web development, or XML) will be added to the interests section of your profile, if it's not there already. You only need to be logged in to My developerWorks.

And what's the point of adding your interests to your profile? That's how you find other users with the same interests as yours, and see what they're reading and contributing to the community. Your interests also help us recommend relevant developerWorks content to you.

View your My developerWorks profile

Return from help

Help: Remove from My dW interests

What's this?

Removing this interest does not alter your profile, but rather removes this piece of content from a list of all content for which you've indicated interest. In a future enhancement to My developerWorks, you'll be able to see a record of that content.

View your My developerWorks profile

Return from help

static.content.url=http://www.ibm.com/developerworks/js/artrating/
SITE_ID=1
Zone=Rational
ArticleID=134577
TutorialTitle=Test automation scripting
publish-date=04042005
author1-email=
author1-email-cc=

Tags

Help
Use the search field to find all types of content in My developerWorks with that tag.

Use the slider bar to see more or fewer tags.

Popular tags shows the top tags for this particular content zone (for example, Java technology, Linux, WebSphere).

My tags shows your tags for this particular content zone (for example, Java technology, Linux, WebSphere).

Use the search field to find all types of content in My developerWorks with that tag. Popular tags shows the top tags for this particular content zone (for example, Java technology, Linux, WebSphere). My tags shows your tags for this particular content zone (for example, Java technology, Linux, WebSphere).

Try IBM PureSystems. No charge.