Skip to content

Defining Test Steps

A testing pipeline is made up of individual steps. In MDTest, a step is represented by a Test Definition.

Manage Test Definition Categories

In MDOpen, navigate to MDTest->MDTest Definition Categories Maintenance of Categories requires authority to MDSEC Code 93

A category is a 10-character identifier of your choosing to help in organizing and filter the list of Test Definitions. Click Add to add a new MDTest Definition Category or click on the category name to edit it.

Field Description
Category A 10 character ID of your choice to better organize the list of Definitions
Description A suitable description of the category
Row Option Description
Copy Add a new Test Definition Category based on values of an existing element
Delete Delete a Category - only permitted if not used on any definitions
Rename Rename a Category
MDTest Definitions List all definitions for a Category

Manage Test Definitions

In MDOpen, navigate to MDTest->MDTest Definitions Maintenance of Definitions requires authority to MDSEC Code 93

A Test Definition is a single, executable step that is submitted to batch and processed by the MDTest framework. Each execution of a Definition will be tracked and reported as a Job. A sequence of one or more MDTest Definitions combined into an Automated Testing Template make up a MDTest Pipeline.

Click Add to add a new MDTest Definition or click on the Description to edit it.

Field Description
Description A suitable description of the definition
Category A 10 character ID for organizing the Definitions. Use content-assist to select from list of Categories
Step Type Command, Manual or SQL Statement. More information below
Timeout in Seconds Define a maximum wait time (in seconds) for the step to complete before considered failed and to abort the step
Step Action The command string or SQL Statement. Use content-assist to append an MDCMS or Level Wildcard to the string. Step Action is not applicable for manual steps. Use Content-Assist to append a wildcard (MD, Custom Level or Custom Field wildcard) to the Action string. At run-time, MDTest will replace the wildcard with the value based on the target level for level wildcards or the first object request in the RFP that triggered the MDTest automated test.
Row Option Description
Copy Add a new Test Definition based on values of an existing definition
Delete Delete a Test Definition - the definition will also be deleted from any Automated Testing Templates
MDTest Jobs List all executions of this definition
Manually Run MDTest Definition Execute the definition manually. Requires MDSEC Code 94. More Details below
Templates using Definition List the Automated Testing Templates that use the MDTest Definition

Command Step Type

A Command Step Type expects a command in the Step Action parameter. Generally, commands do not need to be qualified with a library name, unless they do not reside in the library list for the job description of the target promotion level. The command will run from within a batch job that exists only for the duration of this command.

Example of using the MDTransform Data copy command to refresh test data:

 MDCPYDATA TEMP(TESTSETUP) SBM(*NO) JOBS(3)        

Example of calling a test program with custom wildcard values:

 CALL PGM(MYTSTPGM) PARM(('##MINCOD##' (*CHAR 5)) ('##MAXCOD##' (*CHAR 5)))        

Manual Step Type

A manual step is a process that will occur outside of MDTest, such as an interactive process. Once the manual process is complete, a user can click the thumbs-up icon if it passed or thumbs-down icon if it failed. The user and decision will be logged to the step's job as well as the Automated Template batch. The thumb icons will appear in the Test Batches or MDTest Jobs lists for an entry that is waiting for a decision. If a decision isn't granted before the timeout for the step is reached, it will be considered to have failed.

SQL Statement Step Type

An SQL Statement Step Type expects a Db2 SQL statement in the Step Action parameter. This is typically used to insert, update or delete records in a table. The statement will run from within a batch job that exists only for the duration of this statement execution. Generally, SQL statements do not need to be qualified with a library name, unless the target entity doesn't reside in the library list for the job description of the target promotion level.

Example of SQL Statement with a custom wildcard:

 UPDATE MDACUR SET VALCHF = ++BASRAT++        

Manually Run MDTest Definition

If a Test Definition should be run manually, to test the definition or to test a target process before/after installing, use option Manually Run MDTest Definition for the selected definition. If the option doesn't appear, then you don't have authority to MDSEC Code 94.

After selecting the option, you will be prompted with a confirmation panel.

Field Description
Appl The application code of a Promotion Level for determining the job description to use for the library list, job queue, etc. Use content-assist to select from a list
Level The Promotion Level number for determining the job description to use for the library list, job queue, etc. Use content-assist to select from a list
Additional Library for top of Libl The name of a library that should be positioned above all other libraries in the library list. Useful when unit testing a program currently checked out to a developer library
Use Additional Library True = the library will be added to the library list. False = the library will be not be added to the library list
Delay Job Start in Seconds The number of seconds the submitted job should wait before beginning processing. This can be useful for starting a service job in order to debug. The job info is visible from the MDTest Jobs view which is automatically displayed once the Confirm button is pressed.