Search-based Software Test Data Generation is a ﬁeld of researchtreating test input generation as a search problem. Search algorithmsrequire that an objective function computes the quality of solution candidates. When the goal for testing is to achieve code coverage, onetype of objective function uses branch distance, a heuristic describing how “close” the condition in a control ﬂow statement is from being true.
An attempt is made to deﬁne procedures to allow the calculationof branch distance for both predicates in conjunction and disjunctionpredicates with short-circuiting operators && and ||, by identifyingand avoiding situations causing side effects and exceptions.
This thesis also attempts to give examples of instrumenting andtransforming control ﬂow statements, examples which are limited orlacking in the research literature.
A program implementing the deﬁned rules for instrumentation and transformation of control ﬂow statements was developed to validate these rules.