Abstract
Search-based Software Test Data Generation is a field of research
treating test input generation as a search problem. Search algorithms
require that an objective function computes the quality of solution candidates. When the goal for testing is to achieve code coverage, one
type of objective function uses branch distance, a heuristic describing how “close” the condition in a control flow statement is from being true.
An attempt is made to define procedures to allow the calculation
of branch distance for both predicates in conjunction and disjunction
predicates with short-circuiting operators && and ||, by identifying
and avoiding situations causing side effects and exceptions.
This thesis also attempts to give examples of instrumenting and
transforming control flow statements, examples which are limited or
lacking in the research literature.
A program implementing the defined rules for instrumentation and transformation of control flow statements was developed to validate these rules.