Use the Record Data window to record CICS test case data with
optional Db2 calls and import it into the Test Case Editor.
Before you begin
To create/modify a test case that uses the Dynamic Test
Runner, you must
define the CICS region for running the test data collector, specify configuration options for the
test replay runner in the Preferences, and set property group options in the
property group that is associated with the source program for which you are generating the test
case. Then, use the Create/modify Test Case action to create and edit the
test case.
To define recorder URLs in the CICS Recording Service preference page, open
the Preferences window, and then navigate to . On the preference page, you can add URLs for both the Dynamic Test
Runner (BZUPLAY) and
the test runner (AZUTSTRN) recording service. For CICS or Db2 COBOL data recording and importing,
select a Dynamic Test
Runner recording service URL. For more information about configuring recording services, see Preferences for the Dynamic Test Runner.
For more information about setting preferences and property group options for the Dynamic Test
Runner, see Preference and property group settings forDynamic Test Runner.
About this task
You can use the Dynamic Test
Runner to generate
test cases for COBOL CICS programs with optional Db2 calls. For PL/I source programs, test cases are
generated using the AZUTSTRN test runner even if you set to use the Dynamic Test
Runner on the
preferences page. Ensure that the IBM® Developer for z/OS® version on the
host side is 14.2.1 or later, or you might encounter an error when doing this.
Procedure
To record and import CICS and Db2 data into the Test Case Editor
by using the Record Data window:
-
Open the Test Case Editor on a COBOL program that contains
EXEC
CICS
or EXEC SQL
statements.
For more information about opening the
Test Case Editor, see
Creating/modifying a test case. While recording test case data, the
Test Case Editor must remain open. If the editor is closed, a warning message
window opens and the recording is canceled immediately.
-
To open the Record Data window, click the
Record Data button on the main toolbar.
The Record data for test case
window opens.
-
Version 14.2.2 and later:
You can limit the recording to specific transactions by using the
Transaction to include and
Transactions to exclude fields:
- Transactions to include: Transactions that match the filter are recorded.
Transaction names can include the * or ? wildcard character and must be 4 characters or less.
Separate multiple patterns with a space.
- Transactions to exclude: Transactions that match the filter are not
recorded. Transaction names can include the * or ? wildcard character and must be 4 characters or
less. Separate multiple patterns with a space.
The values you enter are saved for the next time you run the recorder. Transaction names are
not validated. If no transactions are found to match the filter, recording stops.
-
In the Recording Service URL field, type or select a URL for the
recording service.
To record and import CICS or Db2 data, select a Dynamic Test
Runner recording
service URL.
-
Click Start recording.
-
For local source programs: If you initiated the
Create/Modify Test Case action on a local resource, you must connect to a
remote system to store the playback file. Select a remote connection from the Connection
name list and then click Connect.
A request to initialize and start the recording operation is sent to the recording
service. The recorder provides REST APIs, such as
recInit,
recStart, and
recStop, for managing recording and retrieving
recorded data. If an error occurs in the initialize and start recording operation, an error message
that includes an API name shows in the status line of the window. See
BZUP: z/OS Dynamic Test Runner collector messages for more information about error messages.
-
Operate the CICS or Db2 application manually, outside of ZUnit, such as in an IBM Personal
Communications session.
The data is captured through the recorder.
-
When you have completed the operations you want to record, click Stop
recording on the
Record data for test case
window.
The Filter Record Data window opens.
-
Select the task numbers you want to import into the Test Entry Editor and
then click Import Selections.
- If you want to import all tasks into the editor, click Import
All.
- To cancel the import operation, click Cancel Import.
The Export Playback File window opens.
-
Specify a sequential data set name for exporting the playback file and click Save
and continue. You can export to an existing file or create a file:
The playback file is stored in a sequential data set. The default data set name is
<HLQ>.ZUNIT.PB.programName. In this file name, <HLQ>
is replaced by your user ID and programName is the name of the program on which
you opened the Test Case Editor, that is, the program under test. You can
specify a different data set name on the CICS Recording Service preference
page.
Results
The recorded data is imported into the Test Case Editor. A message
window opens and lists the test entries that are created by importing the data. If an error occurs
in the stop recording operation, an error message might be shown in the status line of the
window.
What to do next
You can use the Test Case Editor to edit the data and generate the
test case program. For more information about using the Test Case Editor, see
the related topics.