software testing genius

Tutorial-8 Understanding the Basics of Graph Matrix Based Software Testing

Welcome to “Software Testing Genius”. Subscribe to my RSS feed for latest content on Software Testing.

Tutorial-8: Understanding the Basics of Graph Matrix Based Software Testing

In graph matrix based testing, we convert Our flow graph into a square matrix with one row and one column for every node in the graph. If the size of graph increases, it becomes difficult to do path tracing manually.

Objective of the Tutorial: To trace all links of the Flow Graph at least once, draw a Square Matrix from it & find out the cyclomatic complexity, V(G) and hence the independent paths.

Process of constructing the Square Matrix leading to computation of Cyclomatic Complexity goes like this:

Step 1: Start from the following basic Flow Graph as an example of an input

face="Verdana, Arial, Helvetica, sans-serif">Step 2: Construct its corresponding Square Matrix

Step 3: Let us consider another Flow Graph as an example

Step 4: Construct its corresponding Square Matrix

It may be noted that if there are several links between two nodes then " + " sign denotes a parallel link.

This is, however, not very useful. Hence we assign a weight to each entry of the graph matrix.

We use '1' to denote that the edge is present and '0' to indicate its absence. Such a matrix is known as a connection matrix.

For above figure connection matrix can be shown as under.

Step 5:
Compute it's V(G) & draw the matrix again for the same

i.e., we sum each row of the above matrix. Then, we subtract "1" from each row. We, then, add this result or column of result and add "1" to it.

This gives us V(G).

For above matrix we get V(G) = 2.

Many more Articles & Tutorials on White Box Testing

Largest Database of Sample Papers - 1000+ Unique Questions for ISTQB Foundation Exam

ISTQB Foundation Exam - Full Crash Course for Download

ISTQB Advanced CTAL Test Analysts Exam - Full Crash Course for Download

ISTQB Advanced CTAL Test Manager Exam - Full Crash Course for Download

What Successful Testers say about the Quality of this website

If you want to keep track of further articles on Software Testing,
I suggest you to subscribe my
RSS feed

You can also Subscribe by E-mail
and get All New articles delivered directly to your Inbox.

Get your Absolutely Free Copy of Several MS PowerPoint Presentations & E-Books related to ISTQB, HP Load Runner, IBM RFT, HP QTP & QC Certification Exams, prepared by Popular Writers & Trainers, by writing to:

Full Study Material for Popular Certification Exams:

Study Material - HP QTP & QC Certification Exam

Study Material - IBM RFT Certification Exam

Study Material - HP LoadRunner Certification Exams for All Modules

Study Material - ISTQB Certification Exam

Most Popular Topics in Demand:

Practical Roadmap to QTP Certification

Practical Roadmap to CSTE Certification

Consolidated Study Material - Testing & QA

Rehearsal of QTP in 1 Hr. -  Interview Questions


Comments :


# 1 freaky_ss on 2011-08-27 15:06:01
how will u calculate v(g) from second graph matrix. there are two entries for the cell having row no. 2 and column no. 1.

According to me the v(g) for its corresponding flow graph is 4.

# 2 Ben MUDING-A-TSHILONG on 2012-03-19 13:49:02
How do I use graph 8 software to make graph

Leave Your Comments: (*) Marked Fields are Mandatory

You can apply basic formatting to the text

Name *
Email Address *
Speak your mind
sex hikayeleri