PathFinder - An Intelligent Algorithm for MCDC Test-Path Generation (1)
PathFinder - An Intelligent Algorithm for MCDC Test-Path Generation (1)
Informatics Institute
PathFinder
An Intelligent Algorithm for MCDC Test-Path Generation
Advisor Name: ALTAN KOÇYİĞİT
(METU)
January 2024
TECHNICAL REPORT
METU/II-TR-2024
Orta Doğu Teknik Üniversitesi
Enformatik Enstitüsü
Ocak 2024
TEKNİK RAPOR
ODTÜ/II-TR-2024-
i
REPORT DOCUMENTATION PAGE
7. SUPPLEMENTARY NOTES
8. ABSTRACT
Introducing Pathfinder, an innovative automated tool designed for generating comprehensive test cases in the
realm of C language source codes. The primary objective is to fulfill Modified Condition/Decision Coverage
(MC/DC) criteria, and Pathfinder follows a meticulously crafted methodology. The process unfolds in
structured phases, commencing with source code parsing, advancing to the creation of a Control Flow Graph
(CFG), and culminating in the systematic generation of test paths along with the determination of potential
expected results.
Python, a widely used language known for its parsing capabilities and robust libraries, equips Pathfinder to
tackle the inherent challenges presented by the intricacies of C language syntax. The project's emphasis on
safety-critical industries, such as automotive and aerospace, aligns with the prevalent use of C in these
sectors. The report provides a comprehensive exploration of each phase, from foundational source code
parsing to the crucial role of identifying expected results in software testing.
Pathfinder's implementation encounters challenges, duly acknowledged and addressed in the report. These
include complexities inherent in C language, parsing intricacies, scalability concerns with large codebases,
and performance limitations of Python.
The report concludes with a forward-looking perspective on Pathfinder's future evolution. Envisaged
enhancements involve broadening language feature support, incorporating external function analysis for
more accurate predictions, and exploring the integration of machine learning algorithms. These strides aim
to position Pathfinder as a versatile and refined tool adept at addressing the dynamic landscape of software
development and testing practices.
9. SUBJECT TERMS 10. NUMBER OF PAGES
Software Testing, MC/DC Coverage, Control Flow Graph, Test-Path
36
ii
TABLE OF CONTENT
iii
4.1 Parse Source Code ................................................................................................. 15
4.2. Create Control Flow Graph ................................................................................... 17
4.3 Identify Decisions and Conditions ......................................................................... 19
4.4 Generate Test Paths................................................................................................ 20
4.5. Find Expected Results........................................................................................... 22
4.6. Summary Of Pathfinder Process ........................................................................... 24
4.7. Challenges of Pathfinder ....................................................................................... 25
CONCLUSION AND FUTURE WORK ........................................................................ 26
References ........................................................................................................................ 28
iv
LIST OF FIGURES
v
LIST OF ABBREVIATIONS
vi
CHAPTER 1
CHAP
INTRODUCTION
1.1 Motivation
Testing code for correctness and reliability is among the important tasks of software
engineers. However, it can be challenging a time consuming to achieve Modified
Condition/Decision Coverage (MC/DC) standards for testers. Selecting test parameters
and expected values that fulfill the MC/DC criteria is usually a tedious and error-prone
process, leading to significant resource consumption.
In order to address this challenge, there is a need to create an algorithm that can automate
the process of finding test parameters and expected values that satisfy MC/DC coverage.
Automating this process will allow to reduce the time and resources required for testing
significantly while increasing the effectiveness and reliability of the test suites at the same
time.
An algorithm that can automate this process is sought by many software test engineers
and could be a valuable tool, allowing them to achieve their testing goals quickly and
efficiently. With this, software testing engineers will be able to focus their attention on the
more important aspects of software development while relying on automation to handle
the tedious and time-consuming tasks associated with software testing.
1
tool could greatly improve the efficiency and effectiveness of software testing, thereby
enabling software engineers to deliver high-quality software to their customers.
Ensuring the correctness and reliability of code through rigorous testing is a fundamental
aspect of software engineering. However, attaining compliance with Modified
Condition/Decision Coverage (MC/DC) standards for test coverage presents a daunting
and time-intensive endeavor. The meticulous selection of test parameters and expected
values that align with MC/DC criteria often proves laborious and prone to errors, resulting
in substantial resource consumption.
An algorithm with the capability to automate this intricate process stands to become an
invaluable tool for software engineers, providing them with the means to swiftly and
effectively achieve their testing objectives. Such an advancement would empower
software engineers to concentrate on the pivotal aspects of software development,
relegating the mundane and repetitive tasks associated with testing to the realm of
automation.
1.2 Objectives
2
• Evaluating the effectiveness of the proposed solution by comparing it with existing
MC/DC coverage techniques.
• Determining the effectiveness of the proposed solution in achieving the desired
MC/DC coverage.
1.3 Scope
The project mainly concentrates on Boolean expressions as its primary focus with a
specific emphasis on programs written in the C language. It will leverage a blend of data
analysis, software development, and testing methodologies to accomplish its set
objectives. The algorithm's design will prioritize platform independence, ensuring its
applicability across a diverse spectrum of software systems.
1.4 Methodology
This project proposes a method to automatically determine test parameters and correct
outputs to achieve MC/DC coverage. The steps of the method depicted in Figure 1 are as
follows:
1. Parsing the source code to identify the conditions and decisions: The first step is
to identify all the conditions and decisions within the code. Conditions refer to the
logical expressions that are evaluated to be either true or false, while decisions are
the points in the code where the program chooses between two or more paths based
on a condition.
2. Constructing the control flow graph: The second step is to construct the control
flow graph (CFG) for the code. The CFG is a graphical representation of the
program's control flow, showing all the paths that the program can take.
3. Path exploration: The next step is to explore all possible paths in the CFG. This
involves generating and solving constraints that satisfy each condition and
decision in the program.
4. Test data generation: In this step, the algorithm generates test data that satisfies the
MC/DC criteria. This involves selecting input values that satisfy the constraints
generated in the previous step and cover all possible paths in the program.
5. Test data optimization: In the final step, the generated test data is optimized using
boundary-value analysis. This involves selecting input values that lie on the
boundaries of the input domain and are more likely to cause errors.
3
Figure 1 The Outline of PathFinder
In summary, Chapter 1 serves as the foundation for our investigation into automated
test parameters and expected value generation for achieving Modified
Condition/Decision Coverage (MC/DC) in software testing. Focused on the
challenges of manual parameter selection, the chapter articulates project objectives
centered on enhancing MC/DC analysis efficiency and effectiveness. The later
chapters will delve into the background information, including metrics like Statement
Coverage, Decision Coverage, and MC/DC, paving the way for a thorough exploration
of related work in Chapter 3. Positioned within the broader academic landscape, this
analysis identifies gaps in our innovative approach. Chapter 4 introduces the proposed
solution, detailing the algorithm's intricacies, and Chapter 5 concludes the study,
summarizing findings and insights derived from the exploration of MC/DC coverage
and automated test generation solutions.
4
CHAPTER 2
BACKGROUND INFORMATION
This chapter provides background information regarding essential concepts and metrics
integral to software testing methodologies. By delving into the definitions and intricacies
of key metrics such as Statement Coverage, Decision Coverage, Modified
Condition/Decision Coverage (MC/DC), Control Flow Graphs (CFGs), and Abstract
Syntax Trees (ASTs), we lay the groundwork for a comprehensive understanding of the
testing landscape.
2.1 Definitions
Statement coverage is a basic metric that is often used to evaluate the effectiveness of
test suites. A high statement coverage indicates that a test suite has exercised a large
portion of the program code, making it more likely to have uncovered potential
defects. However, statement coverage is not a perfect predictor of fault detection, as
it does not consider the logical flow of the program.
5
Decision coverage is an important metric for software testing because it ensures that
each decision in the program has been exercised, which helps to identify potential
defects that may occur due to incorrect logic or data handling. It is a more stringent
measure than statement coverage, which only requires that each statement in the
program be executed at least once.
A recent study by Chen, Zhou, and Zhang (2018) found that decision coverage is a
more effective measure of fault detection than statement coverage. The study
evaluated the fault detection effectiveness of decision coverage and statement
coverage in a corpus of Java projects. The results showed that decision coverage was
able to detect more faults than statement coverage.
2.1.3 MC/DC
MC/DC addresses this limitation by demanding that each condition or decision point
be exercised under both its true and false outcomes. This comprehensive approach
ensures that the program's logical flow is adequately tested, significantly increasing
the likelihood of detecting faults that might otherwise go unnoticed.
6
each condition or decision is exercised under all possible combinations of true and
false outcomes, providing a more rigorous assessment of the program's logic.
The effectiveness of MC/DC in fault detection stems from its ability to uncover faults
that lie in the program's decision-making processes. These faults can occur due to
errors in condition evaluation or incorrect handling of different outcomes.
By exercising each condition or decision under both true and false outcomes, MC/DC
increases the likelihood of triggering these faults, allowing them to be identified and
addressed during the testing phase. This proactive approach prevents faults from
propagating to subsequent stages of software development, reducing the risk of costly
and potentially disastrous errors in the final product.
A Control Flow Graph (CFG) serves as a visual depiction encapsulating all potential
pathways that a program may traverse during its execution. This directed graph
systematically illustrates the program's control flow, where individual nodes
correspond to basic blocks, and edges signify the transition of control between these
blocks. Basic blocks, within the CFG context, denote sequences of instructions
executed sequentially without any jumps or targeted transfers. The directed edges
capture control flow jumps within the program. Notably, the CFG designates two
distinct blocks: the entry block, facilitating the initiation of control into the flow graph,
and the exit block, signifying the point where all control flow exits. This graphical
representation is indispensable for numerous compiler optimizations and static-
analysis tools, providing a comprehensive overview of a program's control dynamics
(Koppel, 2020).
An Abstract Syntax Tree (AST) functions as a tree-shaped data structure that mirrors
the abstract syntactic arrangement of source code composed in a programming
language. It meticulously captures the hierarchical composition of the program and its
7
syntax, although it does not encapsulate semantic nuances. Within the AST, nodes
correspond to language constructs such as expressions, statements, and declarations,
while edges symbolize the interconnections between these constructs. This structural
representation proves instrumental in numerous software development tools, including
compilers, interpreters, static analyzers, and refactoring tools, as it facilitates a
comprehensive understanding and manipulation of the program's syntactic
organization without delving into its semantic intricacies (Liang, 2022).
8
CHAPTER 3
RELATED WORKS
In this chapter, we explore the existing body of knowledge and research that serves as the
foundation for our work. We looked for the previously proposed solutions and found out
the justification of our project. It is important to have a thorough understanding of the
current state of the field in order to properly appreciate and put into context the
advancements presented in this study. We delve into previous research and key findings
that have helped shape and develop the subject matter over time. By critically examining
relevant literature, we aim to identify gaps, challenges, and opportunities that motivate
and guide the novel contributions presented in our work. This comprehensive review
serves as a roadmap for readers, offering insights into the broader academic landscape and
positioning our research within the larger context of ongoing scholarly discussions.
The method proposed in this paper is a technique for validating object-oriented software
at the design phase by achieving MC/DC (Modified Condition/Decision Coverage). The
method consists of the following steps:
• Constructing a UML activity diagram for the given system using ArgoUML, a tool
that supports various UML diagrams.
• Generating XML code from the UML activity diagram using ArgoUML’s export
function.
• Converting the XML code to XSD (XML Schema Definition) code, which is a
more precise and readable representation of the XML elements.
• Generating a skeletal Java code from the XSD code using JAXB (Java
Architecture for XML Binding), a tool that provides methods for binding XML
schema and Java objects.
• Customizing the Java code according to the syntax of jCUTE, a tool that performs
concolic testing, which combines concrete and symbolic execution to generate test
cases.
• Applying jCUTE to the Java code to obtain test cases that cover all possible paths
and outcomes of the program.
• Calculating MC/DC percentage from the test cases and the Java code using
COPECA (COverage Percentage Calculator), an in-house developed tool that uses
9
an Extended Truth Table to find independent conditions and a formula to compute
the coverage score.
The paper suggests a hybrid software verification technique that combines symbolic
execution and concrete execution to generate test cases that aim to maximize code
coverage. They have achieved 56.31% MC/DC coverage in their experiment. This
solution is dependent on UML diagrams generated by third-party tools which may not be
available for software engineers who work for automotive or aerospace industries.
3.2 MCDC-Star A White-Box Based Automated Test Generation For High MC/DC
Coverage (Wong, 2018 ):
This paper proposes a white-box-based automated test case generation technique for
achieving high modified condition/decision coverage (MC/DC) criterion using greedy-
based symbolic execution.
The downside of their method is that it might change the program’s behavior, which limits
its practicality. This is because they use code transformation-based symbolic execution
techniques to generate test cases for achieving MC/DC. Code transformation is a process
of modifying the source code of a program to make it easier to analyze or test. However,
this process can introduce errors or alter the semantics of the original program, which can
10
affect the validity of the test results. Therefore, their method is not suitable for testing
programs that have strict requirements on correctness and reliability.
3.3 Automatic Test Data Generation For Unit Testing To Achieve Mc/Dc Criterion
(Tianyong Wu, 2014 ):
This method generates test data for MC/DC, a complex coverage criterion that considers
the logical expressions in the branch statements of a program. This solution relies on third-
party tools to create test paths.
The effectiveness of the greedy strategy is evaluated in the experiments, and the results
show that the greedy strategy can improve the efficiency and cost of the test data
generation process.
3.4 An Automated Tool for MC/DC Test Data Generation (Ariful Haque, 2014):
The objective of this paper is to design and implement an automated tool for MC/DC test
data generation, called MC/DC GEN. The tool takes a Boolean expression as input and
produces a set of test cases that satisfy the MC/DC criterion. The tool uses a local search
11
algorithm to find all possible MC/DC pairs for each predicate in the expression and then
removes the redundant pairs to generate the final test data. The tool also compares the
effectiveness of MC/DC with a pairwise testing technique using a case study.
• MC/DC Gen is a web-based tool that can automatically generate test data for
structural testing based on the Modified Condition/Decision Coverage (MC/DC)
criterion.
• MC/DC Gen is developed using PHP programming language and hosted in a
Linux-based Virtual Private Server.
• MC/DC Gen consists of five main components: input processing and analysis,
generating a list of solutions, MC/DC pairs with predicates, generating the final
test data, and case study.
• Input processing and analysis: The user inputs the Boolean expression of the
predicate to be tested according to the MC/DC Gen standard notation. The tool
separates the predicates, operators, and grouping notation from the expression and
keeps a pointer to match them correctly.
• Generating a list of solutions: The tool starts with a local search to find all possible
solutions for the separated predicates. It randomly chooses an initial solution and
computes its result. It then seeks for a neighbor solution that differs only by the
value of one predicate but gives a different result for the expression. This is called
an MC/DC pair and is stored in an array. The search continues until all the
predicates are searched completely.
• MC/DC pairs with predicates: The tool populates a table with predicates in
columns and a list of identified MC/DC pairs for each predicate in rows. This
representation gives an overall view of the identified solutions.
• Generating the final test data: The tool removes the duplication test data from the
previous step and generates the actual MC/DC pairs from the combination of pairs.
In this section, we draw comparisons between Pathfinder, our automated test case
generation tool, and the existing works discussed in Chapter 3. Each tool contributes to
12
the realm of achieving Modified Condition/Decision Coverage (MC/DC) in software
testing, but distinctive features and methodologies set them apart.
3.5.3 Automatic Test Data Generation for Unit Testing (Tianyong Wu, 2014):
Similarities:
3.5.4 Automated Tool for MC/DC Test Data Generation (Ariful Haque, 2014):
Similarities:
• Both tools are designed to generate test data for achieving MC/DC coverage.
• Both emphasize automated processes in test data generation.
Differences:
In summary, while all the discussed tools, including Pathfinder, share the common goal
of achieving MC/DC coverage, the differences in their target languages, methodologies,
and underlying techniques highlight the unique contributions of each tool. Pathfinder
stands out for its tailored approach to C language source codes and its comprehensive,
automated process from source code parsing to expected result generation.
14
CHAPTER 4
PATHFINDER
In this section, we explain the details of PathFinder, our tool designed to automate the
generation of comprehensive test cases for C language source codes, with a particular
focus on fulfilling the Modified Condition/Decision Coverage (MC/DC) criteria. The
methodology unfolds in a series of well-defined steps, each explained within dedicated
sections. Beginning with the foundational step of parsing the source code (Section 4.1),
we progress through the creation of a Control Flow Graph (CFG) (Section 4.2), the
identification of decisions and conditions (Section 4.3), and the systematic generation of
test paths (Section 4.4). The significance of finding expected results in software testing is
explored in Section 4.5, underscoring its crucial role. A comprehensive summary of the
entire PathFinder process is presented in Section 4.6, highlighting the interconnected
modules that collectively enhance the efficiency and effectiveness of software testing.
However, before delving into these detailed steps, we acknowledge and address the
challenges encountered during the implementation of PathFinder in Section 4.7.
We chose the C programming language because C is one of the most used programming
languages in safety-critical industries such as automotive and aerospace. Many embedded
systems and firmware in these domains are written in C. Hence, this project directly
addresses the testing needs of a significant portion of safety-critical applications.
Moreover, several safety-critical systems have legacy codebases written in C. By
supporting C, our project caters to the need for compatibility with existing systems.
Moreover, industry standards often prescribe the use of C in safety-critical software
development, reinforcing the relevance of our tool in such environments.
15
Parsing is essential for the extraction of decision structures, conditions, and related
information, crucial elements for fulfilling the MC/DC criteria in test case generation. For
the parsing algorithm a sample code, ParseSource, is given in Figure 3.
The ParseSource class assumes a central role within PathFinder by specializing in the
critical task of parsing C code into a structured representation. Its primary responsibility
lies in extracting information from the Abstract Syntax Tree (AST), a fundamental data
structure that captures the hierarchical structure of the parsed code. The class performs
this operation through its core method, parse(), which parses the C source code and
populates the AST with relevant details. By focusing on the extraction of decision
structures, conditions, and other essential elements, the ParseSource class transforms raw
C code into an interpretable structured representation.
The sample code given in Figure 3, starts with import statements and includes the
following methods:
16
• get_control_structures(): Extracts all control structures (if, while, for) from the
AST.
Creating a Control Flow Graph (CFG) is important for several reasons. A CFG provides
a visual representation of the flow of control within the code. This is valuable for
understanding the overall structure of the program, including loops, conditions, and
branching.
MC/DC coverage requires identifying conditions and decisions in the code. The CFG
makes it easier to pinpoint these elements, aiding in the creation of test cases that cover
all possible combinations.
MC/DC coverage mandates thorough testing of conditions and decisions in the code. The
CFG serves as a powerful tool for achieving this coverage by making it easier to pinpoint
these elements. Test cases derived from CFG analysis can systematically cover different
paths, ensuring that all possible combinations of conditions are exercised.
CFG aids in identifying and visualizing potential paths through the code, enabling testers
to analyze and verify the correctness of the program's logic. It also facilitates the detection
of unreachable or redundant code, contributing to code quality and maintainability.
The code excerpt given in Figure 4, ControlFlowGraph, illustrates the CFG generation
algorithm. The ControlFlowGraph class assumes a pivotal role in PathFinder by standing
for a control flow graph (CFG) of the source code. The primary responsibility of this class
is to visually capture and articulate the flow of control within the code. Achieved through
the build_graph() method, the CFG serves as a graphical representation, elucidating the
program's overall structure, encompassing loops, conditions, and branching.
17
Figure 4 ControlFlowGraph Class - CFG Generation Algorithm
The excerpt code given in Figure 4, includes the following methods that build a
comprehensive CFG representation, aiding in the generation of exhaustive test suites that
adhere to MC/DC criteria:
• build_graph(): Builds the CFG by creating nodes and edges based on the
provided statements, conditions, and control structures.
• add_node(): Adds a node to the CFG with the given statement.
• get_graph(): Returns the CFG representation as a tuple of (nodes, edges)
• find_successors(): Returns a list of node IDs that are directly reachable from the
given node.
• find_predecessors(): Finds the predecessor nodes that can directly reach a given
node.
18
• find_entry_points(): Identifies nodes without any incoming edges (potential
starting points).
• find_exit_points(): Identifies nodes without any outgoing edges (potential ending
points).
Identifying and thoroughly testing decision points and conditions within the source code
is a crucial responsibility of PathFinder, facilitated by the functionalities within the
Identify Decisions and Conditions phase. This phase serves as a bridge between the
parsing capabilities of the ParseSource class and the graphical representation provided by
the ControlFlowGraph class.
The identification and parsing of branches contribute to the creation of a map of possible
execution paths, enabling the PathFinder to cover all conceivable scenarios and ensuring
the reliability and robustness of safety-critical applications in the face of diverse
operational conditions.
The primary responsibility in this phase is to identify decision points (branches) within
the Control Flow Graph (CFG). The class definition given in Figure 5, DecisionIdentifier,
ensures that decision points and conditions are accurately identified and analyzed. The
systematic traversal of paths and parsing of branches contribute to the creation of a
detailed understanding of the program's decision-making structures.
19
Figure 5 DecisionIdentifie Class - Decision Identifying Algorithm
The core of the PathFinder tool lies in its ability to systematically generate test paths that
fulfill the MC/DC criteria. Once the decision points and conditions are identified through
the ControlFlowGraph and DecisionIdentifier phases, the Generate Test Paths phase takes
center stage. This phase is responsible for exploring and generating all possible test paths
within the Control Flow Graph (CFG) to ensure comprehensive coverage.
21
and decision-point analysis, the algorithm navigates through the Control Flow Graph
(CFG), producing diverse test paths that comprehensively cover the program's logical
flow. The satisfaction of MC/DC coverage criteria is rigorously checked, ensuring that
each decision point and condition undergoes thorough testing.
Any disparities between actual results and expected outcomes indicate potential defects
or issues in the software.
Especially, in the absence of formal requirements, finding expected results during testing
becomes a critical navigational tool for software testers. Without predefined
specifications, the process of determining expected outcomes involves a careful
examination of the software's behavior under various inputs and scenarios. The act of
finding expected results in such scenarios aids in uncovering defects.
22
Figure 7 ExpectedResultGenerator Class: Expected Result Algorithm
In essence, the "Find Expected Result" section plays a pivotal role in enhancing the depth
and accuracy of software testing. Through systematic analysis and calculation, it ensures
that the expected results align with the specified coverage criteria, providing software
23
engineers with valuable insights into the performance and reliability of their code under
diverse scenarios.
The test automation process within the PathFinder comprises several interconnected
modules, each playing a distinct role in enhancing the efficiency and effectiveness of
software testing. From the initial parsing of the source code to the systematic generation
of expected results, the process unfolds in a structured manner.
The journey begins with the Parse Source Code module (4.1), where the C language source
code is analyzed to extract decision structures, conditions, and related information. This
parsed information forms the foundation for subsequent analysis.
Following this, the Create Control Flow Graph module (4.2) steps in to construct a visual
representation of the program's control flow. The Control Flow Graph (CFG) serves as a
roadmap for identifying conditions, decisions, and potential paths, laying the groundwork
for comprehensive test coverage.
In the Identify Decisions and Conditions phase (4.3), the tool systematically identifies
decision points and conditions within the CFG, creating a map of possible execution paths.
This critical step facilitates a detailed understanding of the program's decision-making
structures.
The Generate Test Paths module (4.4) takes center stage as it dynamically explores the
CFG, systematically generating diverse test paths that adhere to the Modified
Condition/Decision Coverage (MC/DC) criteria. Through recursive depth-first search, the
algorithm ensures comprehensive coverage of decision points and conditions.
Transitioning to the Find Expected Result section (4.5), the tool calculates and generates
expected results for each test path. This process involves both the systematic calculation
of outcomes for individual paths and the holistic generation of expected results for the
entire set of test paths.
In summary, the summarized test automation process encapsulates the journey from
code parsing to the generation of expected outcomes. This organized approach improves
the effectiveness of software testing, offering a strong structure for identifying problems,
confirming accuracy, and guaranteeing the dependability of software in various
situations. The interconnected nature of these modules contributes to the overall
effectiveness of the PathFinder in empowering software engineers to deliver high-
quality, reliable software products.
24
4.7. Challenges of Pathfinder
• Complexity of C Language:
• Parsing Challenges:
25
CHAPTER 5
Pathfinder's foundation lies in its ability to parse C language source codes, extract decision
structures, and systematically generate test paths that adhere to MC/DC criteria.
Leveraging Python's parsing capabilities and powerful libraries, the tool aims to reduce
manual effort and enhance the efficiency of test case generation.
The creation of a CFG provides a visual representation of the code's control flow, aiding
in the identification of decision points and conditions crucial for MC/DC coverage. The
systematic generation of test paths, facilitated by the TestPathGenerator, ensures thorough
coverage of decision points and conditions. Additionally, the identification and parsing of
branches, as handled by the DecisionIdentifier, contribute to the creation of a detailed map
of possible execution paths.
The Find Expected Results module plays a pivotal role in software testing, systematically
generating expected outcomes for each test path. This process is crucial in evaluating the
correctness and reliability of the code under diverse scenarios.
As Pathfinder evolves, several avenues for future enhancements emerge to augment its
capabilities and address potential limitations. Looking ahead, Pathfinder's future work
involves enhancing support for more C language features, including complex expressions,
function calls, and arrays. Additionally, external function analysis is proposed to analyze
calls and potential impacts on variable values, contributing to more accurate result
prediction. The integration of machine learning models is also considered, aiming to
improve prediction accuracy and handle more complex code constructs.
26
External Function Analysis:
To harness the power of predictive modeling and further refine its test case generation,
Pathfinder could explore the integration of machine learning models. By leveraging
machine learning algorithms trained on extensive datasets of program behavior,
Pathfinder might enhance its prediction accuracy. This integration could prove especially
beneficial when handling intricate code constructs and adapting to diverse programming
styles. The utilization of machine learning could contribute to a more intelligent and
adaptive test case generation process.
The envisioned future work for Pathfinder revolves around expanding its language
feature support, delving into external function analysis for more precise predictions, and
exploring the integration of machine learning models to enhance overall accuracy and
adaptability. These potential advancements aim to position Pathfinder as a more
versatile and sophisticated tool, catering to the evolving landscape of software
development and testing practices.
27
REFERENCES
I. K. Ariful Haque, "An Automated Tool for MC/DC Test Data Generation," in
Proceedings of the Australian Software Engineering Conference, pp. 152-157,
2014.
Linghuan Hu, W. Eric Wong, D. Richard Kuhn, Raghu Kacker, "MCDC-Star: A White-
Box Based Automated Test Generation for High MC/DC Coverage", 2018 5th
International Conference on Dependable Systems and Their Applications (DSA),
pp.102-112, 2018.
R. Liang, "AstBERT: Enabling Language Model for Code Understanding with Abstract,"
in Proceedings of the Fourth Workshop on Financial Technology and Natural
Language Processing, 2022, pp. 70-77.
S. Hallé, "Test Suite Generation for Boolean Conditions with Equivalence Class
Partitioning," 2022 IEEE/ACM 10th International Conference on Formal Methods
in Software Engineering (FormaliSE), Pittsburgh, PA, USA, 2022, pp. 23-33, doi:
10.1145/3524482.3527659.
28
S. Kangoye, A. Todoskoff, and M. Barreau, "Practical methods for automatic MC/DC test
case generation of Boolean expressions," 2015 IEEE AUTOTESTCON, National
Harbor, MD, USA, 2015, pp. 203-212, doi: 10.1109/AUTEST.2015.7356490.
T. Wu, J. Yan, "Automatic Test Data Generation for Unit Testing to Achieve MC/DC
Criterion," in Eighth International Conference on Software Security and
Reliability, pp. 118-126, 2014.
29