Automated Test Data Variant Generation via API Injection
Find Innovative SolutionsGenerate Solutions
Solution Overview
Problem
Conventional software testing methods are time-consuming and limited in scope, as they require manual generation and injection of test values, typically only stimulating a small set of code lines, and require separate scripts for each API, compromising the ability to thoroughly test software applications.
Innovation Solution
A code testing module that uses a Business Application Programming Interface (BAPI) to generate and inject multiple variants of test data, including alpha-numeric and special characters, systematically targeting various code branches, and logging results for defect analysis, thereby increasing test coverage.
Engineering Contradictions & Design Principles
Engineering Contradiction Analysis
1Loss of time
If manual test value generation is used, then testing can be performed, but the time required for generating test values is very time consuming
Solution Approach 1:
The system pre-generates multiple variants of test data (alpha-numeric, special characters, edge cases) and stores them in a repository before actual testing begins. This preliminary preparation eliminates the need for manual test value generation during testing execution, significantly reducing time loss while maintaining high productivity.
Solution Approach 2:
Instead of manually creating unique test values, the system creates templates and patterns for test data that can be automatically copied and varied. Test data generators replicate base patterns with different substitutions (numbers, letters, special characters), enabling rapid generation of numerous test cases without manual effort.
2Adaptability or versatility
If only a few lines of code are tested, then testing resources are conserved, but the scope of testing is limited
Solution Approach 1:
The testing system segments code into functional modules and test groups, allowing selective execution of different test suites. This segmentation enables comprehensive coverage of multiple code lines by organizing tests into manageable units that can be executed systematically, expanding scope without overwhelming system complexity.
Solution Approach 2:
The test data generator serves multiple functions: it generates test data for different data types (alpha-numeric, special characters, edge cases), supports multiple testing scenarios, and can be applied across various code modules. This multi-functionality expands testing scope while consolidating resources rather than increasing complexity.
3Ease of operation
If separate scripts are created for each API, then each API can be tested individually, but the process becomes very time consuming
Solution Approach 1:
A single universal test data generator is designed to work with multiple APIs through a common interface. The generator accepts API-specific parameters and configurations but uses the same core generation engine and data patterns, eliminating the need for separate scripts for each API while maintaining the ability to test them individually.
Solution Approach 2:
The testing system uses parameterized test configurations where the same test script can adapt to different APIs by changing parameters such as data types, validation rules, and expected outcomes. This parameterization allows individualized API testing without requiring separate scripts, significantly reducing script creation and maintenance time.
Data Source
AI summary
A method and system including a display; at least one application programming interface (API) including one or more parameters, wherein the API communicates with a code of a system under test; a code testing module including a multiple variant generation and handling module; and a code testing processor in communication with the code testing module and operative to execute processor-executable process steps to cause the system to: receive data identifying the API; display one or more parameters associated with the API; generate, with the multiple variant generation and handling module, one or more variants based on values associated with the one or more parameters; receive the one or more generated variants at a variant injector; inject the one or more generated variants into the code via the API; and execute the code with the one or more injected generated variants. Numerous other aspects are provided.


