Running functional test scripts
This section describes the
test execution phase of functional testing.
- Restoring the test environment before playback
The state of both the environment and the application-under-test can affect script playback. If the recorded environment and the playback environment are different, playback problems can occur. - Running a script from Rational Functional Tester
When you run a script from Rational® Functional Tester, it plays back all of your recorded actions, such as starting an application, the actions you take in the application, verification points, and stopping the application. - Enabling the dynamic find feature
The Rational Functional Tester test object map lists the test objects in the application under test, in a hierarchy. Changes to the application under test might result in changes in object hierarchy. During playback, Rational Functional Tester is unable to find an object whose hierarchical position has changed, and this causes playback failure. With the dynamic find feature, you can prevent playback failure that results from hierarchy changes in the application under test. The dynamic find feature performs searches for objects whose hierarchy has changed when a search based on object recognition scoring (ScriptAssure) fails to find such objects. - Running a script from TestManager
When you run a script, TestManager creates a temporary suite, runs the suite, and removes the suite after the run is completed. You can run a script either from the TestManager Test Scripts window or from the TestManager File menu. - Pausing or stopping script playback
Playback of a script can be paused or stopped. - Debugging scripts
You can use the same process to debug a Functional Test script as you would to debug other Visual Basic or Java™ applications. If you prefer, in Rational Functional Tester, Eclipse Integration, you can debug your script in the Rational Functional Tester Debug Perspective which makes it easier to start the debugger that comes with the Java Development Toolkit. - Running scripts
When you play back a script, Rational Functional Tester replays your recorded actions, which automates the software testing cycle. - Test development phase
In the Test Development Phase, you play back scripts to verify that they work as intended, using the same version of the application-under-test that you used to record. This phase validates the expected behavior of the application. - Regression testing phase
When you have a baseline of expected behavior for your application-under-test, you can automate regression testing for subsequent builds. - Playback Monitor
During playback you can view the script name, the number of the line that is executing, status icons, and a description of the action in progress from the Playback Monitor. - TestManager and script execution
You need to do some preliminary set up before you run a Functional Test script from TestManager. - Using ScriptAssure
Using ScriptAssure, you can play back scripts successfully even when the application-under-test has been updated. - Ambiguous object recognition in functional testing
Ambiguous recognition occurs when Rational Functional Tester can not uniquely identify an object in the system-under-test. This commonly happens when Rational Functional Tester cannot differentiate between an instance of the application-under-test started by a script playback and an instance of the same application inadvertently left open previous to script playback. This also applies to identical windows from one application and identical HTML documents. Ambiguous recognition will cause script playback failure unless the duplicate application is closed. - Screen snapshot on playback failure of functional tests
If playback of a script causes an exception to be thrown, Rational Functional Tester takes a screen snapshot at the time of the failure. The screen snapshot is accessible through the log. - Restoring the test environment before playback
The state of both the environment and the application-under-test can affect script playback. If the recorded environment and the playback environment are different, playback problems can occur. - Running a script from Rational Functional Tester
When you run a script from Rational Functional Tester, it plays back all of your recorded actions, such as starting an application, the actions you take in the application, verification points, and stopping the application. - Running a script from the Microsoft Edge browser
You can use IBM® Rational Functional Tester to play back test scripts using the Microsoft Edge browser. - Pausing or stopping script playback
Playback of a script can be paused or stopped. - Configuring how to handle unexpected windows during playback
Problems can occur during script playback if unexpected windows are displayed. Unexpected windows such as security and warning message dialog boxes or custom dialog boxes can cause playback failure with exceptions such as object not found or window not activated. You can configure how unexpected windows can be handled so that scripts can be played back smoothly without interruption. - Enabling the dynamic find feature
The test object map lists in a hierarchy the test objects in the application under test. Changes to the application-under-test might result in changes in the object hierarchy. During playback, Rational Functional Tester is then unable to find an object whose hierarchical position has changed, and this causes playback failure. With the dynamic find feature you can prevent playback failure that results from hierarchy changes in the application under test. The dynamic find feature performs searches for objects whose hierarchy has changed, when a search that is based on object recognition scoring (ScriptAssure) fails to find such objects. - Inserting dynamic test objects
You can also insert dynamic test objects by using Insert Dynamic Test Object. The hierarchy of a test object in the object map represents the order of search of the particular control during playback. Over a series of application changes, the hierarchy of the objects may change if new objects are introduced in the test application. This results in a playback failure. Using dynamic test objects you can anchor a test object as a descendant to its parent. - Debugging scripts
You can use the same process to debug a Functional Test script as you would to debug other Visual Basic or Java applications. If you prefer, in Rational Functional Tester, Eclipse Integration, you can debug your script in the Rational Functional Tester Debug Perspective which makes it easier to start the debugger that comes with the Java Development Toolkit. - Running scripts
When you play back a script, Rational Functional Tester replays your recorded actions, which automates the software testing cycle. - Test development phase
In the Test Development Phase, you play back scripts to verify that they work as intended, using the same version of the application-under-test that you used to record. This phase validates the expected behavior of the application. - Regression testing phase
When you have a baseline of expected behavior for your application-under-test, you can automate regression testing for subsequent builds. - Playback Monitor
During playback you can view the script name, the number of the line that is executing, status icons, and a description of the action in progress from the Playback Monitor. - Using ScriptAssure
Using ScriptAssure, you can play back scripts successfully even when the application-under-test has been updated. - Ambiguous object recognition in functional testing
Ambiguous recognition occurs when Rational Functional Tester can not uniquely identify an object in the system-under-test. This commonly happens when Rational Functional Tester cannot differentiate between an instance of the application-under-test started by a script playback and an instance of the same application inadvertently left open previous to script playback. This also applies to identical windows from one application and identical HTML documents. Ambiguous recognition will cause script playback failure unless the duplicate application is closed. - Screen snapshot on playback failure of functional tests
If playback of a script causes an exception to be thrown, Rational Functional Tester takes a screen snapshot at the time of the failure. The screen snapshot is accessible through the log.
Feedback