Recording a host connection script
You can automate the testing of a host application by recording a script that connects to, and interacts with a host system. The session is recorded as a set of commands and can be played back at a later time. This allows you to automate the navigation to specific screens.
To record a host connection script:
- Log in and interact with the host when you create a host connection script.
- In the window where you want to perform a test, on the Recording Monitor toolbar, click the Verification Point and Action Wizard icon.
- Drag the object finder over the host terminal (a thick red line outlines the selected terminal or field). You can use the selector to select the entire terminal or any of the fields in the terminal session, and click Next.
- Select the verification values to perform using Data Verification Point tab of the Perform an Action page.
- Select the required data values and properties
- Select All field properties from the list if you are checking host field attributes. Provide a verification point name, and click Next. The Verification Point Data page lists all the host fields from the current host screen.
The fields are named Field_row_col_text, where row is the starting row of the field, col is the starting column of the field and text is the text found in the field.
- Optional: Clear the check box of the field for which you do not want to perform a host-attributes check. By default all host field attributes (except the host field names) are selected by this verification point. If you do not want to test all host field attributes, double-click the item in the list, and clear the attributes in the Test Data Element list.
Avoid checking the name attribute of the host field in the verification point. This attribute might cause problems during script play back.
- Log off, and click the Disconnect icon after creating the verification points.
- Click the Stop Recording icon on the recording monitor toolbar. This stops the recording monitor and generates the script.
- Verification points
Verification points are used to test properties of application windows or fields.
- Create verification points
You can create verification points to test application objects. Verification points are used to verify that the property values is as expected. When you create a verification point, you are capturing information about an object in the application to establish this as baseline information for comparison during playback.
- Logging window content
You can log the contents of a window in a correctly formatted log file. The log contains the record of events that occur when recording the script.
- Extension for Terminal-based Applications states
Functional Tester tracks the state of Extension for Terminal-based Applications sessions as you record a script and interact with the host session. To determine the state of the session, Functional Tester checks whether the host session has focus. If the host session does not have focus, it waits for 0.5 second to see whether it gains focus. If the host session does not gain focus during that time, it returns the focus state to the frame. If the host session does have focus after the wait, Functional Tester queries the synchronization code for the state of the terminal.
- Synchronization algorithms
Extension for Terminal-based Applications has three synchronization algorithms to determine the state of the terminal. The state of the terminal depends on the loading of presentation space.
- 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
- Programmatic screen scraping for Functional Tester Extensions
With programmatic screen scraping, data verification is performed on arbitrary locations. Programmatic screen scraping is used to scrape a portion of the terminal screen to determine whether the text is displayed at the specified position of the screen. Also, programmatic scraping makes the playback process wait to allow the text to appear on the screen. APIs are developed to support this feature.