- Simplified scripting
Simplified test scripts are functional test scripts in the form of simple English statements that are easy to understand and edit. This feature is enabled by default in the Rational® Functional Tester Preferences window.
- Enabling simplified scripting
Simplified scripts are functional test scripts in the form of simple English statements that are easy to understand and edit. When you record actions on the test application using the recorder, the functional test script is generated and displayed as a simplified test script in the Script editor.
- Creating a simplified test script
Use the recording feature of Rational® Functional Tester, to record actions on the test applications. The actions on the test applications are generated in the form of a simplified test script when you stop recording. The generated simplified test script is displayed in the simplified Script editor in Rational® Functional Tester. You can also view the corresponding Java™ code of the recorded test script in the Java™ script editor.
- Editing a simplified script
You can edit a test line in the script editor and also modify the test line properties, such as the control actions in the Properties View.
- Inserting conditional statements
You can insert conditional statements to verify the values of the variables in the script and perform actions in the application.
- Specifying the playback options for a simplified script
You can set the wait time for a control to be displayed or pause an execution of a test line for a simplified script.
- Handling exceptions during script playback
If an exception occurs during script playback, you can specify how Rational® Functional Tester handles these exceptions.
- Specifying the log details for a test script
You can specify the message to be displayed in the log for a test line that has run. You can also specify the type of screen capture that must be taken during playback and displayed in the log so that you can view the state of the control or the screen in the test application.
- Deleting a test line
You can delete a test line from a script in the script editor. The application visual that is captured and displayed while recording the test script is not deleted from the Application view.
- Working with application visuals
Application visuals are snapshots of the controls or screens of the test application that are captured while recording scripts. The visuals of the test application are captured only if both the simplified scripting and the application visuals feature preferences are enabled.
- Switching to Java scripting
You can switch to Java scripting to insert Java code to perform additional operations such as extending an API or functions that cannot be performed directly in the simplified script editor. To use both the simplified script and Java scripting, you must use the Insert Java Code Snippet or Insert Java Method feature that is available in the simplified script editor and switch to Java scripting. If you modify the Java script directly without using these features, the Java script changes are lost and the simplified script runs during playback.
- Exporting a simplified script
You can export the simplified scripts in a .txt, .xml or .html format so that the script can be viewed outside Rational® Functional Tester.
- Java scripting
When you record a functional test script to test an application, simplified scripts are generated and displayed in the Script editor. The corresponding Java test script is displayed in the Java editor.
- Recording a Java test script
Java™ scripts are generated when you work with the simplified scripts. You can switch to Java™ scripting using the Insert Java™ snippet and Insert Java™ module features in the simplified script editor.
- Creating a new test script without recording
As an alternative to recording, you can create a script to enter Java™ code manually.
- Recording in an existing script
In a functional test script, you can start recording at the cursor location. By starting to record in a script, you can start applications, insert verification points, and add script support functions.
- Recording scripts to test HTML applications
Record scripts to test HTML applications on a single browser as you record any functional test script.
- Recording cross-browser and cross-platform scripts
This topic provides an overview of the procedures to set up your environment to record cross-browser scripts.
- Displaying test object information
You use the Test Object Inspector to examine graphical components visible in the running application and display information about those objects, such as parent hierarchy, inheritance hierarchy, test object properties, non value properties, and method information.
- Getting a property value
You can get a single property value for the selected object while you are recording. It puts a getProperty into your script and returns the value during playback.
- Setting a wait state for an object
This feature is used to set a wait state for an object during playback to check for its existence. This is useful when waiting for an object right after starting your application, or after other actions that may take a long time.
- Recording and playing back double byte characters on Chinese systems
The following information pertains to record and playback of DBCS on Chinese systems.
- Changing the default script helper superclass
By default, all Functional Test scripts extend the RationalTestScript class, and thereby inherit a number of methods (such as callScript). Advanced users may want to create their own helper superclass which extends RationalTestScript and can add additional methods or override the methods from RationalTestScript.
- Using script services
The Script Support Functions dialog box contains tabs that enable you to insert code into the current Functional Test script to perform a variety of tasks, such as inserting a callScript command, a log message. a timer, a sleep command, or a comment into a Functional Test script.
- Starting your test applications
When recording tests on your application, it is best to have Rational® Functional Tester start the application during recording. This makes playing back the tests more reliable because the application configuration information is used. Rational® Functional Tester can open specified Java applications, HTML pages in your browser, or run executable applications.
- Renaming a test asset
You can rename simplified test scripts, Java test scripts, test object maps, or other files in a project.
- Saving test scripts and files
You can save a functional test script or file in several ways: save the current test script or file, save all test scripts and files, save a functional test script or file with another name in a different location.
- Deleting a functional test script
You can delete a functional test script from the Projects view or the Solution Explorer. Use caution, however; deleting a script that is not under ClearCase® source control or a script in a ClearCase® dynamic view cannot be undone.
- Tips for recording functional tests
Following are some tips on ways around some potential recording issues.
- Recording a script
To start recording scripts against your applications, you must first configure your test environments, configure your applications, and create a project. Under certain conditions, you can start recording scripts without preparing your functional test environment.