Playing back host connection script
You can play back all your recorded actions, such as starting an application, the actions you perform, and stopping the application. There are several prerequisites to meet before you can reliably play back a script
Before you begin
To ensure that the script runs smoothly, perform the following prerequisites before playing back your script:
- Add sleep timers to the script if your host application has windows that take an abnormally long time, or your network connection is slow. Sleep timers cause the play engine to pause before sending input to the host or before trying to perform a test on the slow host window.
- Your actions, such as typing, clicking the mouse, and pressing buttons, are recorded into the script. If you have interacted with the host application prior to the host application being initialized, see Interacting with the host using the keyboard.
- If your host application uses keys other than the function keys to cause the host window to change, Functional Tester might not recognize the keys as host aid keys. For more information, see Use host key aids.
To play back your script, perform the following steps:
Procedure
- Save changes in your script.
- Click the Run Functional Test Script icon on the toolbar.
- Add manual sleep timers
When the host application moves from window to window, the transition is not instantaneous. Therefore, any input that needs to be sent to the host, such as typing text, pressing host aid keys, or testing verification points, needs to wait for the host window to become ready to receive input. Extension for Terminal-based Applications can be used to figure out the readiness of host screen for input.- Correcting object states
It is not always required to use the object state information that is captured when an object is manipulated in a script. If the state of the object does not match the state information in the script, the code might not work properly. If the exact state of the object is not necessary for the test that is performed, it might be beneficial to remove this state information.- Use host aid keys
The most common host aid keys are Enter, and all the function keys. If the key is captured within curly braces {} in a script, the key acts as a host aid key.- Use manual synchronization
Use manual synchronization when performance is considered as higher priority than running the script automatically. The synchronization algorithms are reliable, but take more time to run than is necessary.- LOADED, not READY
There are special cases during application testing when the window has finished loading, but the application inhibits keyboard input. For example, sometimes when you type invalid input, the host application locks the keyboard. You cannot continue until you reset the window.- Printing a host session window
You can print your host session window.