Graph Matrix in Software Testing
Graph Matrix in Software Testing
software testing
Week 11
Description
• Testing the quality, effectiveness, and cost of a software project and processes
is extremely important and without measuring these aspects, the project
development cannot be fully completed. By implementing the practice of
testing these elements, software engineers can ensure that no defects and
errors are left undetected in the system as well as validate its functionality. This
perfection of software testing can be achieved exceptionally by testing software
metrics. Metrics can be defined as the standard of measurement, it is a unit
used for describing and measuring attributes of a particular object or system.
With the assistance of testing metrics, one can easily measure the software
quality and ensure its performance. Graph, which is an integral part of Metrics
in software testing, is used by testers to describe the various testing stages as
well as the reports provided during the process of testing metrics of a software.
Elements represented through
graphs
• Test completion status, defects raised and closed, issue type, work log distribution of
testers per task and more.
• Test execution completion percentage. It represents the total number of test cases
executed.
• The generated detailed summary reports for projects, milestones, plans, and runs are
simplified and presented.
• Depicts number of passed, blocked, and failed test cases. The numbers of cases that
require retesting are also illustrated.
• Testers also use graph metrics in software testing to depict the remaining tests,
remaining efforts, as well as the track the ideal progress.
• The cost and efforts are monitored and represented.
• Represents the defect status provided by priority: critical, high, medium and low.
Graph matrix example
• A graph matrix is a square matrix whose size represents the number
of nodes in the control flow graph. If you do not know what control
flow graphs are, then read this article. Each row and column in the
matrix identifies a node and the entries in the matrix represent the
edges or links between these nodes. Conventionally, nodes are
denoted by digits and edges are denoted by letters.
• Let’s take an example.
• Let’s convert this control flow graph into a graph matrix. Since the graph has 4
nodes, so the graph matrix would have a dimension of 4 X 4. Matrix entries will
be filled as follows :
• (1, 1) will be filled with ‘a’ as an edge exists from node 1 to node 1
• (1, 2) will be filled with ‘b’ as an edge exists from node 1 to node 2. It is
important to note that (2, 1) will not be filled as the edge is unidirectional and
not bidirectional
• (1, 3) will be filled with ‘c’ as edge c exists from node 1 to node 3
• (2, 4) will be filled with ‘d’ as edge exists from node 2 to node 4
• (3, 4) will be filled with ‘e’ as an edge exists from node 3 to node 4
• The graph formed is shown below .
Connection Matrix :
• Connection Matrix :
• A connection matrix is a matrix defined with edges weight. In simple
form, when a connection exists between two nodes of control flow
graph, then the edge weight is 1, otherwise, it is 0. However, 0 is not
usually entered in the matrix cells to reduce the complexity.
• For example, if we represent the above control flow graph as a
connection matrix, then the result would be :
• As we can see, the weight of the edges are simply replaced by 1 and
the cells which were empty before are left as it is, i.e., representing 0.