You are on page 1of 7

See discussions, stats, and author profiles for this publication at: https://www.researchgate.

net/publication/333728684

The Application of the Graph Theory for Develoving and Teasting the Software

Article · January 2019

CITATIONS READS

0 88

2 authors:

Rusul Jabbar Qasim Shakir Kadhim


Al-Qasim Green University University of Babylon
5 PUBLICATIONS   1 CITATION    25 PUBLICATIONS   8 CITATIONS   

SEE PROFILE SEE PROFILE

Some of the authors of this publication are also working on these related projects:

Distributed Computing and Networking View project

atmosphere physics View project

All content following this page was uploaded by Rusul Jabbar on 25 September 2019.

The user has requested enhancement of the downloaded file.


International Journal of Civil Engineering and Technology (IJCIET)
Volume 10, Issue 01, January 2019, pp. 2026-2031, Article ID: IJCIET_10_01_183
Available online at http://www.iaeme.com/ijciet/issues.asp?JType=IJCIET&VType=10&IType=01
ISSN Print: 0976-6308 and ISSN Online: 0976-6316

© IAEME Publication Scopus Indexed

THE APPLICATION OF THE GRAPH THEORY


FOR DEVELOPING AND TESTING THE
SOFTWARE
Wessam L. Nados
College of Basic Education, University of Babylon, Babil, Iraq

Rusul J. Alsaedi
Electronic computer center, Al-Qasim Green University, Babil, Iraq

Qasim S. Kadhim*

College of Basic Education, University of Babylon, Babil, Iraq


Corresponding author

ABSTRACT
The graph theory, which studies the properties of the graphs, has been widely
accepted as a core subject in the knowledge of computer science. In this paper, we
produced a method for developing an algorithm. The effectiveness of testing is the most
important factor for determining the cost and the duration of the development of the
large software products with a given quality, so the cost of testing for detecting errors
in the software reaches 30-40% of the total cost of its development and largely
determines its quality. The most commonly used of the testing methods are regression,
function, load, module, and optimization test if the graph is sufficiently complex. The
graph accelerates the testing process. We see the ways that we need to test. When they
cover all graph paths, the algorithm of the program is fully tested and does not need
any further development.
Keywords: Software, Graph theory, Optimization testing, Algorithm.
Cite this Article: Wessam L. Nados, Rusul J. Alsaedi and Qasim S. Kadhim, the
Application of the Graph Theory for Developing and Testing the Software,
International Journal of Civil Engineering and Technology, 10(01), 2019, pp. 2026–
2031
http://www.iaeme.com/IJCIET/issues.asp?JType=IJCIET&VType=10&IType=01

http://www.iaeme.com/IJCIET/index.asp 2026 editor@iaeme.com


Wessam L. Nados, Rusul J. Alsaedi and Qasim S. Kadhim

1. INTRODUCTION
The main method for detecting errors in software is to test it. The effectiveness of the testing
is the most important factor for determining the cost and the duration of the development of
the large software products with a given quality [1]. The cost of the test for detecting errors in
the software reaches 30-40% of the total cost of its development and largely determines its
quality [2]. The most commonly used of the testing methods are regression, function, load,
module, and optimization test.
The graphs are visually represented as dots connected by lines, and this convenient form
has made them appealing to the computer scientists. The amount of the technological, social
and biological networks that can be represented as graphs is enormous. The fact, the graphs
have been made an essential part of any data structures course in engineering and computer
science schools [3]. For the productive testing, you can use the graphs that give a number of
advantages in the development and testing. The coverage of the graphs for testing is useful; for
that, it is possible to design tests using a different coverage criterion and to identify errors [4].
As for testing a black box, the coverage of the graphs here can also be very important if you
have to work with states and transitions, the state graphs, etc. If the graph is sufficiently
complex, the different coverage criteria will allow us to evaluate the sufficiency of the test set
[5].

2. SOME CONCEPTS IN THE GRAPH THEORY


The graph theory is a substantial area of mathematics, and many interesting theorems and
properties that are known for the graphs can readily be programmed on the computer; see, e.g.,
[6, 7, 8]. The graph is readily represented by drawing vertices as dots and arcs as arrows joining
dots. The vertex and arc labels are written as words adjacent to the vertices and arcs. If the
vertices are drawn as circles or other shapes, their labels can be written inside the shapes. The
small graphs are easy to draw by hand, and the larger graphs can be drawn automatically using
appropriate tools [9]. The graphs provide a convenient way to represent various kinds of
mathematical objects. Essentially, any graph is made up of two sets:
• A set of vertices
• A set of edges.
Depending on a particular situation, restrictions are imposed on the type of edges we allow.
For some problems, the directed edges are applied, and for the other problems, the undirected
edges are applied from one vertex to another; so the graphs give us many techniques and
flexibility while defining and solving a real life problem. The graph has many features; some
of them are [10]:
providing abstracted view
establishing a relationship among objects
balancing
modeling
decision -making ability
structural arrangement of various objects
easy modification or changing in the existing system
The terms can be differentiating on the basis of their utilities. The term of the graph is used
in the application of the graph Software engineering [10].

http://www.iaeme.com/IJCIET/index.asp 2027 editor@iaeme.com


The Application of the Graph Theory for Developing and Testing the Software

2.1. Software Engineering


The graph has many applications in the software engineering. For example, during the
requirements specification, the data flow diagrams are used where vertices represent
transformations, and edges represent the data flow. During the design phase, the graphical
design is used for describing relations among modules while during testing, the flow control of
the program associated with McCabe's complexity measure employs the directed graphs for
addressing the sequence of the executed instructions and etc. [11].
The software process management also has the applications of the network diagrams which
involve the graph algorithms. Since the software representations are generally the graph-
theoretical networks, they can make a few shortcuts in their representations. According to
Parnas [12], the software engineering deals with the development of the multi-versions
projects. That is the most large-scale software projects result in evolving products. The
evolving nature combined with the large number of components often leads to the architecture
that is complicated and quite messy [13].

2.2. The Mathematical Model of the Software Testing


The software testing is one of the major and primary techniques for achieving high quality
software. The software testing is done to detect the presence of the faults which cause the
software failure. However, the software testing is a time consuming and expensive task [14].
The graph, G, consists of a set of one or more vertices (1*), N, and a set of zero or more edges
(0 *), E. The initial set of vertices, N0, and The finite set of vertices, Nf. Both of these sets
must be non-empty. If the graph consists of one vertex, it must be in the both sets, so N0 = Nf
will be satisfied. The initial vertices are denoted by the incoming arrows [15]. The edge e can
combine two vertices, np and ns, where p is the source, and s is the receiver. This is represented
as (np, ns). Also, the edge can start from one vertex and end in it (n, n). The vertex is formally
denoted by n in a lowercase with a numeric index to denote its number. For simplicity and
simplicity of understanding, the simplified syntax will be used, where the vertex is simply
denoted by the number. Testing can be done either manually or automatically by using the
testing tools. It is found that automated software testing is better than manual testing. However,
very few test data generation tools are commercially available today [16].
The path is a sequence of connected vertices in the graph, G. The path p from the vertex
1 3 6
Will be written like this [1, 3, 6, and 4]. The neighboring pairs of vertices in this way are
represented by ribs. For example, the set of edges in this path is {(1, 3), (3, 6), (6, 4)}. The
length of the path is the number of edges in the path. One vertex has a path of length 0. The
path length is p = 3. The path track is a subset of vertices in the path p. [1, 3] is the path segment
of [1, 3, 6, and 4]. Do not confuse this with the edge (1, 3). The test path starts at the initial
vertex and ends at the end one. The path [1, 3, and 4] is the correct test path [17]. We call the
main functions of the program vertices and the connection of the functions by the edges; thus,
they compose the program graph.

2.3. Software Testing Modeling


The proposed method for testing software using the graph theory was applied in the
development and debugging of the program "the environment for modeling spatial image
filtration" [17]. The graph of the program is shown in Fig .1.

http://www.iaeme.com/IJCIET/index.asp 2028 editor@iaeme.com


Wessam L. Nados, Rusul J. Alsaedi and Qasim S. Kadhim

Figure 1.The graph of the program “the environment for modeling spatial filtration of images”.
Cha
Char. meaning of Char. meaning of Char. meaning of Char. meaning of meaning of
r.
Color
A Start F Color Q a file U Filter Z
balance
B the list E the size R Open W Hazy
Black and
C Information G Cleaning S Save X
white
0 po Canvas Brightness-
D H-P T Exit Y
Pencil plate contrast

We find all the paths of the graph using the developed program. Having found out all the
paths with the help of the developed program is shown in Fig. 2; we pass to test. The graph
accelerates the testing process. We see the ways that we need to test. When covering all graph
paths, the algorithm of the program is fully tested and does not need any further development
[12]. Testing the program "the environment for modeling spatial image filtration" shows:
1. The program is compatible with Windows XP, 7,8,10.1.
2. Processing the images that are larger than 100MB takes up to 1024MB of RAM and
19% of CPU resources; a critical point is not detected.
3. No fatal and critical errors in the program.

http://www.iaeme.com/IJCIET/index.asp 2029 editor@iaeme.com


The Application of the Graph Theory for Developing and Testing the Software

Figure 1.A screenshot of the developed program for finding ways in the graph.

3. CONCLUSION
The use of the graph theory makes it possible to test all the functions of the program with
minimal time. The possibility of skipping test of any function of the program is excluded.
Testing of all the graph paths mathematically proves that all the functions and the program
connections have been tested.

REFERENCES
[1] Myers, G., “The Art of Testing Programs,”/ G. Myers; Trans. with English. Ed. Pozin. - M:
Finance and Statistics, 1982. - 176 p.
[2] A. H. Jabbar, M. Q. Hamzah, S. O. Mezan, N. N. Hasan, and M. A. Agam, “A Continuous
Process for the Preparation, Characterization and Study Thermal Properties of Nickel
Oxide Nanostructure,” Int. J. Sci. Eng. Res., vol. 9, no. 3, 2018 pp. 590–602.
[3] R. Kulbertson., “Rapid testing,” / R. Culbertson, K. Brown, K. Cobb. - M.: Williams, 2002.
374 p.
[4] B. Beizer, “Testing the black box,” in Technologies for functional testing of software and
systems. - St. Petersburg. : Peter, 2004.
[5] Abdullah Hasan Jabbar (2015) “Study Magnetic Properties And Synthesis With
Characterization Of Nickel Oxide (NiO) Nanoparticles”, 6 (8): 94-98.
[6] Timo Mantere, “Automatic software testing by Genetic Algorithms,” Phd thesis, University
of Vaasa, Finland, 2003.
[7] Velur Rajappa et. al., “Efficient software test case generation Using genetic algorithm
based graph theory,” in International conference on emerging trends in Engineering and
Technology, IEEE, 2008, pp. 298 - 303.

http://www.iaeme.com/IJCIET/index.asp 2030 editor@iaeme.com


Wessam L. Nados, Rusul J. Alsaedi and Qasim S. Kadhim

[8] Praveen Ranjan Srivastava and Tai-hoon Kim, “Application of genetic algorithm in
software testing,” in International Journal of software Engineering and its Applications,
3(4), 2009, pp.87 – 96.
[9] Alexander Chatzigeorgiou, Nikolaos Tsantalis , and George Stephanides, “Application of
Graph Theory,” in OO Software Engineering.
[10] M. Q. Hamzah, Abdullah Hasan Jabbar, Salim Oudah Mezan, "Synthesis and
Characterization of Cu2ZnSnS4 (CZTS) Thin Film by Chemical Bath Deposition (CBD)
for Solar Cell Applications", International Journal of Scientific Engineering and Research
(IJSER), http://www.ijser.in/archives/v5i12/v5i12.php, Volume 5 Issue 12, December
2017, 35 - 37
[11] Emden R. Gansner and Stephen C. North, “An open graph visualization system and its
applications to software engineering,” in Software—Practice and Experience,
30(11):1203–1233, 2000.
[12] A. S. B. A. and M. A. A. Abdullah Hasan Jabbar, Maytham Qabel Hamzah, Salim Oudah
Mezan, “Green Synthesis of Silver / Polystyrene Nano Composite ( Ag / PS NCs ) via Plant
Extracts Beginning a New Era in Drug Delivery,” Indian J. Sci. Technol., vol. 11, no. 22
June 2018, pp. 1–9.
[13] D. E. Knuth, “The Stanford GraphBase,” in Addison Wesley, 1994.
[14] S. Pemmaraju and S. Skiena., “Computational discrete mathematics,” in Cambridge
University Press, 2003. 13. H. Thimbleby. Combining
[15] Rishi Pal Singh and Vandana, “Application of Graph Theory in Computer Science and
Engineering,” Rishi Pal Singh and Vandana, in International Journal of Computer
Applications (0975 – 8887) Volume 104 – No.1, October 2014.
[16] Maha alzabidi et. al., “Automatic software structural testing by using evolutionary
algorithms for test data generations,” in International Journal of Computer science and
Network Security 9 (4), 2009, pp. 390 – 395.
[17] WILLIE K. HARRISON, “The Role of Graph Theory in System of Systems Engineering,”
in IEEE, Volume 4, 2016.

http://www.iaeme.com/IJCIET/index.asp 2031 editor@iaeme.com

View publication stats

You might also like