Lesson 4: Play back the script
In this lesson, you will play back the script and look at some parts of the Rational® Functional Tester interface. Because the script you just recorded is the active script, that script will play back when you click the playback button.
Procedure
- To play back the script, click the Run Functional Test Script button () on the Functional Test toolbar.
-
In the Select Log window, keep the default log name Classics and
then click Finish.
Rational® Functional Tester is minimized, and the Playback Monitor starts in the upper-right corner of your screen. As the script plays back, messages are displayed in the Playback Monitor. Rational® Functional Tester plays back all of your recorded actions, such as the application starting, the actions you performed on the application, and the verification points.
When playback is finished, the HTML log displays the results of the test run in a separate window. Each event listed in the log should include Pass in the event headings in green. Notice that the two verification points that you recorded are listed.
-
Close the log.
Now that you have successfully recorded a script and played it back, let us look at the Functional Test perspective in more detail.
-
If the Functional Test window is minimized, restore it.
When you have multiple scripts, Rational® Functional Tester displays all open scripts in a project in the Java™ Editor (the script window).Learn more about Java Editor: Throughout the script, notice the information about the script shown at the top in light blue and prefixed by asterisks. This information comes from the script template, which you can modify. For more information about modifying the script template, see the Rational® Functional Tester Help.
Notice that Rational® Functional Tester adds a short comment to the script in green characters to identify the object that the following lines refer to. This information makes it easier to navigate the script. Strings passed as arguments to methods during recording, including user inputs, are bright blue.
When your cursor hovers over certain areas of the script, Rational® Functional Tester displays useful information in a pop-up text box. For example, for a helper method, you see the description property set in the object map followed by the recognition properties of the object. The hover feature is controlled by Preferences. To turn it off or modify what is shown, click , then choose and click the Hovers tab. The hover feature is on by default.
To the left of the Java™ Editor (the script window) is the Functional Test Projects view, which lists any Rational® Functional Tester projects to which you are currently connected. All scripts within each project are listed below the project name. This Projects view provides another way to navigate to a different script. When you double-click a script in the Projects view, it opens in the script window and becomes the active script.
To the right of the Java™ Editor is the Script Explorer, which lists the verification points and object map of the active script. From the Script Explorer, you can start the Verification Point Editor to display and edit verification points and start the object map editor to display and edit object maps. For more information about the Script Explorer or the other parts of the Functional Test perspective, such as the Tasks View and Console View, see the Rational® Functional Tester Help.