Symbolic Test Driver Generation for Object-Oriented Code
Find Innovative SolutionsGenerate Solutions
Solution Overview
Problem
The complexity of modern software renders manual generation of test cases inadequate for complete testing, as it fails to effectively explore the execution paths and behaviors of object-oriented programming components, leading to potential false positives and incomplete test coverage.
Innovation Solution
An iterative method and system for generating symbolic test drivers that symbolically execute code-under-test, identifying calls to object-oriented-programming components, and creating new test drivers to fully explore these components' execution paths, thereby generating comprehensive test cases.
Engineering Contradictions & Design Principles
Engineering Contradiction Analysis
1Reliability
If manual generation of test cases is used, then ease of operation is maintained, but test coverage and reliability are insufficient due to software complexity
Solution Approach 1:
The patent replaces manual test case generation with an automated symbolic execution system. The system takes source code as input, performs symbolic execution to explore all possible execution paths, and automatically generates test cases. This substitution of mechanical manual processes with automated computational processes enables complete test coverage despite software complexity.
Solution Approach 2:
The system creates symbolic representations of the software code and executes these symbolic models to generate test cases. By working with symbolic copies of the code rather than the actual complex software system, the system can systematically explore all execution paths and generate comprehensive test cases without being overwhelmed by the software's complexity.
2Reliability
If automated testing tools are used, then test coverage is improved, but false positives increase due to inadequate exploration of object-oriented components
Solution Approach 1:
The patent segments the testing process into distinct phases: parsing the source code into an abstract syntax tree, performing symbolic execution on each node, generating test cases from execution traces, and validating results. This segmentation allows the system to handle complex object-oriented code by breaking it down into manageable components and systematically exploring each execution path.
Solution Approach 2:
The system incorporates feedback mechanisms where the symbolic execution results are used to generate test cases, which are then executed and their results fed back into the system. This feedback loop allows the system to learn from previous executions and refine its test case generation, reducing false positives by validating results against actual execution behavior.
3Reliability
If complete exploration of execution paths is performed, then test coverage is achieved, but time consumption increases
Solution Approach 1:
The system performs preliminary parsing of the source code to build an abstract syntax tree before actual symbolic execution begins. This preliminary action organizes the code structure in advance, allowing the subsequent symbolic execution to proceed more efficiently through predefined structural frameworks, thereby reducing overall testing time while maintaining complete path exploration.
Solution Approach 2:
The symbolic execution system dynamically adapts its exploration strategy based on the code structure and execution traces generated. By making the testing process dynamic rather than static, the system can optimize its search for execution paths in real-time, focusing computational resources on the most critical paths while avoiding redundant explorations, thus reducing time consumption.
Data Source
AI summary
A method includes, by one or more computing devices, determining instructions for a computing device to be evaluated, creating a first symbolic test driver including one or more of the instructions to be evaluated and a designation of a symbolic variable corresponding to a portion of the instructions, symbolically executing the instructions with respect to the symbolic variable, determining a test case from the results of the symbolic execution including one or more commands to execute the instructions with a given value for the symbolic variable, determining one or more calls to an object-oriented-programming component in the commands, creating a new symbolic test driver including the calls based on the determined calls, and subsequently symbolically executing the new symbolic test driver.


