Integrating Broadcom Endevor and Test4z for Seamless Unit Testing

Introduction
In today's fast-paced DevOps world, integrating automated testing into CI/CD pipelines is a well-accepted best practice. However, the key to unlocking the full potential of DevOps lies in shifting left—the earlier we catch defects, the lower the cost of remediation. By embedding Broadcom Test4z within the Endevor compile processor, we achieve a seamless integration where test results are saved alongside compile listings and version history directly in Endevor.
This approach does not replace external automation tools but enhances version control and traceability by storing unit test results within the software change management process.
What is Broadcom’s Test4z?

Test4z is a powerful testing framework designed specifically for mainframe applications. It offers:
-
Automated unit and functional testing for COBOL.
-
Code coverage analysis to measure testing effectiveness.
-
Performance insights by capturing execution metrics.
-
Integration with DevOps tools like Jenkins, Zowe CLI, and VS Code.
Key Benefits of Using Test4z
-
Reduces manual testing efforts, allowing teams to focus on development.
-
Improves software reliability by catching defects early.
-
Seamless integration with Endevor, ensuring every compiled program is tested.
-
Supports multiple execution environments, including batch, DB2, and CICS.
Why Integrate Test4z into the Endevor Compile Processor?
By embedding Test4z within the Endevor compile processor, developers gain several advantages:
-
Consistent quality gates: Automated test results can determine whether a program proceeds to the next stage in the lifecycle.
-
Seamless integration: Works with ISPF QuickEdit, VS Code , Eclipse, and Zowe-based integrations without additional scripting.
How Does It Work?
Integration in the Endevor Compile Processor

Step-by-Step Process
Integrating Test4z into the Endevor compile processor ensures that unit testing is embedded within the software development lifecycle. Here’s how it works:
-
Source Code and Unit Test Modification – Before modifying the application source code, the developer updates or creates unit test cases within the Test4z test suite to validate the changes.
-
Compiling the Test Suite – The developer compiles the unit test suite first to ensure that the tests are correctly defined and can run successfully. This approach aligns with Test-Driven Development (TDD) principles, where tests are prepared before actual code modifications.
-
Compiling the Source Code – Once the test suite is compiled and ready, the developer modifies the source code and compiles it using Endevor.
-
Unit Test Execution – The Endevor processor triggers Test4z to execute the unit tests against the compiled program.
-
Test Results Stored in Endevor – The test results are stored alongside the compiled listing and version history within Endevor, ensuring full traceability.
-
Logging and Reporting – Test results are available for review within Endevor and can also be published to external CI/CD tools if needed.
Automating Test Suite Compilation
If desired, teams can configure a single Endevor processor to always compile the unit test suite first before proceeding with source code compilation. This ensures:
-
Unit tests are always up to date before any source code changes are compiled.
-
Developers follow a structured workflow that enforces test execution as an integral part of development.
-
Automated enforcement of test suite validation before any new code is compiled.
By embedding this process, teams enhance reliability, ensure compliance with best practices, and seamlessly integrate testing within mainframe development workflows.
Configuring Endevor to Use Test4z
To implement this, modify your Endevor processor to invoke Test4z after compilation:
Add this step immediately after the compilation step. Optionally, introduce a toggle parameter to disable testing when needed.

For detailed implementation steps and sample source code, refer to this GitHub repository: Broadcom Automated Test Facility Using Test4Z and watch for future updates.
Test4z Record and Replay Processing in Endevor Quick Edit
Test4z provides a record and replay feature that enhances unit testing capabilities by capturing execution data for replay in subsequent tests. This functionality can be integrated into Endevor's Quick Edit extension points, allowing developers to:
-
Record Test Cases – When modifying programs through Quick Edit, Test4z can capture execution details and store them for validation.
-
Replay Tests Automatically – Upon subsequent edits, Test4z can replay stored test cases to verify that no regressions occur.
-
Enforce Quality Gates – Developers can be required to pass recorded test cases before moving changes forward.
Configuring Quick Edit Extension Points for Test4z
Endevor's Quick Edit extension points allow seamless execution of Test4z record and replay capabilities. To integrate this:
-
Modify the Quick Edit exit points to trigger Test4z recording upon saving changes.
-
Ensure Test4z replays stored test cases before submitting changes for migration.
-
Capture execution logs and highlight discrepancies if unexpected behaviors occur.
Refer to the GitHub repository for detailed Quick Edit extension point integration: Broadcom Quick Edit Extensions for Test4Z and watch for future updates..
Controlling Test Execution with OPTIONS
All aspects of Test4z execution—including what to test, how to test, whether failures are allowed, and whether results should be published to Jenkins—are controlled using OPTIONS configurations. These options define test suites, determine whether failures should halt processing, and enable testing at different stages of the software lifecycle, such as moving to the QA environment.
Sample OPTIONS Card

-
The first line defines COBOL compiler settings.
-
The next lines specify the test suite names and whether test failures should be tolerated or block progress.
-
QA testing options ensure replay tests can be conducted before moving changes forward.
For more details on how to configure OPTIONS, refer to the CONPARMX Utility Documentation and watch for future updates..
Optional Integration with Jenkins for Test Result Publishing
If desired, teams can further enhance their CI/CD pipeline by publishing Test4z results to Jenkins. A Python script running in USS within the Endevor processor can be used to send test results directly to Jenkins for tracking and visualization. This optional integration allows seamless reporting while maintaining the benefits of Shift Left testing.
The script and implementation details are available in the GitHub repository: Broadcom Automated Test Facility Using Test4Z.
Conclusion
By embedding Test4z unit testing and record/replay functionality into the Endevor compile processor enhances traceability and version control by saving test results alongside compiled listings and source history.
Additionally, this solution integrates seamlessly with existing CI/CD pipelines, including Jenkins or other automation tools. Since testing occurs during compilation, no additional triggering mechanisms are required, making it adaptable to both mainframe-centric Endevor-only workflows and modernized DevOps pipelines.
Broadcom’s suite of tools, including Endevor, Test4z, and Code4z, offers an ideal ecosystem for modernizing mainframe DevOps. As organizations seek to improve agility, integrating testing at the compile phase and the Quick Edit process represents a powerful way to shift left further and accelerate delivery.
Next Steps
Interested in implementing this approach? Check out the following resources:
By embracing deeper integration of testing into the development lifecycle, enterprises can unlock new levels of efficiency and software quality in mainframe environments.
Chandru Rengarajan & (Dan)Joseph Walther