Branch Testing

QA Valley performs Branch Testing to ensure that each one of the possible paths from each decision point in the coded logic is executed at least once.  This confirms that all conditional logic is reachable and is executed if conditions are met.

Branch Testing, also known as Branch Coverage Testing is a type of White Box Testing technique, which validates all the branches in the code and ensures that no branching leads to abnormal behavior. The main objective of Branch Testing is to execute all the branches in the code. In Branch Testing, all the possible outcomes of each condition are covered at least once. It is equivalent to find a set of paths through the control flow graph, whose union includes all the arcs of the graph. Branch coverage relates to the decision in a program, which can branch the program execution to one of the two possible branches just like ‘True’ or ‘False’.

Branch Coverage Metrics is calculated by finding out the minimum number of paths, which will ensure coverage of all edges for calculating branch coverage. Cyclomatic Complexity for a flow graph of the program is computed after finding the number of nodes and edges of a flow graph. Nodes represent entries, exits, decisions and each statement of the program code while edges represent Non-branching and Branching links between nodes. It is important to note that 100 % Branch Coverage will imply 100 % Statement Coverage though both are different testing techniques.

During Branch Testing, QA Valley team solves issues that happen with Statement Coverage Testing.  Branch Coverage Testing differs from Statement Coverage Testing. In Branch Coverage, each branch of decision points in a program is executed at least once while Statement Coverage involves the execution of all the statements in the source code at least once. Branch Coverage is a stronger criterion than Statement Coverage as any test that satisfies Branch Coverage also satisfies Statement Coverage. However, the Branch Coverage is more expensive as it requires the generation of a large number of test cages as compared to Statement Coverage.