{"id":268,"date":"2018-07-25T05:30:00","date_gmt":"2018-07-25T05:30:00","guid":{"rendered":"http:\/\/csp8.epgpbooks.inflibnet.ac.in\/?post_type=chapter&#038;p=268"},"modified":"2018-08-08T05:50:32","modified_gmt":"2018-08-08T05:50:32","slug":"white-box-testing","status":"publish","type":"chapter","link":"https:\/\/ebooks.inflibnet.ac.in\/csp8\/chapter\/white-box-testing\/","title":{"rendered":"White Box Testing"},"content":{"raw":"<div>\r\n\r\n&nbsp;\r\n<p style=\"text-align: justify\"><strong>WHITE BOX TESTING<\/strong><\/p>\r\n&nbsp;\r\n<p style=\"text-align: justify\">White box is a testing methodology to test the internal structures and working of software. White box testing also know as structural testing is testing based on analysis of internal logic (design, code, etc.).<\/p>\r\n&nbsp;\r\n<p style=\"text-align: justify\"><strong>LEARNING OBJECTIVES\u00a0<\/strong><\/p>\r\n&nbsp;\r\n<p style=\"text-align: justify\">\u2022 To focus on Program structures, Program internal logic and data structures, Program internal behaviors and states.<\/p>\r\n<p style=\"text-align: justify\">\u2022 To focus on internal program structure and discover all internal program errors.<\/p>\r\n&nbsp;\r\n<p style=\"text-align: justify\"><strong>DEFINITION\u00a0<\/strong><\/p>\r\n&nbsp;\r\n<p style=\"text-align: justify\">White box testing is testing based on analysis of internal logic (design, code, etc.). (But expected results still come from requirements.). It is also known as structural testing. White-box testing concerns techniques for designing tests; it is not a level of testing. White-box testing techniques apply primarily to lower levels of testing (e.g., unit and component). The major testing focuses on<\/p>\r\n\r\n<ul>\r\n \t<li style=\"text-align: justify\">Program structures.\r\n<ul>\r\n \t<li style=\"text-align: justify\">Program statements and branches<\/li>\r\n \t<li>Various kinds of program paths<\/li>\r\n<\/ul>\r\n<\/li>\r\n \t<li>Program internal logic and data structures.<\/li>\r\n \t<li>Program internal behaviors and states.<\/li>\r\n \t<li>Logic coverage.\r\n<ul>\r\n \t<li><strong style=\"text-align: justify;font-size: 1em\">Statement: <\/strong><span style=\"text-align: justify;font-size: 1em\">each statement executed at least once.<\/span><\/li>\r\n \t<li><strong style=\"text-align: justify;font-size: 1em\">Branch<\/strong><span style=\"text-align: justify;font-size: 1em\">: each branch traversed (and every entry point taken) at least once.<\/span><\/li>\r\n \t<li><strong style=\"text-align: justify;font-size: 1em\">Condition: <\/strong><span style=\"text-align: justify;font-size: 1em\">each condition True at least once and False at least once.<\/span><\/li>\r\n \t<li><strong style=\"text-align: justify;font-size: 1em\">Branch\/Condition<\/strong><span style=\"text-align: justify;font-size: 1em\">: both branch and condition coverage achieved.<\/span><\/li>\r\n \t<li><strong style=\"text-align: justify;font-size: 1em\">Compound Condition<\/strong><span style=\"text-align: justify;font-size: 1em\">: all combinations of condition values at every branch statement covered (and every entry point taken).<\/span><\/li>\r\n \t<li><strong style=\"text-align: justify;font-size: 1em\">Path:\u00a0 <\/strong><span style=\"text-align: justify;font-size: 1em\">all program paths traversed at least once<\/span><\/li>\r\n<\/ul>\r\n<\/li>\r\n \t<li>Dataflow coverage.<\/li>\r\n \t<li>Path conditions and symbolic evaluation.<\/li>\r\n \t<li>Other white-box testing strategies (e.g., \u201cfault-based testing\u201d).<\/li>\r\n<\/ul>\r\n<\/div>\r\n<div style=\"text-align: justify\">\r\n\r\n&nbsp;\r\n\r\n<strong>WHITE BOX TESTING\u00a0<\/strong>\r\n\r\n&nbsp;\r\n<p style=\"text-align: justify\">White box is a testing methodology to test the internal structures and working of software. White box testing also know as structural testing is testing based on analysis of internal logic (design, code, etc.).<\/p>\r\n&nbsp;\r\n\r\n<strong>Test Model: <\/strong>Control program chart (graph)\r\n\r\n&nbsp;\r\n\r\n<strong>Test case design: <\/strong>Various white-box testing methods generate test cases based on a given control program graph for a program.\r\n\r\n&nbsp;\r\n\r\nThe goal of white box testing is to:\r\n\r\n&nbsp;\r\n\r\n\u2022\u00a0 Guarantee that all independent paths within a module have been exercised at least once.\r\n\r\n\u2022\u00a0 Exercise all logical decisions on their true and false sides.\r\n\r\n\u2022\u00a0 Execute all loops at their boundaries and within their operational bounds.\r\n\r\n\u2022\u00a0 Exercise internal data structures to assure their validity.\r\n\r\n\u2022\u00a0 Exercise all data define and use paths.\r\n\r\n&nbsp;\r\n\r\n<strong>White-Box Software Testing Methods\u00a0<\/strong>\r\n\r\n&nbsp;\r\n<p style=\"text-align: justify\">\u2022\u00a0<strong>Basis path testing<\/strong>: It was first proposed by Tom McCabe [MCC76]. It can be used to derive a logical complexity measure for a procedure design and used as a guide for defining a basis set of execution path. Path testing guarantees to execute every statement in the program at least one time.<\/p>\r\n&nbsp;\r\n<p style=\"text-align: justify\">\u2022\u00a0<strong>Branch Testing<\/strong>: Branch testing exercise predicate nodes of a program flow graph to make sure that each predicate node has been exercised at least once.<\/p>\r\n&nbsp;\r\n<p style=\"text-align: justify\">\u2022\u00a0<strong>Loop Testing: <\/strong>It exercise loops of a program to make sure that the inside and outside of loop body are executed.<\/p>\r\n&nbsp;\r\n<p style=\"text-align: justify\"><span style=\"font-size: 1em;text-align: initial\">\u2022\u00a0<\/span><strong style=\"text-align: initial;font-size: 1em\">State-Based Testing<\/strong><span style=\"text-align: initial;font-size: 1em\">: The basic idea is to use a finite state machine as a test model to check the state behaviors of a program process.<\/span><\/p>\r\n&nbsp;\r\n<p style=\"text-align: justify\"><span style=\"font-size: 1em\">\u2022\u00a0<\/span><strong style=\"font-size: 1em\">Cyclomatic Complexity: <\/strong><span style=\"font-size: 1em\">Cyclomatic complexity is software metric that provides a quantitative measure of the global complexity of a program. When this metric is used in the context of the basis path testing, the value computed for cyclomatic complexity defines the number of independent paths in the basis set of a program.<\/span><\/p>\r\n\r\n<\/div>\r\n<div style=\"text-align: justify\">\r\n\r\n&nbsp;\r\n<p style=\"text-align: justify\"><strong><em>Measuring software complexity <\/em><\/strong>is much needed as software complexity is difficult to operationalize. Computational complexity measure is big O (or big Oh), O(n). It measures software complexity from the machine\u2019s viewpoint in terms of how the size of the input data affects an algorithm\u2019s usage of computational resources (usually running time or memory). Complexity measure in software engineering should measure complexity from the viewpoint of human developers, as computer time is cheap whereas human time is expensive.<\/p>\r\n&nbsp;\r\n<p style=\"text-align: justify\">Cyclomatic Complexity was invented by Thomas McCabe (1974) to measure the complexity of a program\u2019s conditional logic. It counts the number of decisions in the program, under the assumption that decisions are difficult for people. It makes assumptions about decision-counting rules and linear dependence of the total count to complexity.<\/p>\r\n&nbsp;\r\n\r\nCyclomatic complexity of graph G equals =#edges - #nodes + 2\r\n<p style=\"padding-left: 330px\">V(G) = e \u2013 n + 2<\/p>\r\n&nbsp;\r\n\r\nIt also corresponds to the number of linearly independent paths in a program.\r\n\r\n&nbsp;\r\n\r\n<strong>Program Flow Graph (Control Flow Diagram)\u00a0<\/strong>\r\n\r\n&nbsp;\r\n<p style=\"text-align: justify\">Flow graph notation defines the program using nodes connected by edges. The following shows some examples for flow graph:<\/p>\r\n&nbsp;\r\n\r\n<strong>Sequential statement block <\/strong>where the statements are executed sequentially.\r\n\r\n<\/div>\r\n<img class=\"aligncenter size-full wp-image-276\" src=\"http:\/\/csp8.epgpbooks.inflibnet.ac.in\/wp-content\/uploads\/sites\/53\/2018\/07\/Sequential-statement-block.png\" alt=\"\" width=\"36\" height=\"96\" \/>\r\n\r\n&nbsp;\r\n<p style=\"text-align: justify\"><strong style=\"text-align: initial;font-size: 1em\">If else block \u2013 <\/strong><span style=\"text-align: initial;font-size: 1em\">defines an if and else condition<\/span><\/p>\r\n\r\n<div style=\"text-align: justify\">\r\n<p style=\"padding-left: 30px\"><img class=\"wp-image-275 aligncenter\" src=\"http:\/\/csp8.epgpbooks.inflibnet.ac.in\/wp-content\/uploads\/sites\/53\/2018\/07\/If-else-block.png\" alt=\"\" width=\"294\" height=\"273\" \/><\/p>\r\n<img class=\"wp-image-274 alignnone\" src=\"http:\/\/csp8.epgpbooks.inflibnet.ac.in\/wp-content\/uploads\/sites\/53\/2018\/07\/switch.png\" alt=\"\" width=\"733\" height=\"570\" \/>\r\n\r\n<strong>While block - <\/strong>executes a block of statements continuously while the given condition is true.\r\n\r\n<\/div>\r\n<div style=\"text-align: justify\"><img class=\"wp-image-273 alignnone\" src=\"http:\/\/csp8.epgpbooks.inflibnet.ac.in\/wp-content\/uploads\/sites\/53\/2018\/07\/While-block.png\" alt=\"\" width=\"654\" height=\"725\" \/><\/div>\r\n<div style=\"text-align: justify\">\r\n\r\n&nbsp;\r\n\r\n<strong>Computing the cyclomatic complexity<\/strong>\r\n\r\n&nbsp;\r\n\r\nCyclomatic complexity of graph G equals \u00e0#edges - #nodes + 2\r\n\r\n&nbsp;\r\n<p style=\"padding-left: 150px\"><strong>V(G) = e \u2013 n + 2<\/strong><\/p>\r\n&nbsp;\r\n<p style=\"text-align: justify\">Computing the cyclomatic complexity involves <strong>number of simple decisions + 1 (or) number of enclosed areas + 1<\/strong>. In the following case, V (G) = 4<\/p>\r\n\r\n<\/div>\r\n<p style=\"text-align: justify\"><img class=\"aligncenter size-full wp-image-272\" src=\"http:\/\/csp8.epgpbooks.inflibnet.ac.in\/wp-content\/uploads\/sites\/53\/2018\/07\/Computing.png\" alt=\"\" width=\"230\" height=\"184\" \/><\/p>\r\n<p style=\"text-align: justify\"><strong>Examples for graph complexity:<\/strong><\/p>\r\n<img class=\"aligncenter wp-image-271\" src=\"http:\/\/csp8.epgpbooks.inflibnet.ac.in\/wp-content\/uploads\/sites\/53\/2018\/07\/graph-complexity.png\" alt=\"\" width=\"741\" height=\"313\" \/>\r\n\r\n&nbsp;\r\n\r\n<strong>Web Links<\/strong>\r\n<ul>\r\n \t<li>https:\/\/www.tutorialspoint.com\/software_testing\/software_testing_types.htm<\/li>\r\n \t<li>https:\/\/softwaretestingfundamentals.com<\/li>\r\n \t<li>www.softwaretestinghelp.com\/types-of-software-testing\/<\/li>\r\n<\/ul>\r\n&nbsp;\r\n\r\n<strong>Supporting &amp; Reference Materials<\/strong>\r\n<ul>\r\n \t<li>Roger S. Pressman, \u201cSoftware Engineering: A Practitioner\u2019s Approach\u201d, Fifth Edition, McGraw Hill, 2001.<\/li>\r\n \t<li>Pankaj Jalote, \u201cAn Integrated Approach to Software Engineering\u201d, Second Edition, Narosa Publications, 2005.<\/li>\r\n \t<li>Ian Sommerville, \u201cSoftware Engineering\u201d, Sixth Edition, Addison Wesley, 2000.<\/li>\r\n<\/ul>","rendered":"<div>\n<p>&nbsp;<\/p>\n<p style=\"text-align: justify\"><strong>WHITE BOX TESTING<\/strong><\/p>\n<p>&nbsp;<\/p>\n<p style=\"text-align: justify\">White box is a testing methodology to test the internal structures and working of software. White box testing also know as structural testing is testing based on analysis of internal logic (design, code, etc.).<\/p>\n<p>&nbsp;<\/p>\n<p style=\"text-align: justify\"><strong>LEARNING OBJECTIVES\u00a0<\/strong><\/p>\n<p>&nbsp;<\/p>\n<p style=\"text-align: justify\">\u2022 To focus on Program structures, Program internal logic and data structures, Program internal behaviors and states.<\/p>\n<p style=\"text-align: justify\">\u2022 To focus on internal program structure and discover all internal program errors.<\/p>\n<p>&nbsp;<\/p>\n<p style=\"text-align: justify\"><strong>DEFINITION\u00a0<\/strong><\/p>\n<p>&nbsp;<\/p>\n<p style=\"text-align: justify\">White box testing is testing based on analysis of internal logic (design, code, etc.). (But expected results still come from requirements.). It is also known as structural testing. White-box testing concerns techniques for designing tests; it is not a level of testing. White-box testing techniques apply primarily to lower levels of testing (e.g., unit and component). The major testing focuses on<\/p>\n<ul>\n<li style=\"text-align: justify\">Program structures.\n<ul>\n<li style=\"text-align: justify\">Program statements and branches<\/li>\n<li>Various kinds of program paths<\/li>\n<\/ul>\n<\/li>\n<li>Program internal logic and data structures.<\/li>\n<li>Program internal behaviors and states.<\/li>\n<li>Logic coverage.\n<ul>\n<li><strong style=\"text-align: justify;font-size: 1em\">Statement: <\/strong><span style=\"text-align: justify;font-size: 1em\">each statement executed at least once.<\/span><\/li>\n<li><strong style=\"text-align: justify;font-size: 1em\">Branch<\/strong><span style=\"text-align: justify;font-size: 1em\">: each branch traversed (and every entry point taken) at least once.<\/span><\/li>\n<li><strong style=\"text-align: justify;font-size: 1em\">Condition: <\/strong><span style=\"text-align: justify;font-size: 1em\">each condition True at least once and False at least once.<\/span><\/li>\n<li><strong style=\"text-align: justify;font-size: 1em\">Branch\/Condition<\/strong><span style=\"text-align: justify;font-size: 1em\">: both branch and condition coverage achieved.<\/span><\/li>\n<li><strong style=\"text-align: justify;font-size: 1em\">Compound Condition<\/strong><span style=\"text-align: justify;font-size: 1em\">: all combinations of condition values at every branch statement covered (and every entry point taken).<\/span><\/li>\n<li><strong style=\"text-align: justify;font-size: 1em\">Path:\u00a0 <\/strong><span style=\"text-align: justify;font-size: 1em\">all program paths traversed at least once<\/span><\/li>\n<\/ul>\n<\/li>\n<li>Dataflow coverage.<\/li>\n<li>Path conditions and symbolic evaluation.<\/li>\n<li>Other white-box testing strategies (e.g., \u201cfault-based testing\u201d).<\/li>\n<\/ul>\n<\/div>\n<div style=\"text-align: justify\">\n<p>&nbsp;<\/p>\n<p><strong>WHITE BOX TESTING\u00a0<\/strong><\/p>\n<p>&nbsp;<\/p>\n<p style=\"text-align: justify\">White box is a testing methodology to test the internal structures and working of software. White box testing also know as structural testing is testing based on analysis of internal logic (design, code, etc.).<\/p>\n<p>&nbsp;<\/p>\n<p><strong>Test Model: <\/strong>Control program chart (graph)<\/p>\n<p>&nbsp;<\/p>\n<p><strong>Test case design: <\/strong>Various white-box testing methods generate test cases based on a given control program graph for a program.<\/p>\n<p>&nbsp;<\/p>\n<p>The goal of white box testing is to:<\/p>\n<p>&nbsp;<\/p>\n<p>\u2022\u00a0 Guarantee that all independent paths within a module have been exercised at least once.<\/p>\n<p>\u2022\u00a0 Exercise all logical decisions on their true and false sides.<\/p>\n<p>\u2022\u00a0 Execute all loops at their boundaries and within their operational bounds.<\/p>\n<p>\u2022\u00a0 Exercise internal data structures to assure their validity.<\/p>\n<p>\u2022\u00a0 Exercise all data define and use paths.<\/p>\n<p>&nbsp;<\/p>\n<p><strong>White-Box Software Testing Methods\u00a0<\/strong><\/p>\n<p>&nbsp;<\/p>\n<p style=\"text-align: justify\">\u2022\u00a0<strong>Basis path testing<\/strong>: It was first proposed by Tom McCabe [MCC76]. It can be used to derive a logical complexity measure for a procedure design and used as a guide for defining a basis set of execution path. Path testing guarantees to execute every statement in the program at least one time.<\/p>\n<p>&nbsp;<\/p>\n<p style=\"text-align: justify\">\u2022\u00a0<strong>Branch Testing<\/strong>: Branch testing exercise predicate nodes of a program flow graph to make sure that each predicate node has been exercised at least once.<\/p>\n<p>&nbsp;<\/p>\n<p style=\"text-align: justify\">\u2022\u00a0<strong>Loop Testing: <\/strong>It exercise loops of a program to make sure that the inside and outside of loop body are executed.<\/p>\n<p>&nbsp;<\/p>\n<p style=\"text-align: justify\"><span style=\"font-size: 1em;text-align: initial\">\u2022\u00a0<\/span><strong style=\"text-align: initial;font-size: 1em\">State-Based Testing<\/strong><span style=\"text-align: initial;font-size: 1em\">: The basic idea is to use a finite state machine as a test model to check the state behaviors of a program process.<\/span><\/p>\n<p>&nbsp;<\/p>\n<p style=\"text-align: justify\"><span style=\"font-size: 1em\">\u2022\u00a0<\/span><strong style=\"font-size: 1em\">Cyclomatic Complexity: <\/strong><span style=\"font-size: 1em\">Cyclomatic complexity is software metric that provides a quantitative measure of the global complexity of a program. When this metric is used in the context of the basis path testing, the value computed for cyclomatic complexity defines the number of independent paths in the basis set of a program.<\/span><\/p>\n<\/div>\n<div style=\"text-align: justify\">\n<p>&nbsp;<\/p>\n<p style=\"text-align: justify\"><strong><em>Measuring software complexity <\/em><\/strong>is much needed as software complexity is difficult to operationalize. Computational complexity measure is big O (or big Oh), O(n). It measures software complexity from the machine\u2019s viewpoint in terms of how the size of the input data affects an algorithm\u2019s usage of computational resources (usually running time or memory). Complexity measure in software engineering should measure complexity from the viewpoint of human developers, as computer time is cheap whereas human time is expensive.<\/p>\n<p>&nbsp;<\/p>\n<p style=\"text-align: justify\">Cyclomatic Complexity was invented by Thomas McCabe (1974) to measure the complexity of a program\u2019s conditional logic. It counts the number of decisions in the program, under the assumption that decisions are difficult for people. It makes assumptions about decision-counting rules and linear dependence of the total count to complexity.<\/p>\n<p>&nbsp;<\/p>\n<p>Cyclomatic complexity of graph G equals =#edges &#8211; #nodes + 2<\/p>\n<p style=\"padding-left: 330px\">V(G) = e \u2013 n + 2<\/p>\n<p>&nbsp;<\/p>\n<p>It also corresponds to the number of linearly independent paths in a program.<\/p>\n<p>&nbsp;<\/p>\n<p><strong>Program Flow Graph (Control Flow Diagram)\u00a0<\/strong><\/p>\n<p>&nbsp;<\/p>\n<p style=\"text-align: justify\">Flow graph notation defines the program using nodes connected by edges. The following shows some examples for flow graph:<\/p>\n<p>&nbsp;<\/p>\n<p><strong>Sequential statement block <\/strong>where the statements are executed sequentially.<\/p>\n<\/div>\n<p><img loading=\"lazy\" decoding=\"async\" class=\"aligncenter size-full wp-image-276\" src=\"http:\/\/csp8.epgpbooks.inflibnet.ac.in\/wp-content\/uploads\/sites\/53\/2018\/07\/Sequential-statement-block.png\" alt=\"\" width=\"36\" height=\"96\" \/><\/p>\n<p>&nbsp;<\/p>\n<p style=\"text-align: justify\"><strong style=\"text-align: initial;font-size: 1em\">If else block \u2013 <\/strong><span style=\"text-align: initial;font-size: 1em\">defines an if and else condition<\/span><\/p>\n<div style=\"text-align: justify\">\n<p style=\"padding-left: 30px\"><img loading=\"lazy\" decoding=\"async\" class=\"wp-image-275 aligncenter\" src=\"http:\/\/csp8.epgpbooks.inflibnet.ac.in\/wp-content\/uploads\/sites\/53\/2018\/07\/If-else-block.png\" alt=\"\" width=\"294\" height=\"273\" srcset=\"https:\/\/ebooks.inflibnet.ac.in\/csp8\/wp-content\/uploads\/sites\/53\/2018\/07\/If-else-block.png 377w, https:\/\/ebooks.inflibnet.ac.in\/csp8\/wp-content\/uploads\/sites\/53\/2018\/07\/If-else-block-300x279.png 300w, https:\/\/ebooks.inflibnet.ac.in\/csp8\/wp-content\/uploads\/sites\/53\/2018\/07\/If-else-block-65x60.png 65w, https:\/\/ebooks.inflibnet.ac.in\/csp8\/wp-content\/uploads\/sites\/53\/2018\/07\/If-else-block-225x209.png 225w, https:\/\/ebooks.inflibnet.ac.in\/csp8\/wp-content\/uploads\/sites\/53\/2018\/07\/If-else-block-350x325.png 350w\" sizes=\"auto, (max-width: 294px) 100vw, 294px\" \/><\/p>\n<p><img loading=\"lazy\" decoding=\"async\" class=\"wp-image-274 alignnone\" src=\"http:\/\/csp8.epgpbooks.inflibnet.ac.in\/wp-content\/uploads\/sites\/53\/2018\/07\/switch.png\" alt=\"\" width=\"733\" height=\"570\" srcset=\"https:\/\/ebooks.inflibnet.ac.in\/csp8\/wp-content\/uploads\/sites\/53\/2018\/07\/switch.png 594w, https:\/\/ebooks.inflibnet.ac.in\/csp8\/wp-content\/uploads\/sites\/53\/2018\/07\/switch-300x233.png 300w, https:\/\/ebooks.inflibnet.ac.in\/csp8\/wp-content\/uploads\/sites\/53\/2018\/07\/switch-65x51.png 65w, https:\/\/ebooks.inflibnet.ac.in\/csp8\/wp-content\/uploads\/sites\/53\/2018\/07\/switch-225x175.png 225w, https:\/\/ebooks.inflibnet.ac.in\/csp8\/wp-content\/uploads\/sites\/53\/2018\/07\/switch-350x272.png 350w\" sizes=\"auto, (max-width: 733px) 100vw, 733px\" \/><\/p>\n<p><strong>While block &#8211; <\/strong>executes a block of statements continuously while the given condition is true.<\/p>\n<\/div>\n<div style=\"text-align: justify\"><img loading=\"lazy\" decoding=\"async\" class=\"wp-image-273 alignnone\" src=\"http:\/\/csp8.epgpbooks.inflibnet.ac.in\/wp-content\/uploads\/sites\/53\/2018\/07\/While-block.png\" alt=\"\" width=\"654\" height=\"725\" srcset=\"https:\/\/ebooks.inflibnet.ac.in\/csp8\/wp-content\/uploads\/sites\/53\/2018\/07\/While-block.png 541w, https:\/\/ebooks.inflibnet.ac.in\/csp8\/wp-content\/uploads\/sites\/53\/2018\/07\/While-block-271x300.png 271w, https:\/\/ebooks.inflibnet.ac.in\/csp8\/wp-content\/uploads\/sites\/53\/2018\/07\/While-block-65x72.png 65w, https:\/\/ebooks.inflibnet.ac.in\/csp8\/wp-content\/uploads\/sites\/53\/2018\/07\/While-block-225x250.png 225w, https:\/\/ebooks.inflibnet.ac.in\/csp8\/wp-content\/uploads\/sites\/53\/2018\/07\/While-block-350x388.png 350w\" sizes=\"auto, (max-width: 654px) 100vw, 654px\" \/><\/div>\n<div style=\"text-align: justify\">\n<p>&nbsp;<\/p>\n<p><strong>Computing the cyclomatic complexity<\/strong><\/p>\n<p>&nbsp;<\/p>\n<p>Cyclomatic complexity of graph G equals \u00e0#edges &#8211; #nodes + 2<\/p>\n<p>&nbsp;<\/p>\n<p style=\"padding-left: 150px\"><strong>V(G) = e \u2013 n + 2<\/strong><\/p>\n<p>&nbsp;<\/p>\n<p style=\"text-align: justify\">Computing the cyclomatic complexity involves <strong>number of simple decisions + 1 (or) number of enclosed areas + 1<\/strong>. In the following case, V (G) = 4<\/p>\n<\/div>\n<p style=\"text-align: justify\"><img loading=\"lazy\" decoding=\"async\" class=\"aligncenter size-full wp-image-272\" src=\"http:\/\/csp8.epgpbooks.inflibnet.ac.in\/wp-content\/uploads\/sites\/53\/2018\/07\/Computing.png\" alt=\"\" width=\"230\" height=\"184\" srcset=\"https:\/\/ebooks.inflibnet.ac.in\/csp8\/wp-content\/uploads\/sites\/53\/2018\/07\/Computing.png 230w, https:\/\/ebooks.inflibnet.ac.in\/csp8\/wp-content\/uploads\/sites\/53\/2018\/07\/Computing-65x52.png 65w, https:\/\/ebooks.inflibnet.ac.in\/csp8\/wp-content\/uploads\/sites\/53\/2018\/07\/Computing-225x180.png 225w\" sizes=\"auto, (max-width: 230px) 100vw, 230px\" \/><\/p>\n<p style=\"text-align: justify\"><strong>Examples for graph complexity:<\/strong><\/p>\n<p><img loading=\"lazy\" decoding=\"async\" class=\"aligncenter wp-image-271\" src=\"http:\/\/csp8.epgpbooks.inflibnet.ac.in\/wp-content\/uploads\/sites\/53\/2018\/07\/graph-complexity.png\" alt=\"\" width=\"741\" height=\"313\" srcset=\"https:\/\/ebooks.inflibnet.ac.in\/csp8\/wp-content\/uploads\/sites\/53\/2018\/07\/graph-complexity.png 1282w, https:\/\/ebooks.inflibnet.ac.in\/csp8\/wp-content\/uploads\/sites\/53\/2018\/07\/graph-complexity-300x127.png 300w, https:\/\/ebooks.inflibnet.ac.in\/csp8\/wp-content\/uploads\/sites\/53\/2018\/07\/graph-complexity-768x324.png 768w, https:\/\/ebooks.inflibnet.ac.in\/csp8\/wp-content\/uploads\/sites\/53\/2018\/07\/graph-complexity-1024x432.png 1024w, https:\/\/ebooks.inflibnet.ac.in\/csp8\/wp-content\/uploads\/sites\/53\/2018\/07\/graph-complexity-65x27.png 65w, https:\/\/ebooks.inflibnet.ac.in\/csp8\/wp-content\/uploads\/sites\/53\/2018\/07\/graph-complexity-225x95.png 225w, https:\/\/ebooks.inflibnet.ac.in\/csp8\/wp-content\/uploads\/sites\/53\/2018\/07\/graph-complexity-350x148.png 350w\" sizes=\"auto, (max-width: 741px) 100vw, 741px\" \/><\/p>\n<p>&nbsp;<\/p>\n<p><strong>Web Links<\/strong><\/p>\n<ul>\n<li>https:\/\/www.tutorialspoint.com\/software_testing\/software_testing_types.htm<\/li>\n<li>https:\/\/softwaretestingfundamentals.com<\/li>\n<li>www.softwaretestinghelp.com\/types-of-software-testing\/<\/li>\n<\/ul>\n<p>&nbsp;<\/p>\n<p><strong>Supporting &amp; Reference Materials<\/strong><\/p>\n<ul>\n<li>Roger S. Pressman, \u201cSoftware Engineering: A Practitioner\u2019s Approach\u201d, Fifth Edition, McGraw Hill, 2001.<\/li>\n<li>Pankaj Jalote, \u201cAn Integrated Approach to Software Engineering\u201d, Second Edition, Narosa Publications, 2005.<\/li>\n<li>Ian Sommerville, \u201cSoftware Engineering\u201d, Sixth Edition, Addison Wesley, 2000.<\/li>\n<\/ul>\n","protected":false},"author":4,"menu_order":27,"template":"","meta":{"pb_show_title":"on","pb_short_title":"","pb_subtitle":"","pb_authors":["dr-r-baskaran"],"pb_section_license":""},"chapter-type":[],"contributor":[58],"license":[],"class_list":["post-268","chapter","type-chapter","status-publish","hentry","contributor-dr-r-baskaran"],"part":3,"_links":{"self":[{"href":"https:\/\/ebooks.inflibnet.ac.in\/csp8\/wp-json\/pressbooks\/v2\/chapters\/268","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/ebooks.inflibnet.ac.in\/csp8\/wp-json\/pressbooks\/v2\/chapters"}],"about":[{"href":"https:\/\/ebooks.inflibnet.ac.in\/csp8\/wp-json\/wp\/v2\/types\/chapter"}],"author":[{"embeddable":true,"href":"https:\/\/ebooks.inflibnet.ac.in\/csp8\/wp-json\/wp\/v2\/users\/4"}],"version-history":[{"count":6,"href":"https:\/\/ebooks.inflibnet.ac.in\/csp8\/wp-json\/pressbooks\/v2\/chapters\/268\/revisions"}],"predecessor-version":[{"id":411,"href":"https:\/\/ebooks.inflibnet.ac.in\/csp8\/wp-json\/pressbooks\/v2\/chapters\/268\/revisions\/411"}],"part":[{"href":"https:\/\/ebooks.inflibnet.ac.in\/csp8\/wp-json\/pressbooks\/v2\/parts\/3"}],"metadata":[{"href":"https:\/\/ebooks.inflibnet.ac.in\/csp8\/wp-json\/pressbooks\/v2\/chapters\/268\/metadata\/"}],"wp:attachment":[{"href":"https:\/\/ebooks.inflibnet.ac.in\/csp8\/wp-json\/wp\/v2\/media?parent=268"}],"wp:term":[{"taxonomy":"chapter-type","embeddable":true,"href":"https:\/\/ebooks.inflibnet.ac.in\/csp8\/wp-json\/pressbooks\/v2\/chapter-type?post=268"},{"taxonomy":"contributor","embeddable":true,"href":"https:\/\/ebooks.inflibnet.ac.in\/csp8\/wp-json\/wp\/v2\/contributor?post=268"},{"taxonomy":"license","embeddable":true,"href":"https:\/\/ebooks.inflibnet.ac.in\/csp8\/wp-json\/wp\/v2\/license?post=268"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}