Managing Test Projects

A test project corresponds to the Natural application you want to test. It consists of one or more test cases. This document covers the following topics:

See Test Project Configuration Parameters in the Natural Screen Tester Reference Guide for further details regarding all the test project parameters.


Creating a Test Project

In this task, you will create a new Natural Screen Tester test project. Every Natural Screen Tester test project is connected to a host and has a repository containing all the Natural Screen Tester entities. The steps detailed in this task include the basic steps required to create a test project. Advanced configuration is explained under Test Project Configuration Parameters in the Natural Screen Tester Reference Guide.

Start of instruction setTo create a Natural Screen Tester test project

Before creating a new test project, ensure that Natural Screen Tester server is available and running, and start the Designer. Login to the relevant server or add an additional server as required. See also Natural Screen Tester Designer (Software AG Designer) in the Getting Started documentation.

  1. In the Natural Screen Tester Explorer, right-click on the Natural Screen Tester Server and choose New test project... .

    Or:
    Choose the menu item File > New > Other.... The New Project wizard window is displayed.

    Expand the Software AG node and choose test project then click Next to display the New Natural Screen Tester test project wizard:

    Create a New test project wizard is displayed.

    graphics/projects_create-1.png

  2. Enter a name for the test project and a suitable description.

  3. Select the Initialization mode:

    Automatic

    Automatically loaded when the server is started.

    When first accessed

    Loaded when first accessed, in other words, when the code that initializes startup is first called (default).

  4. Click Next. The Select Host screen is displayed. Choose whether to use an existing host or create a new one.

    graphics/projects_create-2.png

  5. If you choose to define a new host, enter a name for the host and select the relevant type of host. Click Next. The host connection and conversion parameters are displayed.

    graphics/projects_create-3.png

    It is mandatory to enter the host's name/IP address (IPv4 and IPv6 address formats are supported). Configure the other parameters as required. For details see Host Configuration: Connectivity in the Natural Screen Tester Reference Guide.

  6. Click Finish. The test project is displayed in the Natural Screen Tester Explorer. It is possible to further configure the test project properties by right-clicking on the test project name and selecting Properties. See also Test Project Configuration Parameters in the Natural Screen Tester Reference Guide.

Editing a Test Project's Configuration (Advanced Configuration)

The Test Project Properties dialog box contains additional parameters that can be configured such as the language, process tracing, screen content definitions etc. For details of each node see Test Project Configuration Parameters. To edit a test project's configuration, right-click on the test project's node (in the Natural Screen Tester Explorer) and choose Properties.

Note:
Notice that in the Host name field (in the Host tab), only hosts of the same type as the configured host are listed.

Deleting a Test Project

Start of instruction setTo delete a test project

  • Right-click on the test project's node and choose Delete. In addition to deleting the test project it is also possible to determine whether when the host used in this test project is not used in any other test project, you would like to delete the host and also whether you would like to delete the entire test project from the file system.

Reloading a Test Project

Reload a test project when there is new data that the test project requires, such as when repository definitions change or when the database file is replaced. Reloading the test project will reload the repository, close all connection pools, stop running connection pools and if the database is synchronized at the end of the reload process will automatically restart the connection pools.

Start of instruction setTo reload a test project

  • Right-click on the test project's node and choose Reload Test Project.

Importing a Test Project's Configuration or Entities

It is possible to import:

  • a complete test project - including the configuration, the test project entities and a trace file - contained in a gxar file

  • a test project's entities in a gxz file

It is not possible to import entities exported from a higher server version than the current version that you are using.

Important:
As the import process may consume a lot of memory, it is recommended to restart Natural Screen Tester server after completing the process.

This section covers the following topics:

Importing a Complete Natural Screen Tester Test Project

When importing a complete Natural Screen Tester test project, you will require a gxar (Natural Screen Tester test project archive) file. This file includes the test project configuration, Natural Screen Tester entities (as a read only gxz file) and a trace file. The gxar file can be imported into Natural Screen Tester in two different methods:

"Hot Deploy"

Using the "Hot Deploy" method, the gxar file is simply located and placed in the host-applications directory as the file to be imported.

Start of instruction setTo import a test project in the "Hot Deploy" method

  1. Open your Windows Explorer.

  2. Locate the relevant gxar file and place it in the host-applications directory of your Natural Screen Tester installation.

  3. In Natural Screen Tester Designer, right-click on the server and choose Properties.

    graphics/projects_import_all_hot.png

  4. In the General tab, determine to load Natural Screen Tester archive test projects. Set the interval to look for updates. This determines how often the Natural Screen Tester server should check to see if the gxar file to use has changed. Once a different gxar file is detected, it will be used.

    It is also possible to use the gxar file by reloading the server (right-click on the server and choose Reload).

Import Wizard

Start of instruction setTo import a test project

  1. Right-click on the test project's node and choose Import/Replace test project. The Import/Replace Test Project wizard is displayed.

    graphics/projects_import_all_wizard.png

  2. Enter a file name, or browse and select the file to import.

  3. Select whether to replace an existing test project (selected by default), or to create a new test project. Enter a name accordingly.

  4. Click Finish. Wait a few minutes while the test project is imported.

Importing a Test Project's Entities

Start of instruction setTo import entities

  1. Right-click on the test project's Root node and choose Import Entities. The Import Entities wizard is displayed.

    graphics/projects_import_entity.png

  2. Enter a file name, or browse and select the file to import.

    Check Do not overwrite existing entities to determine not to overwrite an existing entity with an imported entity of the same name.

    Check Do not overwrite existing Connection Information Sets to determine not to overwrite an existing connection information set with a set of the same name.

    Notes:

    1. If the first option is checked, the second option is checked automatically and cannot be unchecked.
    2. The Session Data entity will be merged with the existing Session Data entity. When there is a conflict between the imported to the existing Session Data entity, your selection in this checkbox will determine how the Session Data entity will be.
    3. When importing an entity to a test project that has the same entity name, the existing entity will be overwritten by the new one. The timestamps of the new entity (for example creation and modification date) also overwrite the values of the original entity. These changes take effect immediately, not after reloading the test project.
  3. Click Finish. The entities are imported into the test project.

Note:
Clicking Cancel on the Progress Bar dialog box will cause the process to be stopped and the entities will not be imported.

Exporting a Test Project's Configuration or Entities

The Export Wizard allows you to export a test project configuration and its repository residing on various database systems into a standard zip file. This wizard guides you through the steps of exporting data.

Note:
When exporting entities, the Session Data entity will always be exported.

Start of instruction setTo export a test project configuration with/without its entities

  1. Right-click on the test project's node and choose Export test project. The Export test project wizard is displayed.

    graphics/exportapp.png

  2. Select whether to export just the test project configuration or the test project configuration together with the entities.

  3. Enter a folder name, or browse and select the target folder.

  4. Check the Export trace file check box to export a trace file. A list of replay (gct) files that are on the server are displayed. Select a file or click Browse... to select a local file to copy to the server.

  5. Click Finish. The test project will be exported to the defined folder.

Start of instruction setTo export entities only

  1. Right-click on the test project's Repository node and choose Export Entities. The Export Entities wizard is displayed.

    graphics/exportent.png

  2. Browse and select the target folder and file name where the exported entities are to be placed.

  3. Click Finish. The export process will commence and the entities will be exported to the selected folder.

    Note:
    The Session Data entity will always be exported, regardless of the entities selected to export.

Recording Trace Files

The Trace File feature enables recording a file, which traces the connection communication between the Natural Screen Tester server and the host, for each connection. It is possible to define whether a single trace file will be created, replacing the previously saved file or whether the data will be saved to a new file for every new user session. Identifying the separately saved files is possible by inserting identifying parameters in the file name (the session ID, creation time and/or connection ID). It is highly recommended to create a separate file for each session/connection or creation time. Note that trace files can be created from within the session definition overriding the test project definition. This is recommended as it prevents conflict with other existing sessions.

Note:
Log and trace files can contain sensitive personal data (for example user ID, IP address, etc.). We recommend you check the different trace opportunities provided by Natural Screen Tester and delete log and trace files if they are no longer needed. Natural Screen Tester will not delete these files automatically; this is your responsibility as user. Use the appropriate tools of the respective operating system.

The trace files can be also defined to be created in folders per Day Month and Year. This is recommended as it prevents conflict with other existing sessions.

The trace files can be compressed to save space on the disc. This is particularly suitable when tracing a large number of files on a regular basis.

When required, you can select to encrypt the trace files.

Start of instruction setTo record a trace connection file

  1. In the Natural Screen Tester Explorer, right-click on the relevant test project and choose Properties.

  2. Click on the Host>Recording node. See Host Parameters: RecordingconfigParms_host_recording

  3. Check Record terminal sessions (trace files).

  4. Check the Compress (create files in zip format) check box to compress the file. Compressed files will have the suffix .zip.

  5. Check the Encrypt (using server private key) check box to encypt the file. In order to encrypt files, you must first define the encryption key (In the Server properties, General tab). Encrypted files will have the suffix .gctx. A file which is both compressed and encrypted will have the suffix .gctx.zip.

  6. Choose Suppress hidden fields to conceal passwords and hidden fields.

    Note:
    The "Suppress hidden fields" option is not supported when recording using Terminal Emulation Proxy.

  7. Provide a name for the file.

  8. Check the relevant check box to determine that a new file will be created for each session/creation time or connection ID. It is possible to add the following parameters to the file name instead of using the check boxes: %u will insert the session ID. %t will insert the creation time stamp of the connection. %c will insert the connection ID.

  9. Browse and select the location of the folder where the files will be stored. Determine whether sub folders will be created for each year/month/day.

  10. Click OK to save your changes.

See also Test Project Configuration Parameters.

Working with Offline Sessions

In order to develop, debug and reconstruct specific scenarios, it is possible to replay (GCT) files that have traced the emulation protocol for each user. See Recording Trace Files. In order to replay such files, the test project configuration definitions must indicate that instead of working online with the host, Natural Screen Tester must, when connecting, access and replay the specific file. Note that replay file can be defined from within the session definition overriding the test project definition. This is recommended as it does not conflict with activities of other users.

Note:
Offline sessions support replaying encrypted and/or compressed files. Refer to Recording Trace Files for additional details

Start of instruction setTo define working with offline replay files

  1. In the Natural Screen Tester Explorer, right-click on the relevant test project and choose Properties.

  2. Expand the Host node and select the Offline node.

  3. Check the Work offline check box.

  4. Either enter or browse to select the file name including the full path.

  5. Natural Screen Tester enables a session replayed by a GCT to simulate the host's communication delay or to predefine a time delay to wait before showing the information (this is because generally, the test project is faster when replayed). This is determined in the Simulate host delay field. Available values: No delay, Simulate host, 500- 10000 ms (by default No delay is selected).

  6. Click OK to save your changes.

See also Test Project Configuration Parameters.

Changing the Initialization Mode of a Test Project

Start of instruction setTo change the initialization mode of a test project

  1. In the Natural Screen Tester Explorer, right-click on the relevant test project and choose Properties.

  2. Ensure that the General node is selected.

  3. In the Initialization mode field, select the relevant initialization mode:

    When first accessed

    Loaded when the code that initializes startup is called.

    Automatic

    Loaded when the server is started.

  4. Click OK to save your changes.

See also Test Project Configuration Parameters.

Setting Session Timeout for Idle Users

Start of instruction setTo set the timeout for idle users

  1. In the Natural Screen Tester Explorer, right-click on the relevant test project and choose Properties.

  2. Select the Host node.

  3. Select whether the session timeout will be unlimited or disconnected after a specific number of seconds.

  4. Click OK to save your changes.

See also Test Project Configuration Parameters.

Handling Flickering of Host Screens

It is necessary to use the Flickering of Host Sessions feature when one of the following happens:

  • In the browser, a blank screen is displayed when navigating between two host screens.

    Note:
    Refer to Blank Screen Timeout in General Host Parameters for additional information on handling blank screens.

  • In the browser you are required to submit the Enter key (or any other key) twice in order to navigate to the next host screen.

The initial need for Flicker arises when specific host screens are received 'split' between several buffers of data. Thus Natural Screen Tester Server needs to be informed to wait an additional amount of time for the complete screen to arrive. This additional amount of time is defined (in milliseconds) in the Flicker parameter in the Host node of the test project Properties dialog box. The flicker setting applies to the entire Natural Screen Tester test project, meaning that if the flicker is set to 500ms, after each host transaction the flicker time will be added to the communication time. In other words, the entire test project will be 'slowed down' by the flicker time. Therefore this value should only be set for the entire test project according to the following guidelines:

As a rule of thumb, there is no reason to use the flicker setting in the test project configuration for block mode hosts. Specific 'problematic' screens should be handled using wait conditions, both in navigation paths and in Web test projects. For less specific cases (when a wait condition for a specific screen cannot be used), it is possible to set the flicker setting only for certain actions (using either the path dialog or the Base Object API in Web test projects).

Start of instruction setTo define the flicker time

  1. Click the relevant test project in the Natural Screen Tester Explorer.

  2. Right-click a test project and choose Open. The test project dialog box is displayed.

  3. In the Host tab enter a value in the Flicker field. Possible values are from 0 to 10000 ms.

  4. Click Apply to save all changes, without closing the dialog box. Click OK to save changes and close the dialog box. You will be required to confirm the change.

See also Test Project Configuration Parameters.

Defining Natural Screen Tester RPC Parameters

The RPC connections pool is used for holding pre-connected RPC connections. When an RPC connection is required to execute a program, a connection from the pool is used, saving the connection time and executing the program immediately. This feature is available for AS/400 hosts only. This feature is available in SOA test projects only.

Start of instruction setTo set the RPC pool connections settings

  1. Open the test project Properties dialog box and click on the Host>RPC node.

  2. Choose Use Connections Pool.

  3. Configure the RPC connection parameters. Refer to Test Configuration Host Parameters: RPC for further details regarding the fields in this dialog box.

  4. When required, configure the username and password needed to connect to the AS/400 programs. See also Host Configuration Parameters: RPC.

Mapping Keyboard Keys

It is possible to map specific keyboard keys to the Keyboard Mapping tab in the test project Properties dialog box.

Start of instruction setTo define Keyboard Mappings

  1. Right-click on the relevant test project and choose Properties.

  2. Focus on the Keyboard Mapping tab.

  3. To map one of the existing mappings, locate it in the list of keyboard mappings and ensure that it is marked as Enabled. If it is not enabled, click on the Enable Key hyperlink.

  4. To add a new keyboard mapping, click on the Add Keyboard Mapping hyperlink.

  5. Enter the key combination in the Keyboard field.

  6. Either select the host key from the standard list of host keys or enter a host key in the Host key field. Ensure you place square brackets around the key.

    Note:
    When using the keyboard keys within the web test project, the CTRL+N and CTRL+K keys are blocked by default as they cause multiple browser windows to use the same session (this can be manually set in the config/gx_keyboardMappings.xml file).

Key combinations defined here may conflict with Eclipse key bindings. When such a conflict occurs, the key combination defined here will be ignored during runtime. To see the list of Eclipse key bindings, open the Windows>Preferences menu, expand the General tab and choose Keys. A key binding which appears in this list, and whose When field is set to "In Windows" or "In Dialogs and Windows" will cause a conflict.

When such a conflict occurs, either redefine the keyboard mapping in Natural Screen Tester, or change the Eclipse key binding. The Eclipse key binding can be changed either by choosing a different option in the When field (the key binding will be disabled and it will not be possible to enable it), or by editing the plugin.xml file of the Natural Screen Tester plug-in (add the new key binding in the org.eclipse.ui.bindings extension point with Natural Screen Tester scheme ID and empty commandId. This way, whenever the Natural Screen Tester key binding scheme is activated, the problematic key bindings will be disabled, but in other schemes the key bindings will be enabled.)

Supporting RTL Languages

The test project Configuration>Language node enables you to define the language used in the test project as well as direction settings, relevant mainly for right-to-left languages.

Start of instruction setTo configure RTL language settings

  1. In the Natural Screen Tester Explorer, right-click on the relevant test project and choose Properties.

  2. Select the Language node.

  3. Select the test project's language.

    Note:
    The following settings are relevant for right-to-left languages. The option you select is the default setting for all the screens, but can be changed for a specific screen in the relevant screen, in the Screen Direction tab.

  4. Set the Screen direction. Relevant for mainframe hosts only. The screen direction of right-to-left languages differs according to the original host settings, and when incorrectly set, can cause the screen to be illegible. In order to correct this, define the suitable screen direction.

  5. Set the Typing direction. Right-to-left languages may display typed-in text in the Display Session View and HTML fields, aligned to the left of the field. In order to display the text aligned to the right, select the right-to-left option.

  6. Set the Tab direction. When pressing the TAB button the cursor moves to the next consecutive field. The direction the cursor moves (moving to the next field to the left or moving to the next field to the right) must be correctly defined in order to preserve the screen logic.

Recording Steps while Navigating

The test project Map view enables viewing a navigation map between screens. Once the navigation option is selected, in the test project Properties, Navigation tab, the test project map will record the navigation steps between the screens. See also Navigation Parameters and Test Project Map.

Repository

The Natural Screen Tester repository is an internal database used to hold Natural Screen Tester entities (metadata) such as the Screens, Paths, Connection Pools, Programs and Procedures.

As a Natural Screen Tester user, you may like to divide test projects into folders within your repository, according to the specified interests and needs, such as development teams, sub-test projects etc. The same folder contains different types of entities and sub-folders varying according to each test project. This allows you greater flexibility organizing your entities.

The repository can be read only. It is recommended to use a read-only repository for production.

Selecting a Read-only Repository

Start of instruction setTo set up a read-only repository

  1. Open the test project.

  2. Right-click on the repository node.

  3. Choose Lock Repository (read only)

Defining Host Windows

The Windows definitions are used to correctly identify screens and to open host windows as separate pop-up windows. In the test project Properties it is possible to define the Host Windows per the test project.

When adding a window you are required to select the type of modal windows the host sends. There are two types: Reversed Video or Frame. For test projects that have more than one level of windows (a window within a window), where each level is defined with a different Window Type, be sure to define the windows in the correct order.

Note:
When the host is a Natural UNIX host, this tab is disabled, as the windows' definitions are included in the Natural-UNIX protocol and do not require being defined via Natural Screen Tester.

Start of instruction setTo define windows

  1. Right-click on the relevant test project and choose Properties.

  2. Add a Frame or Reversed Video

  3. Configure the parameters as detailed in Test Project Configuration Parameters: Windows.

Multiple Developers Working on the same Test Project

Natural Screen Tester test projects are typically developed by more than one user. This can sometimes cause conflicts on the Natural Screen Tester server. Working methodologically and investing time and effort in planning the development and design of the project can help prevent such conflicts. We recommend you divide responsibilities between the developers (such as developers working on specific entity types, or workflows).

Typical conflicting scenarios and outcomes:

  • More than one developer editing the Test Project Properties: Natural Screen Tester will save the changes of the first developer who saves the changes.

  • More than one developer editing an entity:

    When more than one developer edits the same entity, and one of the developers saves the entity, the other developers receive a message indicating that this entity has been saved by another developer. You are required to determine whether you would like to work on the newly saved entity (and update your editor to reflect the newly saved entity) or to continue working on the outdated editor.

    If you choose to continue working on the outdated editor then when trying to save the entity, you will be informed of the name of the user who made the changes and you will be able to decide whether to either:

    • Overwrite the changes that the other developer has made.

    • Save the entity with a different name. Note that references that pointed to the original entity will not point to this entity and need to be added manually. References that this entity referred to will be maintained.

    • Discard the changes that you made.