Lesson 1: Create a project and record a test script

In this lesson, you will use the Classics CD sample application to create a new project and start recording a test to verify that the sample application correctly totals the amount of music CDs purchased.

About this task

What is a project?: A project is a collection of test assets such as test scripts, object maps, verification points, and datasets, that can facilitate the testing of one or more software components. You must create a functional test project before you can record a test.

Disable simplified scripting and application visuals feature

About this task

Rational® Functional Tester provides you the option to generate simplified test scripts and Java test scripts. If you are familiar with Java scripting, you can disable the simplified scripting and application visuals feature and start recording the test script. In this tutorial, we will work with Java test scripts. Before you start recording the scripts, disable the simplified scripting and application visual features.

Procedure

  1. To verify whether the feature is enabled, click Window > Preferences.
  2. In the left pane of the Preferences window, expand Functional Test, then Simplified scripting.
  3. In the Simplified Scripting page, clear the Enable Simplified Scripting checkbox.
  4. In the Application Visuals page, clear all the options listed in the page for the application visuals.
  5. Click Apply and then OK.

Create a project

About this task

Create a project to store the test assets that you need to test the Classics CD sample application.

Procedure

  1. Click Windows > Open Perspective > Other to open the functional test perspective . In the Open Perspective dialog box, select the Functional Test option.
  2. Click File > New > Functional Test Project.
  3. Type DataDriveTutorial for the name of the new project.
  4. Click Finish.

Start recording

About this task

Start recording a test script to verify that when a customer orders a music CD, the total amount charged to the credit card is the correct amount listed in the application.

Procedure

  1. On the Functional Test toolbar, click Record a Functional Test Script(Record a functional test script).
  2. Type OrderTotal for the name of the test script.
  3. Click Next.

    When you create a test script, Rational® Functional Tester creates a test dataset and other test assets. Use the defaults for Private Test dataset and Sequential. A private test dataset is associated with only one script and is not available to any other scripts. When you use the sequential order, the test script accesses dataset records in the order that they appear in the dataset.

  4. Click Finish.
    The Rational® Functional Tester window minimizes and the Recording Monitor opens.

Start the ClassicsCD application

About this task

Start the ClassicsCD application and navigate through the application to the dialog box that you will data-drive.

Procedure

  1. On the Recording toolbar, click Start Application(Start application).
  2. If necessary, click the Application Name arrow to see the options, and then select ClassicsJavaA - java.
  3. Click OK.
    ClassicsJavaA is build 1 of the sample application, ClassicsCD, which comes with Rational® Functional Tester.
  4. In the ClassicsCD application, under Composers, double-click Schubert to open the list of CDs for sale by that composer, and then click String Quartets Nos. 4 & 14.
  5. Click Place Order.
  6. Click OK to close the Member Logon window.
  7. In the Place an Order window, type 1234567890 in the Card Number field and then type 09/09 in the Expiration Date field.

    Proceed to Lesson 2. We will data-drive a test by populating the data from this dialog box.