< Previous | Next >
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.
A project is a collection of test assets such as test scripts, object maps, verification points, and datapools, 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
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.
- To verify whether the feature is enabled, click Window > Preferences.
- In the left pane of the Preferences window, expand Functional Test, then Simplified scripting.
- In the Simplified Scripting page, clear the Enable Simplified Scripting checkbox.
- In the Application Visuals page, clear all the options listed in the page for the application visuals.
- Click Apply and then OK.
Create a project
Create a project to store the test assets that you need to test the Classics CD sample application.
- Click Windows > Open Perspective > Other to open the functional test perspective . In the Open Perspective dialog box, select the Functional Test option.
- Click File > New > Functional Test Project.
- Type DataDriveTutorial for the name of the new project.
- Click Finish.
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.
- On the Functional Test toolbar, click Record a Functional Test Script().
- Type OrderTotal for the name of the test script.
- Click Next.
When you create a test script, Functional Tester creates a test datapool and other test assets. Use the defaults for Private Test Datapool and Sequential. A private test datapool is associated with only one script and is not available to any other scripts. When you use the sequential order, the test script accesses datapool records in the order that they appear in the datapool.
- Click Finish. The Functional Tester window minimizes and the Recording Monitor opens.
Start the ClassicsCD application
Start the ClassicsCD application and navigate through the application to the dialog box that you will data-drive.
- On the Recording toolbar, click Start Application().
- If necessary, click the Application Name arrow to see the options, and then select ClassicsJavaA - java.
- Click OK. ClassicsJavaA is build 1 of the sample application, ClassicsCD, which comes with Functional Tester.
- 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.
- Click Place Order.
- Click OK to close the Member Logon window.
- In the Place an Order window, type 1234567890 in the Card Number field and then type 09/09 in the Expiration Date field.
< Previous | Next >