You may be in a situation where a GUI interface is not available. This may be a common problem when a UNIX station is used. The batch files can be found in the utilities directory in Natural Screen Tester installation directory.
Standard maps, such as Natural, BMS and MFS, are used in host test projects and include the screen data such as static data and dynamic fields. Natural Screen Tester enables importing these test project maps, saving time and effort spent on manually identifying screens and simplifying the update process when changes are made in the host. When importing test project maps, a screen is automatically created from each map, minimizing errors that may occur when creating the screens manually, one by one. The Natural Screen Tester screen created includes identifiers (based on the static data) and fields (based on the dynamic data). Natural Screen Tester supports a number of different types of maps:
Natural: Natural map support (from Systrans file).
BMS: CICS basic map support.
MFS: IMS message format service.
SDFX: Natural Screen Tester generic map format, used for other standard maps. To create SDFX files refer to SDFX File Format Definition.
SDF: Compatible with Software AG's JIS product.
The import map feature can be used to import an test project's maps for a new test project or to maintain and update previously imported maps. When updating previously imported maps, screen identifiers will be deleted and replaced, existing fields will be updated with their new positions and their references to other entities will be preserved. Fields that were previously imported, but no longer exist on the host will be deleted.
Note:
Invalid entity names, such as names which include invalid characters
such as "#" or begin with a digit, will be automatically corrected by omitting
the invalid characters.
Maps can be imported either using the Import Host Screen Maps wizard or using a batch file.
To import screens via a batch file (using the command prompt window)
Open a command prompt window.
Change the current directory to the <nsr_home>/Utilities directory.
Type screen_import.bat/sh followed by your required parameters. (The minus sign and letter should precede the value to distinguish between the parameters. The order of the parameters is not significant.)
Parameter | Description | Default |
---|---|---|
-s | Server address | 127.0.0.1 |
-p | Server port | 3323 |
-u | Natural Screen Tester user name (Required parameter) | |
-w | Natural Screen Tester user password | Empty by default |
-a | Natural Screen Tester test project name (Required parameter) | |
-f | File name, or directory name (when importing more than one file). Required parameter | |
-x | The file extension. All files from the given directory that have this extension will be loaded (when not specified, the default extension for the map type is used) | |
-af | Natural Screen Tester target folder within the repository. | Root folder |
-t | Map type. Possible values: "sdf", "sdfx", "natural", "bms", "mfs" (required parameter). | natural |
-m | Indicates where the error line is located: "first", "last", "lastm1" (last minus 1), "lastm2", "lastm3", "lastm4" (Natural maps only) | last |
-mf | Message line field name (Natural maps only) | MessageLine |
-k | Don't skip map with write command. (Natural maps only) | true (skip) |
The screens created appear in the directory you determined in the Target folder field. The names of the screens are identical to the map names.
The report is displayed in the Eclipse console and includes a list of the screens added as well as the fields and tables created/updated/deleted.
To activate the Export batch file by using the command program prompt
Open a command prompt window.
Change the current directory to the <nsr_home>/Utilities directory.
Type exportapp followed by your required parameters. (The minus sign and letter should precede the value to distinguish between the parameters. The order of the parameters is not significant.)
Parameter | Description | Default Value |
---|---|---|
-s | Server address | 127.0.0.1 |
-p | Server port | 3323 |
-u | User name | |
-w | Password | |
-a | Test project name | |
-f |
The target folder and/or file name.
|
<current location>\<test project name> |
Include one of the following parameters: | ||
-c | Export only the test project configuration (gxar file) | |
-e | Export only entities (gxz file) | |
-l | Export the test project configuration and the entities (gxar file) |
Specify target folder and file name:
exportapp.bat -s localhost -p 3323 -u administrator -a InstantDemo -f
C:\<SAG_install_dir>\NaturalScreenTester\utilities\export\MyTestProject -c
The file MyTestProject.gxar is created in the C:\<SAG_install_dir>\NaturalScreenTester\utilities\export\ direrctory.
Specify target folder only: exportapp.bat
-s localhost -p 3323 -u administrator -a InstantDemo -f
C:\<SAG_install_dir>\NaturalScreenTester\utilities\export\ -c
The file InstantDemo.gxar is created in the C:\<SAG_install_dir>\NaturalScreenTester\utilities\export\ directory
Specify file name only: exportapp.bat -s
localhost -p 3323 -u administrator -a InstantDemo -f MyTestProject -c
The file MyTestProject.gxar is created in the current local directory.
Default when the parameter is not
specified: exportapp.bat -s localhost -p 3323 -u administrator
-a InstantDemo -c
The file InstantDemo.gxar is created in the current local directory.
Export test project configuration only:
exportapp.bat -s localhost -p 3323 -u administrator -a InstantDemo -f
C:\<SAG_install_dir>\NaturalScreenTester\utilities\export\ -c
The file InstantDemo.gxar is created.
Export entities only: exportapp.bat -s
localhost -p 3323 -u administrator -a InstantDemo -f
C:\<SAG_install_dir>\NaturalScreenTester\utilities\export\ -e
The file InstantDemo.gxz is created.
Export test project configuration and
entities: exportapp.bat -s localhost -p 3323 -u administrator
-a InstantDemo -f C:\<SAG_install_dir>\NaturalScreenTester\utilities\export\ -l
The file InstantDemo.gxar is created.
To activate the Import batch file by using the command program prompt
Open a command prompt window.
Change the current directory to the <nsr_home>/Utilities directory.
Type importapp followed by your required parameters. (The minus sign and letter should precede the value to distinguish between the parameters. The order of the parameters is not significant.)
importapp.bat/sh [-a [attribute]] [-s [attribute]] [-p
[attribute]] [-o [attribute]] [-u [attribute]] [-f [attribute]] [-w
[attribute]]
Note:
To importing a complete Natural Screen Tester test project, you will
require a gxar (archive) file. This file includes the
test project configuration, Natural Screen Tester entities (as a read only <gxz> file)
and a trace file. When importing only the test project's entities, you require
the gxz file only.
Parameter | Description | Default Value |
---|---|---|
-a | Natural Screen Tester test project name [required]. | |
-s | Natural Screen Tester Server address. | localhost |
-p | Natural Screen Tester Server port. | 3323 |
-o | One of the following operations can be performed:
When not set, entities and/or configuration will be imported to an existing test project when one exists, or to a new test project when there is no existing one. |
|
-u | Natural Screen Tester user [required]. | |
-f | The path and name of the gxz/gxar file [required]. | |
-w | Natural Screen Tester user password. |
Note:
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.
importapp.bat -u Administrator -a tp2 -f c:\entities.gxz -o x
This command imports entities into the "atp2" test project (only if it exists), overriding any conflicting entities within the test project.
importapp.bat -u Administrator -a tp1 -f c:\app.gxar -o c
This command imports the host and test project configuration, from the provided gxar file as a new test project. The repository will be read-only.
importapp.bat -u Administrator -a tp1 -f c:\entities.gxar -o h
This command retains the existing host configuration, and imports the "tp1" test project (entities and configuration) from the provided gxar file, overriding any conflicting entities within the test project. The repository will be read-only.
importapp.bat -u Administrator -a tp1 -f c:\entities.gxar -o r
This command imports the host configuration, and the "tp1" test project (just the configuration) from the provided gxar file, and imports the entities into the repository, using the existing repository configuration. The repository will not be read-only.
importapp.bat -u Administrator -a tp1 -f c:\entities.gxar -o hr
This command imports the host configuration, retains the test project configuration, and imports the "tp1" test project entities from the provided gxar file to the existing repository, overriding any conflicting entities within the test project. The repository will not be read-only.