Integrating QTP with Terminal Emulators

According to the system documentation, QuickTest Professional supports a number of terminal emulators, the vendors including Attachmate, Hummingbird, IBM, NetManage, Seagull, WRQ and Zephyr. However there are a myriad of other vendors out there with terminal emulators that could manually be integrated with QTP. This document will go through the setup of one of these, namely the TN3270 Plus emulator.

However all emulators should work in more or less the same way. For the purposes of this example we will be using the Mercury Terminal Demo Server application. Note that in order to get the most benefit from the integration to QTP, the emulator must be based on HLLAPI, or variations thereof. This will enable QTP to recognize fields as objects and record them in the repository. The TN3270 Plus emulator uses WinHLLAPI.dll. In this example I am also assuming that the TE Add-in for QTP has been installed.

The process is relatively simple:
1. Install the terminal emulator. A trial version of the TN3270 Plus emulator can be downloaded from sdisw. After installing the emulator I started the Mercury server and opened a terminal window.

View of emulator connected to the Mercury Demo Application

2. The next thing we need to do is set up the session in the emulator. Do this by going to Setup => Sessions. At the bottom right there is the WinHLLAPI Session ID. Change this to “A”. All other settings I just left at their default values.

Define "A" session in emulator

3. Open QTP. Note that it is important that the emulator application is opened before QTP is opened, else QTP will not hook in to the emulator. Open the menu Tools => Options. Select the Terminal Emulator section. Click the Open Wizard button to start defining the emulator settings.

4. Click Next on the first page. Select the Configure a new user-defined setting option and enter a descriptive name for Vendor and Emulator. Click Next, Next.

Define a new emulator type.

5. Browse to the file that is used by the emulator (In this case it is “C:\Program Files\SDI\TN3270 Plus\Whllapi.dll”). The name of the file will be something along the lines of hllapi.dll, whllapi.dll, ehllapi.dll or ehllapi32.dll, etc. depending on the vendor used. Secondly we need to specify the name of the entry function for this dll file. This may be less obvious. If it is not documented you can get the info by interrogating the dll with a tool such as Dependency Walker. In our example, the name of the function is simply hllapi. Note that the function names are case sensitive. Lastly we select Classic as the HLLAPI format. Click Next.

Define HLLAPI dll details

6. You should now be presented with a preview window displaying the contents of the emulator screen. If you don’t see this it means that QTP is not able to connect to the emulator. Reasons may include an incorrectly-defined function name, emulator session not set to “A” or QTP having been opened before the emulator.

Confirm QTP connectivity to emulator

7. Next we need to point out the different screen components of the emulator window to QTP. Click the “hand” button for each one and then click the area of the window that you want to register. You should not need to configure the emulator screen (bottom checkbox), unless you are not using hllapi. Click Next.

Register emulator window components in QTP

8. Finally, you can save the configuration settings to a file if you want. Click Finish to complete the process. You should now be able to script against the emulator, with QTP recognizing fields and registering them in the repository. In some cases the fields are not registered automatically so you may have to add them to the repository manually. You can now do anything that would normally be able to do with a Windows app using the repository, such as checkpoints or using the GetROProperty methods.

Happy scripting!

Example of script recorded against emulator example

 


Related posts:

  1. QTP “Uninstall was not completed” problem I came across this problem while installing QTP 9.5 earlier...
  2. HP Software Trial License Periods HP software tools all have have different trial licensing periods....
  3. How to make QTP “analog mode” steps more reliable We all know that “analog” is widely considered a dirty...
  4. Using the QuickTest Professional “commuter” license If you’re like me and want to use QuickTest Pro...


Bookmark using any bookmark manager!

 

You can follow any responses to this entry through the RSS 2.0 feed. You can leave a response, or trackback from your own site.

5 Responses to “Integrating QTP with Terminal Emulators”

  1. Hi,

    This is an amazing documentation for someone who wants to start the automation of bluescreens. This helped me a lot. Thanks for the great work done!!!!

    Keep it up…..

    Madhu R

  2. Hi,

    I would like to try QTP with Terminal Emulators. Based on your example, you used Mercury Interactive Demo System. Does this application come with the QTP installation? If not, where can I download this demo application?

    I was trying to follow Step 1 but doesn’t know how to start Mercury server. Please let me know how to do that.

    Thanks,
    Erick

  3. Hi ,
    I interfaced QTP with the mainframe application(TN3270) .But when For each and every time i start QTP i have to configure this settings again and again.Do we have any solution for this ?

  4. Hi,
    I want try to use this add-in but i can’t find the Mercury application that you have use.
    Can you tell me where you find it ?
    or better can send it to me ?
    Luca

  5. Luca Ruggeri Says:

    Hi ,
    i want to use the demo application but i can’t find it can you send me it or tell me where i can find it ?

    Best regards
    Luca

Leave a Reply