action.skip

Working with Host Emulator

The Host Emulator runs 3270, 5250, and VT recordings without having a live connection to a mainframe. Using Host Emulator is an easy way to test your client or Web application. Host Emulator simulates the host connection you used to create your recording in the Design Tool. Host Emulator does not actually connect to the host.

The recording contains all data communication between the Design Tool and the host, including screens, navigational commands, and errors messages. This allows your application to access the data as if it was coming from the actual host. You can then load this model into the Host Emulator, connect to it using the Design Tool, or another third-party client, and create the actual models you will deploy in your applications. The recordings you create in the Design Tool and play back in the Host Emulator are static; they contain only the screens and data captured by the recording files. Although you can play back a recording in the Host Emulator to test your client application's ability to navigate the host, you cannot test your client application's ability to update data on the host.

When you replay a recording in the Host Emulator, the Host Emulator can only display the entities the model contains. For example, if you have only one AcctProfile entity, you'll only be able to see the one set of data that entity contains. Because a recording contains multiple entities for different sets of data, it allows you to display multiple AcctProfile screens, each with different data.

Host Emulator recordings have these benefits:

  • You can test your applications more thoroughly. Including customer specific entities in your recording that allow you to test your application's ability to access specific data.

  • After you connect to the host and create the recording, you can develop and test multiple recordings and applications without being connected to the host.

  • You can build error messages into your model. By creating entities for specific error messages, you can test the way your client application handles host errors.

After you create your recording in the Design Tool, copy the .trc_GROOMED file (located in <install_location\Verastream\HostIntegrator\recordings to your Host Emulator configuration (Verastream\HostIntegrator\hostemulator\recordings) so that the Design Tool can connect to it and allow you to create models from it. Recordings can also be copied to a Linux VHI server's verastream/hostintegrator/recordings directory and used by the Administrative Console to add the files to the Host Emulator Recordings.

Creating Recordings

Recordings represent the host application and should simulate that application as closely as possible. Follow these guidelines when creating a recording:

  • Define each host screen as an entity.

  • Use the entire screen as the pattern for each screen. The Host Emulator does not use the pattern information so there's no performance hit, but this does ensure that each host screen is unique.

  • Navigate all possible paths between entities.

  • To create spaces in a field use the space bar, never use the cursor keys. For example, "Last Name" should be typed with a space between the t and the N, rather than using cursor keys to leave a blank space.

  • Do not use login or logout scripts. The first entity defined in the recording should be the first screen displayed when you connect to the host.

  • The recording is a text file. It may be occasionally necessary to edit the recording to modify the behavior to act more like the actual host. Contact Technical Support for more information on this process.

More information

Using Host Emulator

You can use the Host Emulator to run and test 3270, 5250, and VT recordings, created with the Design Tool without having a live connection to a host. To simulate this live connection, the Host Emulator opens the recording, such as CCSDemo.trc_GROOMED, of the host application model while the corresponding "normal" model, or CCSDemo,is loaded in the Design Tool or Host Integrator Server. Example recordings are installed in the <install_directory>\RocketSoftware\Verastream\HostIntegrator\hostemulator\recordings folder.

The Host Emulator Server (localhost) is started by default.

Note

Before you can add a recording to Host Emulator, you must copy the recording file (for example, ccsdemotrace_65342_00001.trc_GROOMED), created in the Design Tool, to the <install_directory>\Verastream\HostIntegrator\hostemulator\recordings directory. On Linux platforms, copy the file to /opt/Verastream/HostIntegrator/recordings.

How to Access Recordings

  • Recordings are created and automatically groomed in the Design Tool, saved, and after you copy them to the Host Emulator server, they are available to you for playback.
  • From the Administrative Console, open the Host Emulator perspective (Host Integrator drop down list, select Host Emulator). On the Host Emulator Server Explorer you can add a Host Emulator server or use the default (localhost) server. Using the information on the Host Emulator Recordings view, verify that the port number for the recording in the server configuration matches the port number specified for that recording in the Host Emulator, and modify the host profile for the recording to point to the machine where the Host Emulator is running. By default, details about the recordings provided with this installation are listed.
  • To simulate a live connection to a host, open the recording in the Design Tool and click Connect to localhost via Telnet on the Connection menu.

Adding Host Emulator Recordings

Before you can run a recording on the Host Emulator, you must add it to the Host Emulator's configuration. When you add a recording, you configure the Host Emulator to connect to the recording so you can run it.

Before you add a recording

Your recording is created and saved in the Design Tool.

  1. On the Connection menu, point to Host Emulator Recording, and select Start. You now can record screens and how to navigate between them as you create your model.
  2. Select the name and the location of the recording.
  3. Click Stop on the toolbar or select Stop from the Connection menu | Host Emulator Recording.

    If you attempt to create a new model or open an existing one, after agreeing to continue the action, the recording is also stopped.

After you create your recording in the Design Tool, to enable the Host Emulator to connect to the recording, copy the newly created .trc_GROOMED file (default location is <install_directory>\Verastream\HostIntegrator\recordings to your Host Emulator configuration (<install_directory>\Verastream\HostIntegrator\hostemulator\recordings). On a Linux server, the default location is /opt/rocketsoftware/verastream/hostintegrator/recordings. This makes the file visible in the Administrative Console and available to playback.

Adding a recording to the Host Emulator

  1. In the Administrative Console, open the Host Emulator Perspective, which is available from the Host Integrator drop down list.

  2. On the Host Emulator Servers panel make sure you have an Host Emulator Server listed. By default, there is an Host Emulator server associated with localhost available.

  3. With the desired Host Emulator Server selected, on the Host Emulator Recordings panel, click the Add a New Recording icon add recording in the top right corner.

Provide the details needed in the Add New Recording dialog box for the recording you are adding, and then click OK to add the recording to the currently selected Host Emulator Recording list.

More information

Using the Host Emulator Recordings List

To open the Host Emulator Recordings list, from the Administrative Console toolbar, open the Host Integrator perspective drop down list and choose Host Emulator. From the View menu, choose Host Emulator Recordings.

From the Host Emulator Recordings list you can playback, stop, edit, and remove Host Emulator recordings.

This column Describes this...
Name The name of each recording
Port The TCP port the recording uses to communicate with client applications and the Host Integrator Server.
Status A recording can be either in playback mode or stopped. You can only set recording properties when a recording is stopped. In playback mode, the Design Tool or Host Integrator server can connect to the Host Emulator server, assuming that the correct ports have been configured.
Sessions The number of sessions currently connected to the recording.

More information

Configuring Host Emulator Recording Properties

You can use the Host Emulator recording properties page to set and view options for your recordings within the Administrative Console.

To open the properties page, select a recording from the Host Emulator Recordings list, right-click, and choose Properties. The settings are specific to the model you selected.

You can only set model properties when the model is stopped. To change the status of a model, right-click and choose either Playback or Stop, or alternatively click the appropriate Host Emulator Recordings list toolbar buttons.

This option Does this...
Recording name The name of the selected recording.
Port The default TCP port. If you plan to have more than one recording running at the same time, they must use different TCP ports.
Terminal type Choose the terminal type that the recording is using; 3270, 5250, or VT.
Open recording when server starts Select this option to have the recording be available in Playback mode when the server starts.

More information

Stopping and Playing Back Host Emulator Recordings

Host Emulator recordings listen on their specified TCP ports for connection requests. You can have recordings playback automatically when the server starts by selecting that option in the Host Emulator Recording properties page. The status of the recording is listed in the Host Emulator Recordings view in the Status column.

You can only set recording properties when the recording is stopped. To change the status of a recording, right-click and choose either Stop or Playback, or alternatively click the appropriate Host Emulator Recording list toolbar buttons. If a client application attempts to connect to a recording while it is not listening for connection requests, it will receive a "Connection refused" error message.

To playback an Host Emulator recording

Select the recording from the Host Emulator Recordings list and click playback on the toolbar. Verify the recording is in Playback mode by checking its status.

To stop an Host Emulator recording

Click close model icon to stop the recording, which causes the recording to stop listening for connection requests. All pending connections should be closed first.

Note

Do not have more than one recording listening on the same TCP port at the same time for connection requests. If you have configured more than one recording to use the same TCP port, make sure only one of them is set to Playback at a time. The best way to ensure this is to not configure these recordings to start automatically.

More information