Table of Contents Previous Next PDF


Test Batch Application

Test Batch Application
This topic contains the following sections:
ART Test Manager can be used to test rehosted mainframe batch jobs running on Tuxedo ART for Batch. Each batch job is treated as an independent test case but these can be combined and ordered into a desired sequence in a test plan. Before doing any testing, an ART Test Manager project needs to be created as described in the previous chapters. After the project is created all available batch jobs are identified by scanning the associated APPDIR. Once the project has been created and associated with an APPDIR on a test machine, the scan is performed automatically and all identified batch test cases are added into a default test group named as BATCH_RT. A Batch test case can be executed in this default group or a new group with custom name created manually, or in a test plan, which is created in a group. The user interface of a Batch group is shown below.
Clicking on the navigator on the left side will expand the tree menu and show the project, group, test plan and case names. Detailed information and operation buttons are available on the top and right side of the main panel.
Batch Execution Environment
Batch cases are executed in a Batch system (TuxJES) in a Tuxedo domain. Each Batch group has an independent Batch system in a Tuxedo domain. Before executing a case, the Tuxedo domain should be booted up. Once started, the domain is available until it is shutdown.
Start/Shutdown Batch Domain
To start/shutdown Batch system in a Tuxedo domain, enter a test group of Batch type, and then click “Startup Domain” or “Shutdown Domain”. “Domain up”, “Domain up (partial)”, or “Domain down” status will be indicated on the right side of the panel. The detailed startup or shutdown process and related messages can be viewed in the Console area at the bottom of the main operations panel.
If the status indicates the domain is up only partially, examine the messages in the Console area to determine which servers failed to start and whether they will impact your test cases. If they do, examine Tuxedo ULOG messages (click Result button for the group in the Project view) and related logs to determine the cause. Once the underlying issue has been resolved, shutdown the domain and start it up again.
Monitor Batch Domain
Click “Monitor Domain” to open the Batch Domain Monitoring screen and view the detailed information on the running Initiators and Job Metric information by JES classes.
The “Job Metrics” tab shows number of jobs in various JES phases by JES class as shown in the figure below.
This provides basic monitoring of batch system and jobs within the ART Test Manager. For more advanced monitoring Tuxedo System and Application Monitor Plus (TSAM Plus) provides additional capabilities, including real-time and historical performance monitoring, execution detailed tracing, SLA alerting, and much more. Additionally, ART batch provides batch monitoring in ISPF through ARTISPF extensions to uni-SPF.
Cleanup Tuxedo Domain with Batch System and Purge Jobs
To apply domain configuration changes, such as the ubbconfig change, a cleanup operation is needed before re-starting the domain, e.g., deleting tuxconfig and TLOG generated in the setup phase. Click the “Cleanup Domain” button to have ART Test Manager perform the cleanup tasks. If the domain is up, first shut it down before clicking “Cleanup Domain” since these operations aren’t allowed while the domain is up.
Click the “Purge” button of a Batch group to have all the test cases submitted to this domain purged after a confirmation. This action will remove all the case execution records, such as logs, job information in the TuxJES control tables, etc. Use this function with caution as once removed, this information is not recoverable.
Upload Customized Scripts
ART Test Manager provides built-in extension framework that can run user-provided pre- and post-execution scripts or executables as well results checking script. These optional custom scripts are supported for Batch group/plan/case.
Additionally, batch jobs may refer to environment variables as part of their execution. Env file can be provided for each test case which sets environment variables with values relevant to each case.
Note:
Clicking the “Upload” button on group/test plan/case panel will open the upload dialog where you can specify and upload these custom scripts/files. All of these customized scripts are optional, not mandatory.
Configure Batch Test Case
ART Test Manager provides the optional capability to compare batch job execution in ART environment with a baseline execution on the mainframe. This is accomplished by submitting the job on the mainframe after it completes execution on ART using FTP, and downloading results for comparison. To use this functionality, additional configurations are required. When using this feature, ensure that FTP access to the mainframe is available, identify the mainframe user credentials authorized to connect and submit jobs via FTP, and ensure the execution environment on the mainframe is valid, and that the state of the database and any input files matches that in ART environment.
When file comparison is enabled, ART Test Manager will attempt to download and transcode the data files identified in the job’s JCL by DD statements so they can be compared with the files generated by the job running in ART for Batch. To ensure the download and transcoding work, the following conditions must be met:
Configure Mainframe Connection
Click the “Config” button on the group panel to enter the mainframe configuration information. The configuration dialog shown below will be displayed.
If any of the comparison is enabled, the required configuration is displayed as below.
Enter mainframe FTP information and user credentials to enable submitting the job on the mainframe and downloading the results, including logs and data files. Click “Test FTP Connection” to ensure ART Test Manager can connect using the information provided. If this fails, please resolve the reason for failure as this function cannot work until FTP connectivity is available.
Select the “Enable DB Operation Comparison” to compare DB changes on the mainframe and in ART environment after both jobs have completed. After entering the required DB2 information for the database used by the mainframe job, click “Test DB2 Connection” button to have ART Test Manager attempt to connect. If the connection test fails, review the reason for failure and correct it. Ensure that the DB2 user entered has appropriate DB2 permission grants to access the database objects used by the job.
Select "Enable DB Full Table Comparison" to compare all related tables on the mainframe and ART environment after both jobs completed.
Select “Enable File Comparison” to have ART Test Manager download, transcode, and compare files from the mainframe with the ones produced by the Batch job in ART.
These configurations can be saved to profile with given names by clicking the button "Save As Profile". The saved profiles can be deleted or loaded as current configuration by clicking "Load&Delete Profile".
In the "Step RC Comparison" tab, Step RC Comparison can be enabled or disabled.
After making all the required selections, entering the relevant information, and getting successful results from Test FTP Connection and Test DB2 Connection, click on the “Save” button in the lower right corner to save the mainframe configuration. This configuration is only effective for the current group.
Execute Test Case and Check Results
Before executing a test case, ensure the domain is up for the test group. Choose groups/plans/cases by clicking the associated checkboxes, and click the “Run” button. Execution output will be displayed in the console on the bottom half of the screen. After case execution, ART Test Manager provides built-in result checking in three aspects, which are described below.
Return Code Checking
Return code checking is the default result checking for batch test cases in ART Test Manager. For Native-JCL cases, return code 0 makes the case pass, or the case fails. For KSH cases, return code C000 makes the case pass. If the mainframe FTP connection is not defined and file comparison and/or DB operation comparison are not selected, this is the only built-in checking that’s available in ART Test Manager, except for the custom Result Checking script that can be provided by the user.
Step RC Checking
Step RC Checking is performed when it is enabled (refer to Configure Mainframe Connection). Step RCs is compared with those on the mainframe. If Step RC Checking is enabled, Return Code Checking will not be performed.
The result is shown in the test case result dialog, which can be opened by clicking the icon in the Result column for the relevant case. Click the "Step RC Compare" tab to show the following information.
File Comparison
File comparison will be performed if it is enabled (refer to Configure Mainframe Connection).
You can make some customized configurations for each case in the configuration panel shown as below. When file comparison for this group is enabled, the File Comparison Configuration is available.
If Run on mainframe is not checked, the job is not submitted on the mainframe.
If Edit file list is checked, the job referenced files are listed in the table. The Download Enable, Compare Enable, and Text File options can be configured for each file. If Download is not enabled, the file comparison uses the files downloaded from the mainframe last time.
The result is shown in the test case result dialog, which can be opened by clicking the icon in the Result column for the relevant case. Clicking the “File Compare” tab will show the following information in two panes. Left pane lists the files referenced by the batch job. Click a file in the list, and details of any differences will be shown on the right. For files with text-only content the differences will be displayed directly. For binary files or files with mixed text and binary content, the location of the differences will be indicated. If there are no differences or differences are acceptable, click the “Accept” button in this page, which will mark the case as Passed.
DB Update Comparison
DB update comparison is processed if it is enabled (refer to Configure Mainframe Connection). The result is shown in the case result dialog, which can be opened by clicking the icon in the Result column for the relevant case. Click the “DB Operation Compare” tab to open a two pane view. The left pane shows all the DB tables and operations performed in the job. Click the DB operation on the left and relevant details will be shown in the right pane if there’s any difference. If the difference is acceptable, click the “Accept” button in this screen to mark the test case as “Passed”. Check Only show difference checkbox to filter out consistent operations.
DB Full Table Comparison
DB full table comparison will be performed if it is enabled (refer to Configure Mainframe Connection).
You can make some customized configurations for each case in the configuration panel shown as below. When DB full table comparison for this group is enabled, the DB Table Comparison Configuration is available.
If Run on mainframe is not checked, the job is not submitted on the mainframe. The DB full table comparison is done based on the tables downloaded from the mainframe last time.
The Download Enable and Compare Enable options can be configured for each table. If Download is not enabled, the table comparison uses the tables downloaded from the mainframe last time.
The result is shown in the test case result dialog, which can be opened by clicking the icon in the Result column for the relevant case. Clicking the "DB Table Compare" tab will show the following information. If there are no differences or differences are acceptable, click the "Accept" button in this page, which will mark the case as Passed.
Examining Logs and Traces
Logs and traces can be examined in the test case result dialog. Switch to the “Log” tab to display the job log. Server trace can also be displayed when clicking the “Server Trace” tab. This shows JESTRACE information as described in the ART Batch User Guide.
 

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