Test Scenarios helps you to define and automate the validation of your modernized application. AWS Transform for mainframe refactor provides a three-step workflow to go from source code analysis to fully automated test execution:
Instead of manually creating each test scenario, you can automatically generate them from your workpackages. The generation process analyzes the structure of a selected workpackage and creates one test scenario per sub-workpackage, preserving the hierarchy. Datasets (VSAM, PS, GDG, PDS, Control Cards, DB2 tables) are automatically detected.
⚠️ Before generating test scenarios, make sure you have workpackages created, which are used for defining the scope of test scenarios being generated. We also strongly recommend to run two prerequisite analyses on your codebase.
- Start by running Application Entrypoints— this identifies the entry points of your codebase (JCL jobs, CICS transactions, DB2 stored procedures, COBOL/PL1/RPG programs, etc.) and labels them accordingly.
- Then, run Application Features (optional, but strongly recommended), providing the entrypoints label and a parent workpackage. This creates workpackages corresponding to the standalone sets of assets reachable from each entrypoint, effectively splitting your codebase into testable application units. These generated workpackages are what the test scenario generation uses as input — one test scenario is created per sub-workpackage.

NOTE: If the selected workpackage contains a large number of sub-workpackages, a confirmation dialog will appear before proceeding.
Dataset direction is determined from the dependency analysis:
For each sub-workpackage, the generation process::
Example of scheduled-based path detection


You can then edit the recognized datasets and directions based on your project knowledge.
Generated test scenarios are assigned a type based on their workpackage content:
When a workpackage contains scheduler tasks (CA7, Control-M), the generation process analyzes the scheduler dependency graph to detect linear execution paths. Each linear path becomes a separate test scenario containing the ordered sequence of JCL jobs.
Data capture scripts are JCL scripts that extract test scenario data from your mainframe environment. They are generated from JCL templates that you provide — these templates define how data is extracted for each dataset type (VSAM REPRO, DB2 unload, sequential file copy, etc.). The generation process combines JCL templates with the datasets detected in your test scenarios, applying variable substitution and loop expansion to produce ready-to-run JCLs.
The generation optimizes the number of JCLs by combining all extraction commands per dataset type into a single JCL, rather than producing one JCL per dataset.
Once capture scripts have been generated, you can download them for the selected test scenarios. The download produces a ZIP archive containing the JCL scripts organized by test scenario and dataset type.
⚠️ The JCL templates provide flexibility to adapt to each mainframe installation utilities and practices for extracting data, transferring data, and sanitizing data. The default JCL templates are provided as-is. Users can add, modify, and remove steps in the templates as they see fit for conforming to their mainframe standards and best practices. It is the users responsibility to review, edit and check the relevance of the templates to match their mainframe application requirements before running them in their mainframe environment.
JCL templates support variable substitution using <<variable-name>> syntax. Reserved variables include:
<<job-name>>: The generated job name. <<test-case-name>>: The test scenario name. <<dataset-name>>: The dataset name being processed. <<dataset-direction>>: The dataset direction (IN, OUT, IN_OUT). <<dataset-direction-folder>>: The direction folder name (before, after).<<dataset-type>>: The dataset type (VSAM, FLAT, GDG, etc.). <<dataset-type-folder>>: The type folder name. <<loop-datasets-start>> / <<loop-datasets-end>>: Loop markers to repeat a JCL section for each dataset. <<loop-index>>: The current loop iteration index. <<loop-index-X>>: The current loop iteration index, zero-padded to X digits (where X is a number from 1 to 10). Useful for generating fixed-width identifiers in JCL step names or job names.<<loop-index-6>> produces 000001, 000002, etc. Replay scripts are a self-contained test automation bundle that can fully replay and validate a test scenario end-to-end against a running modernized application. The generation process automatically produces file format definitions and comparison configuration files (BACMP) adapted to each test scenario, so that datasets can be compared with limited manual setup.
Once replay scripts have been generated, you can download them for the selected test scenarios. The download produces a ZIP archive containing the replay scripts.
IMPORTANT: In order to successfully generate read-to-use fileformats definitions and comparison configuration files (BACMP) automatically, ensure that you have previously performed a Compatiblity analysis on your codebase (optional, but highly recommended).
The generated replay scripts bundle contains:
outputs/
├── common/ # Shared resources for all test cases
│ ├── config/
│ │ └── default.env # Default environment configuration
│ ├── lib/ # Shell libraries (logging, error handling, AWS utils, validation)
│ ├── scripts/ # Execution scripts (init, run_job, compare_output, data_migrator)
│ ├── working-dir/ # Groovy scripts deployed to the server (bluesam-load, bluesam-unload)
│ └── run_test_cases.sh # Main entry point
├── test_cases/
│ └── <TestCaseName>/ # One folder per test case
│ ├── test_case.json # Test case definition (jobs, timeouts)
│ ├── test_plan.json # Full test case metadata
│ ├── config.env # Test-case-specific configuration overrides
│ ├── before/ # Input datasets (to load before job execution)
│ │ ├── flat/ # Sequential/PDS datasets
│ │ ├── vsam/ # VSAM datasets
│ │ ├── gdg/ # GDG datasets
│ │ ├── controlcard/ # Control cards
│ │ └── db/ # Database datasets
│ ├── after/ # Expected output datasets (for comparison)
│ │ └── (same structure as before/)
│ ├── compare/ # Comparison configuration
│ │ ├── binary.bacmp # Binary comparison descriptor (if binary datasets exist)
│ │ ├── database.bacmp # Database comparison descriptor (if DB datasets exist)
│ │ └── data/binary/fileformat/ # File format definitions for binary comparison
│ ├── before.ini # Database init config (if DB datasets exist)
│ └── after.ini # Database expected state config (if DB datasets exist)
└── test_plan.json # Overall test plan with generation statuscommon/tools from the Refactor Toolboxcommon/config/default.env with your environment settings:S3_BASE_BUCKET: S3 bucket containing test data. HOST_URL: URL of the running modernized application.SERVER_WORKING_DIR_PATH: Application working directory path.SERVER_SCRIPTS_PATH: Location of server groovy scripts (must match the -Dconfiguration.scripts JVM parameter). ./run_test_cases.sh "<test case name>" For detailed execution instructions, see common/README.md
IMPORTANT: The mainframe modernized application must be deployed, configured, and running on the target server before executing test cases. The application should be accessible via HTTP endpoints for job execution. To deploy your modernized application locally in a short time, you can rely on the "Bundle" action of the Transformation Center, it will generate a pre-configured standard Docker architecture, containing all necessary artifacts (application, database, working directory).
The replay script execution follows three phases:
Phase 1 — Initialize Test Environment
1. Download test case data from S3.
2. Clean the application working directory.
3. Deploy groovy scripts to the server and reload them (POST /reloadscripts).
4. Copy "before" datasets (flat, VSAM, GDG) to the application working directory.
5. Load VSAM data into the application (POST /script/data-load).
6. If database datasets exist: run Data Migrator with before.ini to load initial database state.
Phase 2 — Execute Jobs
1. Execute each job sequentially via HTTP (POST /script/{JOB_NAME}).
2. Each job reads/writes the application working directory and database.
3. Per-job timeout and retry settings are defined in test_case.json. By default, each job is allowed up to 3 retries with a 5-minute (300s) timeout per attempt
Phase 3 — Compare Outputs
1. If compare/binary.bacmp exists: collect actual output files from the working directory, compare against expected files from `after/` using the Compare Tool.
2. If compare/database.bacmp exists: run Data Migrator with after.ini to load expected database state, then compare "before" and "after" database schemas using the Compare Tool.
3. Upload comparison results to S3.
Comparison type is driven by file presence — if binary.bacmp exists, binary comparison runs; if database.bacmp exists, database comparison runs. No configuration flags are needed.
You can define Test Scenarios for your project, update them and track both their status and results. Test Scenarios can be viewed as a list, per type (Online, Transaction, Batch, Other) or per Results.

A test scenario has different information:
All these details can be edited using the Selection Properties that automatically appear when one or many scenarios are selected. It is also possible to import (using Excel files) a list of Test Scenarios with all their related attributes.
Test Scenarios can also be linked to Jira and/or Jenkins to respectively track issues status and/or Jobs.
| Data store | Automated Test Scenarios | Capture scripts | Replay scripts |
| PS | Yes | Yes | Yes |
| VSAM | Yes | Yes | Yes |
| GDG | Yes | Yes | Yes |
| Control Cards | Yes | Yes | N/A |
| PDS | Yes | Yes | N/A |
| DB2 | Yes | Yes | No |
| IMS DB | Only detection, direction needs manual input | Yes | No |
| Platform | Supported features |
| IBM Mainframe (z/OS) | Schedulers: Control-M, CA7 CICS: transactions, files, datasets IMS DB / TM (IMS Stage 1) DB2 tables Files: PS, GDG, VSAM (KSDS, ESDS, RRDS) |
| GS21 | Files: PS, GDG |