Table of Contents Previous Next PDF


Appendix II - Sample: TMDEMO

Appendix II - Sample: TMDEMO
A sample called TMDEMO is provided with the ART Test Manager. It’s a small mainframe application that contains CICS, IMS, and Batch components. The step-by-step tutorial below is intended to help users get familiar with all the key functions of the ART Test Manager based on this sample.
Application Description
TMDEMO application is a combination of a simple banking application using IMS online transactions and a batch program coupled with a set of CICS screens for maintaining customer contact information. The online transactions and batch jobs in this sample that map to CICS, IMS, and Batch test cases. Some test cases load data from file into database; others update or delete data in database. This sample can show you some basic operations about TM.
Databases and Files
The test cases in this sample access some files and Oracle database migrated from IMS DB.
Application Components
CICS Components
There are six CICS programs in this demo.
 
Table 14‑1 CICS Programs
IMS Components
There are seven IMS test units in TMDEMO, six IMS MPP online transactions and one cases and one BMP program. Their functions are listed in following table.
 
Batch Components
There are three Batch jobs in the sample. All the batch jobs run COBOL programs to insert or update data in database or to generate a report file from the database.
 
Table 14‑3 Batch Jobs
Migrating and Deploying TMDEMO Using ART Workbench
Before the application can be tested with the ART Test Manager, it must be migrated from the mainframe version using Tuxedo ART Workbench so that it can run in Tuxedo ART environment. The following briefly explains how to use the eclipse plug-in to execute the ART Workbench migration life-cycle. For more information refer to Tuxedo ART Workbench User Guide.
1.
2.
3.
4.
5.
6.
 
When all Types have been correctly selected click “Select All” button to change “Process” column value of all the directories to “YES”, and then click “Finish”. This will set up the Workbench configuration appropriately for each of the directories.
7.
8.
Select “ART Workbench -> Global-> SQL” and input “PJ01DB2” into “Default SQL Schema” text to specify the schema name, then click “Apply->OK” finish this step.
9.
10.
11.
a.
b.
After all the parameters are configured, click “Finish”.
12.
To verify that build processes finished successfully, check the “Console” for any ERROR level messages or use “Tracking” view to check the “Compiled” column value under “Code summary” tab. It should show 100% results for CICS, IMS, and Batch programs. Value for JCL will be blank as JCL is not compiled.
13.
14.
15.
Specify the Data Source Files as shown in the following table:
 
Table 14‑5 Data Source File
Input the deploy target location, and click “Finish”. To verify that file conversion and reload were successful check the log in “Console” view or open “Tracking” view and check status in Reloaded column under “Data summary” tab.
16.
 
Table 14‑6 DB2 Data File
Click “Finish” to perform data transcoding and reload Oracle table. To verify that database reload finished successfully check the log in “Console” view, which should contain the messages as shown in the figure below.
The TMDEMO application has been migrated, configured, built, and deployed and its data dependencies have been similarly converted and reloaded. It is ready to run and can be tested using ART Test Manager as described in the next section of this tutorial.
Setting Up ART Test Manager Project
Once ART Test Manager has been installed and configured, start Tomcat as described in 2.2.2 Configuring and Starting ART Test Manager. Specify hostname:port/arttm URL in a web browser address bar to get to the login page, enter username “admin” and admin’s password as specified during ART Test Manager installation, and click Login button. Once logged in, proceed with the next steps as admin user or use the pull down menu under admin in the upper right corner to enter User Management and create a new, regular user. Continue the tutorial with the steps below.
To create an ART Test Manager project, click the “Create project” button in Context Path Bar and enter the required information.
If Workbench APPDIR is not on the same machine where ART Test Manger is installed and running, check “Remote Project” check-box and provide required machine and connection information as shown in the figure below.
After you provide necessary information, and click “Create” button, a new project would be created. ART Test Manger will automatically scan the deployment APPDIR and create default test groups including all the discovered test cases. These groups are always named “BATCH_RT” for BATCH cases, “CICS_RT” for CICS cases and “IMS_RT” for IMS cases. For “Batch_RT”, the batch test cases represent the jobs found under JCL directory. For “CICS_RT”, the CICS 3270 test cases represent the transactions listed in the configuration file transactions.desc and the CICS DPL test cases represent the DPL programs listed in the configuration file programs.desc. For “IMS_RT”, the IMS MPP and BMP test cases represent the online and batch programs listed in the configuration files imstran.desc and imsapp.desc.
After creating the TMDEMO project, click on the project in the left navigation tree to open the project context consisting of the three test groups in the main operations pane. Notice the Case Count column shows the number of test cases in each group – these are the cases automatically discovered and imported from the APPDIR when the project was created.
Configuring Test Environment
Once the project is created in ART Test Manager, the test environment has been configured.
Testing CICS 3270 Screens
As described in the User Guide, to test CICS 3270 screen, first run the transactions against the mainframe and capture the baseline using tn3270 recorder.
Capturing and Uploading Baseline
Follow the guidelines in Appendix I of this User Guide on how to configure and use the TN3270 Recorder. Afterwards, upload the captured baseline “.tgz” files using the “Upload” dialog of each CICS 3270 test case as shown in the figure below.
Executing Test Cases and Comparing Results
After uploading the baseline select one or more CICS 3270 test cases and click the “Run” button to execute selected cases.
The “Status” column indicates if the test case has failed or passed. For detailed result click the icon in the “Result” column to see any detailed differences if they exist.
For RSSBT00 case, the difference is on one field located at row 1 column 70 of the second screen. The mainframe value “08-03-17” doesn’t match ART value “24-03-17”. This is in fact a date field that contains the current execution date. It is normal for this field to not match unless the baseline from the mainframe execution was done on the same date and ART execution. Check the check-box to the left of the field and click “Add to filter file” button to filter this field from the any future comparison. Once this case is re-run, the will be no other differences identified in the datastream and the case will pass.
Testing IMS 3270 Screens
To run IMS cases perform the following steps to finish preparing the IMS environment before starting the Tuxedo domain for IMS MPP and BMP regions.
1.
2.
3.
export USER_GNT_PATH=<TMDEMO Directory>/ims_prepare/sourceprogram
export $coblib=${USER_GNT_PATH}:${!coblib}
This completes the prerequisites for running TMDEMO IMS test cases.
Capturing and Uploading Baseline
As in CICS 3270 cases, before running IMS MPP cases prepare and upload the baseline from mainframe execution. In IMS group context displaying all IMS test cases, click the “Configuration” column icon for BANKCLNT case. In this Configuration dialog, click “tn3270rcd” tab and specify the required values in the “Mainframe Host Name” and “Mainframe Host Port” fields. Click “Test Connection” button to verify the connection. Once connection has been verified, click “Start tn3270rcd” button to start the recorder and note the hostname:gwPort in tn3270rcd’s message.
Start a tn3270 terminal emulator session and connect to hostname:gwPort specified in tn3270rcd’s message. Navigate to the IMS BANKCLNT application, press PA1 to start recorder, and perform normal sequence of interactions with the application. When finished, press PA1 to end the recorder and save the datastream baseline.
Back in ART Test Manager, click “Kill tn3270rcd” and “Collect Baseline” buttons to terminate the recorder and upload the baseline for the BANKCLNT test case.
Executing Test Cases and Comparing Results
To run the IMS MPP case, check BANKCLNT and click the “Run” button. The uploaded baseline will be used to drive the interaction with BANKCLNT transaction in ART IMS environment. Click the Result column icon to check the execution results, starting with the execution log displayed under “Console” tab, which should look similar to the log sample in the figure below.
Click “Screen Diff” tab to check the data stream comparison. Under “Diffs” tab the two fields with differences are indicated as shown in the figure below.
The two fields contain timestamp values, which would most likely be different between the captured mainframe baseline and ART IMS execution. To filter these fields out of any future comparison, select them using checkboxes to the left and click “Add to filter file”.
Click on the “Screens” tab to check the side-by-side screen views.
Testing Batch Jobs
There are three jobs in the sample and they appear as three batch test cases in BATHC_RT group as shown in the figure below.
Executing Test Cases and Comparing Results
To execute a test case, first click “Startup Domain”. Once the domain is up select the jobs to test using checkboxes on the left and click “Run” button to launch them. The output will be displayed in the console view below.
Return Code Comparison
The default result checking for batch test cases is to check the return code of the job. For a native JCL job, the return code 0 is taken as test passed; any other value means it failed. For a KSH job, C000 return code is taken as passed, any other value means it failed.
Setting Up and Using File Compare
File compare option is used to compare files in ART Batch with datasets on mainframe after the job has been executed. When this option is enabled and FTP connection has been set up and verified, ART Test Manager will submit the job on the mainframe and download the referenced data from mainframe to Linux. After transcoding and reloading data, files will be compared.
In order to ensure the job runs successfully on the mainframe verify that all the PROCs and programs referenced by the job can be found on the mainframe, that all required datasets are available, and that the state of the database is as expected by the job.
File compare option is disabled by default. This option can be enabled in the Batch configuration dialog. Click “Config” button on the group panel to access the configuration dialog.
Choose “Enable File Comparison” and input the mainframe information including host name, ftp port, user name and password. Try ftp connection by clicking “Test FTP Connection” button. Then click “Save” button.
After configuration select and “Run” this test case then click result icon to view results. In the results dialog click “File Compare” tab to check the result of file comparison.
The left pane lists the file referenced by the job. Click the file to see any differences from the comparison.
Setting Up and Using DB Compare
When batch test cases update the database, DB compare option can be used to compare DB operations between mainframe execution of the job updating DB2 and ART execution updating Oracle Database. This also involved submitting the job on the mainframe using FTP connection, so it also requires the mainframe environment to be set up correctly in order to be able to run the job.
DB compare option is disabled by default but it can be enabled by the configuration dialog for Batch group. Click “Config” button on the group panel. (Refer to Configure Mainframe Connection for the dialog details.) Select “Enable DB Operation Comparison”, and input the mainframe information including host name, ftp port, user name and password, then test ftp connection by clicking “Test FTP Connection” button. Then input DB2 information including DB2 home, DB2 name, DB2 port, DB2 user name and password and test DB2 connection with “Test DB2 Connection” button. When both FTP and DB2 connections are successful, click “Save” button to save the configuration.
After configuration select LODCUST batch case and click “Run” button to execute it. After execution click Result column icon to open the results dialog and click “DB Compare” tab to see the comparison of DB operations between DB2 on the mainframe and Oracle Database.
As illustrated in the figure above, the INS (ert) operations are shown in the left pane. Clicking on any of them shows the BEFORE and AFTER values in the table for both Oracle and DB2, which in these case match 100%.
Using Dashboard
Click “Dashboard” button on the project, group, or test plan panel to see case execution report of the TMDEMO project. Total/passed/failed number and passed/failed percentages will be listed in table format for each case type.
Use the filter search boxes on the top of the table to filter the dashboard to a required subset based on group name, test plan name, or test case types.
Using Audit Trail
Click “Audit” in the drop down menu in upper right corner to see and audit report of all operations performed on project TMDEMO. Starting and ending timestamp, userid, action, target object, action details, status, and if failed, reason for failure will be shown in the table.
Filters above the table can be used to restrict the audit report to specific date/time range, actions, or users.
 

Copyright © 1994, 2017, Oracle and/or its affiliates. All rights reserved.