Mainframe Unit Testing with File Stub Interception

Resolve Bottlenecks,
Find Innovative Solutions
Generate Solutions

Solution Overview

Problem

Manual unit testing in mainframe environments is time-consuming and prone to errors, leading to potential defects in code that may not be caught until later stages of testing, which can be costly to fix.

Innovation Solution

An automated system for unit testing in a mainframe execution environment, comprising a test configurator, stub setup routine, and interceptor routine, which parses test input files, creates data stubs, and interacts with application methods to simulate file system operations, thereby automating the testing process without modifying the source code.

Engineering Contradictions & Design Principles

VSEngineering Contradiction Analysis

1Extent of automation

If manual unit testing is performed, then testing can be done with simple tools, but the testing process is time-consuming and error-prone

Engineering Contradiction:
Improveautomation of unit testingVSAvoidcomplexity of testing system
Core Design Contradiction:
Extent of automationVSDevice complexity

Solution Approach 1:

The patent introduces an intermediary testing system that sits between the developer and the mainframe application. This intermediary automatically parses COBOL source code, generates test cases, and executes tests without requiring the developer to manually create test scripts. The intermediary handles the complexity of automation while presenting a simple interface to the developer.

Inventive Principle:
Principle #24Intermediary (Mediator)

Solution Approach 2:

The testing system performs self-service by automatically analyzing the COBOL source code structure, identifying testable units, generating appropriate test cases, and executing tests without continuous human intervention. The system serves itself by maintaining test databases, managing test configurations, and producing test reports autonomously.

Inventive Principle:
Principle #25Self-service

2Productivity

If unit testing is skipped to save time, then development pace increases, but defects are introduced into the code base

Engineering Contradiction:
Improvedevelopment paceVSAvoidcode quality
Core Design Contradiction:
ProductivityVSReliability

Solution Approach 1:

The patent implements preliminary action by performing unit testing automatically during the development phase, before code is deployed to production. The system analyzes source code and executes tests immediately after code changes are made, catching defects early when they are still in the development environment rather than later in the testing or production phases.

Inventive Principle:
Principle #10Preliminary action

Solution Approach 2:

The testing system provides immediate feedback to developers by automatically executing tests and reporting results. When defects are detected, the system generates detailed error reports that guide developers in fixing issues. This continuous feedback loop maintains code quality while enabling rapid development iterations.

Inventive Principle:
Principle #23Feedback

3Reliability

If comprehensive unit testing is performed manually, then code quality improves, but the testing process becomes too time-consuming

Engineering Contradiction:
Improvecode qualityVSAvoidtesting time
Core Design Contradiction:
ReliabilityVSLoss of time

Solution Approach 1:

The patent replaces the mechanical process of manual test execution with an automated computer-based system. Instead of developers manually creating and running test cases, the system automatically parses COBOL code, generates test scenarios, and executes tests using computer programs. This substitution dramatically reduces testing time while maintaining comprehensive test coverage.

Inventive Principle:
Principle #28Mechanics substitution (Replace mechanical system)

Solution Approach 2:

The testing system allows dynamic parameter changes to accommodate different testing scenarios. Test configurations, data sets, and execution parameters can be modified without reprogramming the entire testing framework. This flexibility enables comprehensive testing of various code paths and edge cases without proportionally increasing testing time.

Inventive Principle:
Principle #35Parameter changes

Data Source

PatentUS10990515B2Automated unit testing in a mainframe environment
Publication Date: 2021.04.27 BMC SOFTWARE INC
  • US10990515B2 patent drawing
  • US10990515B2 patent drawing
  • US10990515B2 patent drawing

AI summary

An automated system is presented for unit testing an application in a mainframe execution environment. The system includes a test configurator, a stub setup routine and an interceptor routine. The test configurator is configured to receive and parse a test input file, where the test input file includes a record for a particular file accessed by the application using the given type of file system. Upon reading the record, the test configurator calls the stub setup routine. The stub setup routine is associated with the given type of file system and creates an object for the particular file in the mainframe execution environment, such that the object is instantiated from a class representing the given type of file system. The interceptor routine is accessible by the application. In response to a given command issued by the application for the given type of file system, the interceptor routine operates to interact with methods provided by the object.