ZTEST Package

Latest changes:

  • All objects are now compatible with releases fron V7R3M0 and onwards.
  • All objects in save file are now owned by user QPGMR

This totally free package is designed to help with a few aspects of application testing. See below for details.

The free version (no more license key) that also includes package source is available from December 1st 2023.

This software package is intended to make it easier to verify the quality of software developed on the IBM i and has three functions:

  1. Test data generation
    This function prompts you for details on how you want test data for a table created. Data can be created as random text, text patterns, numeric values (in range), selected single values, calculated, derived from data in other files or with own (RPG free) code snippets. You determine how many rows (records) of data you want and the result is an RPG free form program that when run creates as much data as you want. You will have the source code so if so desired you can also change some features yourself.
  2. Scripted testing
    This is based on a couple of assumptions:
    – That you are using ACS as a 5250 emulator
    – That you download and install the TNAPI package (see link below).
    What this does is convert macros that you create using the ACS macro recorder to a script format that is required by TNAPI run script function. You will then run a function that keeps tracks of all scripts and lets you submit scripts to be run in batch! Yes that is true – You will have green screen applications running in batch. The screen log that is created by TNAPI is then stored so that you can page through the screen data for the most recent run of any script and verify the results. Finally – if you have your database journaled to a journal that you specify in the setup function you can also browse through all database updates that happened during the run of the script.
  3. Result data comparison
    This function lets you specify views over multiple versions of tables (files). Assume that you have an old and new version of some software you are working on and want to compare the output so that there are no surprizes with the data. You are prompted to specify: What values (key values) that are used to uniquely identify a row (record) in the files. The system will suggest the key fields that exist in the first uniquely keyed path that it finds. You will then be prompted to identify which columns (fields) that should have the same values in both files (when they have the same key) and also (for numeric fields) if you want the difference to by calculated automatically.

    When you have done this the following views are created:
    – A view that combines all columns (fields) from both tables (files) where the rows (records) share the specified key.
    – A view for all the rows where the key exists in file A but not in file B
    – A view for all the rows where the key exists in file B but not in file A
    – A view for all matching rows where any of the specified columns had different values between file A and B and with the difference (in absolute value and/or percent) is calculated.
    It would then make it a bit easier to verify that the output data matches expectations. Not that these views are maintained automatically when you re-run your tests and with no performance impact what so ever.

For scripted test you will also need TNAPI

The package uses this for running recorded ACS scripts in batch. This is available from the link below:

http://www.albertyork.yolasite.com/resources/TNAPI132.ZIP

Systems requirements

System release level V7R3M0 or above.

RPG compiler is required for the test data generator.
Installed IBM feature to compile embedded SQL programs is required.

Pricing – Easy: Totally free of charge

Availability

The full package file is available as a download below. Also frequently visit the PTF page for updates.

Please contact me for any questions (use form on contact page).
https://konsult.karlpersaker.se/kontakt/

Download

  • Download and save file (use button below)
  • Expand zip file (one PDF document and one SAVF save file)
  • Read document – section on install and setup
  • Load SAVF file (ZTEST.SAVF) to IBM I
  • Restore library ZTEST

If you ONLY want to check the documentation click below to download the full PDF file.