Path Testing & Graph

what is Path Testing? It is a way or a method of testing to ensure that all the lines in the program is executed once at least. There is Program Graphs, Decision-to-Decision (DD) Paths, Test Coverage with Program Graphs and DD-Path Graphs

Today we will talk about the programming graph and how to draw a good programming graph, we need to know that the graph is made of nodes and arrows, the nodes and the circles are that will form our graph. These nodes and arrows are connected to each other either in or out and presenting what each line in the program means. Then need to follow each line in the program, reading each line ad writing notes, marking the for loops, the if statements and the while-do loops. after we marked each line then we start to put our first drawing nodes and connecting arrows.

We always put number one in the first node and the first node has only an out arrow, since its the start of the program, then step by step drawing the rest of the nodes until the end if the program, I know that seams very confusing but lets try to make a programming graph with this example.

The programming graph for this small program will be as below:

we can notes that line 5 is a while loop, and line 6 is an if statement and that’s why both of these lines have two out arrows presenting the conditions.

Leave a Reply

Fill in your details below or click an icon to log in: Logo

You are commenting using your account. Log Out /  Change )

Google photo

You are commenting using your Google account. Log Out /  Change )

Twitter picture

You are commenting using your Twitter account. Log Out /  Change )

Facebook photo

You are commenting using your Facebook account. Log Out /  Change )

Connecting to %s