Control Flow Testing

Posted By : Nitin Kumar | 29-Sep-2017

Control Flow testing            

 

Control flow testing is a white box testing strategy that uses the control flow graph as a model.

In this type of testing, we convert the code into “control flow graph” or program graph.The graphical representation of a graph is called control flow graph in which node represents the block of the program and edges represents the transfer of flow between these blocks.Control flow testing is the type of software testing in which different paths are selected through the program and the test cases are written for executing these paths.

The control flow graph is a graph in which nodes represent the statement and edges represent the control flow of the program.


Flow graph primates:

These are some primates including in the flow graph:

1.Decision point

2.Junction

3.process block

 

1.Decision point

The decision point is the point in flow graph at which control of the program diverges.The decision point is actually implemented by if then else statement or switch statement.

 

a) If then else statement: It is the decision point where the condition is to check if it is satisfied then the graph will diverge to one side otherwise another side.

 

b) Switch: In this one condition is check and there can be multiple divergences for the result of checking that condition.

 

2.Junction: It is the joining point where control flow joins together.eg endif, and end loop etc.

 

3.Process block: It is the statement executed in a sequence without any interruption of decision or junction.


 

Test coverage criteria

 

In control flow test we defined the different level of coverage.coverage is defined as the percentage of the code which is already tested vs which is remaining to test which help in identifying the level of tested code.

 

These are the following coverages :

1.Statement coverage

2.Decision/Branch coverage

3.Condition coverage

4.Condition/Decision coverage

5.Multiple condition coverage

6.Path coverage.


 

Related Tags

About Author

Author Image
Nitin Kumar

Nitin is a QA Engineer. He is adaptive and passionate to learn new technical skills.

Request for Proposal

Name is required

Comment is required

Sending message..