{"id":232,"date":"2018-07-24T12:18:00","date_gmt":"2018-07-24T12:18:00","guid":{"rendered":"http:\/\/csp8.epgpbooks.inflibnet.ac.in\/?post_type=chapter&#038;p=232"},"modified":"2018-08-08T05:38:39","modified_gmt":"2018-08-08T05:38:39","slug":"fundamentals-of-software-testing","status":"publish","type":"chapter","link":"https:\/\/ebooks.inflibnet.ac.in\/csp8\/chapter\/fundamentals-of-software-testing\/","title":{"rendered":"Fundamentals of Software Testing"},"content":{"raw":"<div>\r\n\r\n&nbsp;\r\n<p style=\"text-align: justify\"><strong>FUNDAMENTALS OF SOFTWARE TESTING\u00a0<\/strong><\/p>\r\n&nbsp;\r\n<p style=\"text-align: justify\">Software testing is the evaluation of a system with the intention of finding an error or fault or a bug. It also checks for the functionalities of the system so that it meets the specified requirements.<\/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\u00a0 To execute a program with the intent of finding an <em>error.<\/em><\/p>\r\n<p style=\"text-align: left\">\u2022\u00a0 To check if the system meets the requirements and be executed successfully in the intended environment.<\/p>\r\n<p style=\"text-align: justify\">\u2022\u00a0 To check if the system is \u201cFit for purpose\u201d.<\/p>\r\n<p style=\"text-align: justify\">\u2022\u00a0 To check if the system does what it is expected to do.<\/p>\r\n&nbsp;\r\n<p style=\"text-align: justify\"><strong>COMPUTER BUG\u00a0<\/strong><\/p>\r\n&nbsp;\r\n<p style=\"text-align: justify\">In 1947, Harvard University was operating a room-sized computer called the Mark II. It encompassed mechanical relays and glowing vacuum tubes. The technicians program the computer by reconfiguring it and they had to change the occasional vacuum tube. A moth flew into the computer and was zapped by the high voltage when it landed on a relay. Bugs can also be known as:<\/p>\r\n&nbsp;\r\n<p style=\"text-align: justify\">\u00b7\u00a0 Defect<\/p>\r\n<p style=\"text-align: justify\">\u00b7\u00a0 Fault<\/p>\r\n<p style=\"text-align: justify\">\u00b7\u00a0 Problem<\/p>\r\n<p style=\"text-align: justify\">\u00b7\u00a0 Error<\/p>\r\n<p style=\"text-align: justify\">\u00b7\u00a0 Incident<\/p>\r\n<p style=\"text-align: justify\">\u00b7\u00a0 Anomaly<\/p>\r\n<p style=\"text-align: justify\">\u00b7\u00a0 Variance<\/p>\r\n<p style=\"text-align: justify\">\u00b7\u00a0 Failure<\/p>\r\n<p style=\"text-align: justify\">\u00b7\u00a0 Inconsistency<\/p>\r\n<p style=\"text-align: justify\">\u00b7\u00a0 Product Anomaly<\/p>\r\n<p style=\"text-align: justify\">\u00b7\u00a0 Product Incidence<\/p>\r\n<p style=\"text-align: justify\">\u00b7\u00a0 Feature<\/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\">The programs that are developed contain defects which are hard to predict in the future, however it is highly likely, that the software we will develop in the future will not be significantly better.<\/p>\r\n&nbsp;\r\n\r\n<strong>Sources of Problems\u00a0<\/strong>\r\n\r\n&nbsp;\r\n\r\nThe problems can arise from various sources such as:\r\n\r\n&nbsp;\r\n\r\n\u00b7\u00a0 <strong>Requirements Definition: <\/strong>Erroneous, incomplete, inconsistent requirements.\r\n\r\n\u00b7\u00a0 <strong>Design:\u00a0<\/strong>Fundamental design flaws in the software.\r\n\r\n\u00b7\u00a0 <strong>Implementation:\u00a0<\/strong>Mistakes in chip fabrication, wiring, programming faults, malicious code.\r\n\r\n\u00b7\u00a0 <strong>Support \u00a0Systems:\u00a0<\/strong>Poor programming languages, faulty compilers and debuggers, misleading development tools.\r\n\r\n\u00b7\u00a0 <strong>Inadequate Testing of Software: <\/strong>Incomplete testing, poor verification, mistakes in debugging.\r\n\r\n\u00b7\u00a0 <strong>Evolution: <\/strong>Sloppy redevelopment or maintenance, introduction of new flaws in attempts to fix old flaws, incremental escalation to inordinate complexity.\r\n\r\n&nbsp;\r\n\r\n<strong>Adverse Effects of Faulty Software\u00a0<\/strong>\r\n\r\n&nbsp;\r\n\r\nFaulty software causes many adverse effects such as:\r\n\r\n&nbsp;\r\n\r\n\u00b7\u00a0 <strong>Money Management:\u00a0<\/strong>Fraud, violation of privacy, shutdown of stock exchanges and banks, negative interest rates.\r\n\r\n\u00b7\u00a0 <strong>Control of Elections: <\/strong>Wrong results (intentional or non-intentional).\r\n\r\n\u00b7\u00a0 <strong>Control of Jails: <\/strong>Technology-aided escape attempts and successes, accidental release of inmates, failures in software controlled locks.\r\n\r\n\u00b7\u00a0 <strong>Law Enforcement: \u00a0<\/strong>False arrests and imprisonments.\r\n\r\n<\/div>\r\n<div style=\"text-align: justify\">\r\n\r\n&nbsp;\r\n<p style=\"text-align: justify\">Project Mercury\u2019s FORTRAN code had the following fault: DO I=1.10 instead of ... DO I=1...10. The fault was discovered in an analysis of why the software did not seem to generate results that were sufficiently accurate. The erroneous 1.10 would cause the loop to be executed exactly once.<\/p>\r\n&nbsp;\r\n\r\n<strong>Military Aviation Problems\u00a0<\/strong>\r\n\r\n&nbsp;\r\n<p style=\"text-align: justify\">An F-18 crashed because of a missing exception condition: if ... then ... without the else clause that was thought could not possibly arise. In simulation, an F-16 program bug caused the virtual plane to flip over whenever it crossed the equator, as a result of a missing minus sign to indicate south latitude.<\/p>\r\n&nbsp;\r\n\r\n<strong>Year Ambiguities\u00a0<\/strong>\r\n\r\n&nbsp;\r\n<p style=\"text-align: justify\">In 1992, Mary Bandar received an invitation to attend a kindergarten in Winona, Minnesota, along with others born in '88. Mary was 104 years old at the time. Mr. Blodgett\u2019s auto insurance rate tripled when he turned 101. He was the computer program\u2019s first driver over 100, and his age was interpreted as 1. This is a double blunder because the program\u2019s definition of a teenager is someone under 20!<\/p>\r\n&nbsp;\r\n\r\n<strong>AT&amp;T Bug\u00a0<\/strong>\r\n\r\n&nbsp;\r\n<p style=\"text-align: justify\">In mid-December 1989, AT&amp;T installed new software in 114 electronic switching systems. On January 15, 1990, 5 million calls were blocked during a 9 hour period nationwide. The bug was traced to a C program that contained a break statement within an switch clause nested within a loop. The switch clause was part of a loop. Initially, the loop contained only if clauses with break statements to exit the loop. When the control logic became complicated, a switch clause was added to improve the readability of the code.<\/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\">A Norwegian bank ATM consistently dispersed 10 times the amount required. Many people joyously joined the queues as the word spread. A software flaw caused a UK bank to duplicate every transfer payment request for half an hour. The bank lost 2 billion British pounds. The bank eventually recovered the funds but lost half a million pounds in potential interest.<\/p>\r\n&nbsp;\r\n\r\n<strong>Making Rupee\u00a0<\/strong>\r\n\r\n&nbsp;\r\n<p style=\"text-align: justify\">An Australian man purchased $104,500 worth of Sri Lankan Rupees. The next day he sold the Rupees to another bank for $440,258. The first bank\u2019s software had displayed a bogus exchange rate in the Rupee position. A judge ruled that the man had acted without intended fraud and could keep the extra $335,758.<\/p>\r\n&nbsp;\r\n\r\n<strong>Bug in BoNY Software\u00a0<\/strong>\r\n\r\n&nbsp;\r\n<p style=\"text-align: justify\">The Bank of New York (BoNY) had a $32 billion overdraft as the result of a 16-bit integer counter that went unchecked. BoNY was unable to process the incoming credits from security transfers, while the NY Federal Reserve automatically debited BoNY\u2019s cash account.<\/p>\r\n&nbsp;\r\n\r\n<strong>SPECIFICATION\u00a0<\/strong>\r\n\r\n&nbsp;\r\n<p style=\"text-align: justify\">You have to know what your product is before you can say if it has a bug -\u201cif you can\u2019t say it, you can\u2019t do it\u201d. A <em>specification <\/em>defines the product being created and includes the functional requirements that describe the features the product will support (E.g. on a word processor save, print, check spelling, change font etc) and non-functional requirements that focuses on the constraints of the product (E.g. Security, reliability, user friendliness, platform etc).<\/p>\r\n&nbsp;\r\n\r\n<strong>SOFTWARE BUGS\u00a0<\/strong>\r\n\r\n&nbsp;\r\n\r\nA software bug occurs when at least one of these rules is true:\r\n\r\n&nbsp;\r\n\r\n\u25e6\u00a0 The software does not do something that the specification says it should do.\r\n\r\n\u25e6\u00a0 The software does something that the specification says it should not do.\r\n\r\n\u25e6\u00a0 The software does something that the specification does not mention.\r\n\r\n<span style=\"font-size: 1em;text-align: initial\">\u25e6\u00a0 The software does not do something that the product specification does not mention but should.<\/span>\r\n\r\n<span style=\"text-align: initial;font-size: 1em\">\u25e6\u00a0 The software is difficult to understand, hard to use or slow.<\/span>\r\n\r\n<\/div>\r\n<div style=\"text-align: justify\">\r\n\r\n&nbsp;\r\n\r\nMost bugs are not because of mistakes in the code, the estimation of the bugs uncovered at various phases is as follows:\r\n<ul>\r\n \t<li>Specification (~= 55%)<\/li>\r\n \t<li>Design (~= 25%)<\/li>\r\n \t<li>Code (~= 15%)<\/li>\r\n \t<li>Other (~= 5%)<\/li>\r\n<\/ul>\r\n&nbsp;\r\n\r\n<strong>Relative cost of bugs\u00a0<\/strong>\r\n\r\n&nbsp;\r\n<p style=\"text-align: justify\">The bugs that are found at later phases cost more to fix. Cost to fix a bug increases exponentially (10x) i.e. it increases tenfold as time increases. E.g. a bug found during specification costs $1 to fix. If the bug is found in design cost is $10, if found in code cost is $100 and if found in released software cost is $1000. The cost keeps increasing tenfold as the time increases.<\/p>\r\n&nbsp;\r\n\r\n<strong>Bug Free Software\u00a0<\/strong>\r\n\r\n&nbsp;\r\n<p style=\"text-align: justify\">Software is in the news for the wrong reason such as security breach, Mars Lander lost, hackers getting credit card information, etc. The development of a bug free software is difficult when software gets more features and supports more platforms, it becomes increasingly difficult to make it create bug-free. The common questions that arise with the development of a bug free software are:<\/p>\r\n&nbsp;\r\n\r\n\u25e6\u00a0 Why can\u2019t software engineers develop software that just works?\r\n\r\n\u25e6\u00a0 Do you think bug free software is unattainable?\r\n\r\n\u25e6\u00a0 Are their technical barriers that make this impossible?\r\n\r\n\u25e6\u00a0 Is it just a question of time before we can do this?\r\n\r\n\u25e6\u00a0 Are we missing technology or processes?\r\n\r\n<\/div>\r\n&nbsp;\r\n<p style=\"text-align: justify\"><strong>GOAL OF A SOFTWARE TESTER<\/strong><\/p>\r\n&nbsp;\r\n<p style=\"text-align: justify\">The goals of a software tester is to find bugs as early in the software development processes as possible and make sure they get fixed. The software tester must be careful not to get caught in the dangerous spiral of unattainable perfection. The expectation on a software tester involves checking the following:<\/p>\r\n\r\n<ul style=\"text-align: justify\">\r\n \t<li>Are they explorers?<\/li>\r\n \t<li>Are they troubleshooters?<\/li>\r\n \t<li>Are they relentless?<\/li>\r\n \t<li>Are they creative?<\/li>\r\n \t<li>Are they perfectionists (within reason)?<\/li>\r\n \t<li>Do they exercise good judgment?<\/li>\r\n \t<li>Are they tactful and diplomatic?<\/li>\r\n \t<li>Are they persuasive?<\/li>\r\n<\/ul>\r\n&nbsp;\r\n<p style=\"text-align: justify\"><strong>TESTING<\/strong><\/p>\r\n&nbsp;\r\n<p style=\"text-align: justify\">Testing is the confirming of correct behavior of a piece of software with respect to this context. Software testing is the evaluation of a system with the intention of finding an error or fault or a bug. It also checks for the functionalities of the system so that it meets the specified requirements. We know what we intended the code to do \u2013 we need to confirm that it does what we intended. Testing involves conducting test to ensure the production function correctly, but the test conducted must be looked into to check whether the tests are testing the right (relevant) \u201cstuff\u201d. The test is testing \u201cmost\u201d of the code and not just repeatedly testing the same code.<\/p>\r\n&nbsp;\r\n<p style=\"text-align: justify\"><strong>Good Testing Practices<\/strong><\/p>\r\n&nbsp;\r\n<p style=\"text-align: justify\">A good test case is one that has a high probability of detecting an undiscovered defect, not one that shows that the program works correctly. It is impossible to test your own program. A necessary part of every test case is a description of the expected result. Non-reproducible or on-the-fly testing is avoided. The test cases for valid as well as invalid input conditions are written and the results of each test are thoroughly inspected.<\/p>\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, 2017.<\/li>\r\n \t<li>PankajJalote, \u201cAn Integrated Approach to Software Engineering\u201d, Second Edition, Springer Verlag, 1997.<\/li>\r\n \t<li>Ian Sommerville, \u201cSoftware Engineering\u201d, Sixth Edition, Addison Wesley, 2015.<\/li>\r\n<\/ul>","rendered":"<div>\n<p>&nbsp;<\/p>\n<p style=\"text-align: justify\"><strong>FUNDAMENTALS OF SOFTWARE TESTING\u00a0<\/strong><\/p>\n<p>&nbsp;<\/p>\n<p style=\"text-align: justify\">Software testing is the evaluation of a system with the intention of finding an error or fault or a bug. It also checks for the functionalities of the system so that it meets the specified requirements.<\/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\u00a0 To execute a program with the intent of finding an <em>error.<\/em><\/p>\n<p style=\"text-align: left\">\u2022\u00a0 To check if the system meets the requirements and be executed successfully in the intended environment.<\/p>\n<p style=\"text-align: justify\">\u2022\u00a0 To check if the system is \u201cFit for purpose\u201d.<\/p>\n<p style=\"text-align: justify\">\u2022\u00a0 To check if the system does what it is expected to do.<\/p>\n<p>&nbsp;<\/p>\n<p style=\"text-align: justify\"><strong>COMPUTER BUG\u00a0<\/strong><\/p>\n<p>&nbsp;<\/p>\n<p style=\"text-align: justify\">In 1947, Harvard University was operating a room-sized computer called the Mark II. It encompassed mechanical relays and glowing vacuum tubes. The technicians program the computer by reconfiguring it and they had to change the occasional vacuum tube. A moth flew into the computer and was zapped by the high voltage when it landed on a relay. Bugs can also be known as:<\/p>\n<p>&nbsp;<\/p>\n<p style=\"text-align: justify\">\u00b7\u00a0 Defect<\/p>\n<p style=\"text-align: justify\">\u00b7\u00a0 Fault<\/p>\n<p style=\"text-align: justify\">\u00b7\u00a0 Problem<\/p>\n<p style=\"text-align: justify\">\u00b7\u00a0 Error<\/p>\n<p style=\"text-align: justify\">\u00b7\u00a0 Incident<\/p>\n<p style=\"text-align: justify\">\u00b7\u00a0 Anomaly<\/p>\n<p style=\"text-align: justify\">\u00b7\u00a0 Variance<\/p>\n<p style=\"text-align: justify\">\u00b7\u00a0 Failure<\/p>\n<p style=\"text-align: justify\">\u00b7\u00a0 Inconsistency<\/p>\n<p style=\"text-align: justify\">\u00b7\u00a0 Product Anomaly<\/p>\n<p style=\"text-align: justify\">\u00b7\u00a0 Product Incidence<\/p>\n<p style=\"text-align: justify\">\u00b7\u00a0 Feature<\/p>\n<\/div>\n<div style=\"text-align: justify\">\n<p>&nbsp;<\/p>\n<p style=\"text-align: justify\">The programs that are developed contain defects which are hard to predict in the future, however it is highly likely, that the software we will develop in the future will not be significantly better.<\/p>\n<p>&nbsp;<\/p>\n<p><strong>Sources of Problems\u00a0<\/strong><\/p>\n<p>&nbsp;<\/p>\n<p>The problems can arise from various sources such as:<\/p>\n<p>&nbsp;<\/p>\n<p>\u00b7\u00a0 <strong>Requirements Definition: <\/strong>Erroneous, incomplete, inconsistent requirements.<\/p>\n<p>\u00b7\u00a0 <strong>Design:\u00a0<\/strong>Fundamental design flaws in the software.<\/p>\n<p>\u00b7\u00a0 <strong>Implementation:\u00a0<\/strong>Mistakes in chip fabrication, wiring, programming faults, malicious code.<\/p>\n<p>\u00b7\u00a0 <strong>Support \u00a0Systems:\u00a0<\/strong>Poor programming languages, faulty compilers and debuggers, misleading development tools.<\/p>\n<p>\u00b7\u00a0 <strong>Inadequate Testing of Software: <\/strong>Incomplete testing, poor verification, mistakes in debugging.<\/p>\n<p>\u00b7\u00a0 <strong>Evolution: <\/strong>Sloppy redevelopment or maintenance, introduction of new flaws in attempts to fix old flaws, incremental escalation to inordinate complexity.<\/p>\n<p>&nbsp;<\/p>\n<p><strong>Adverse Effects of Faulty Software\u00a0<\/strong><\/p>\n<p>&nbsp;<\/p>\n<p>Faulty software causes many adverse effects such as:<\/p>\n<p>&nbsp;<\/p>\n<p>\u00b7\u00a0 <strong>Money Management:\u00a0<\/strong>Fraud, violation of privacy, shutdown of stock exchanges and banks, negative interest rates.<\/p>\n<p>\u00b7\u00a0 <strong>Control of Elections: <\/strong>Wrong results (intentional or non-intentional).<\/p>\n<p>\u00b7\u00a0 <strong>Control of Jails: <\/strong>Technology-aided escape attempts and successes, accidental release of inmates, failures in software controlled locks.<\/p>\n<p>\u00b7\u00a0 <strong>Law Enforcement: \u00a0<\/strong>False arrests and imprisonments.<\/p>\n<\/div>\n<div style=\"text-align: justify\">\n<p>&nbsp;<\/p>\n<p style=\"text-align: justify\">Project Mercury\u2019s FORTRAN code had the following fault: DO I=1.10 instead of &#8230; DO I=1&#8230;10. The fault was discovered in an analysis of why the software did not seem to generate results that were sufficiently accurate. The erroneous 1.10 would cause the loop to be executed exactly once.<\/p>\n<p>&nbsp;<\/p>\n<p><strong>Military Aviation Problems\u00a0<\/strong><\/p>\n<p>&nbsp;<\/p>\n<p style=\"text-align: justify\">An F-18 crashed because of a missing exception condition: if &#8230; then &#8230; without the else clause that was thought could not possibly arise. In simulation, an F-16 program bug caused the virtual plane to flip over whenever it crossed the equator, as a result of a missing minus sign to indicate south latitude.<\/p>\n<p>&nbsp;<\/p>\n<p><strong>Year Ambiguities\u00a0<\/strong><\/p>\n<p>&nbsp;<\/p>\n<p style=\"text-align: justify\">In 1992, Mary Bandar received an invitation to attend a kindergarten in Winona, Minnesota, along with others born in &#8217;88. Mary was 104 years old at the time. Mr. Blodgett\u2019s auto insurance rate tripled when he turned 101. He was the computer program\u2019s first driver over 100, and his age was interpreted as 1. This is a double blunder because the program\u2019s definition of a teenager is someone under 20!<\/p>\n<p>&nbsp;<\/p>\n<p><strong>AT&amp;T Bug\u00a0<\/strong><\/p>\n<p>&nbsp;<\/p>\n<p style=\"text-align: justify\">In mid-December 1989, AT&amp;T installed new software in 114 electronic switching systems. On January 15, 1990, 5 million calls were blocked during a 9 hour period nationwide. The bug was traced to a C program that contained a break statement within an switch clause nested within a loop. The switch clause was part of a loop. Initially, the loop contained only if clauses with break statements to exit the loop. When the control logic became complicated, a switch clause was added to improve the readability of the code.<\/p>\n<\/div>\n<div style=\"text-align: justify\">\n<p>&nbsp;<\/p>\n<p style=\"text-align: justify\">A Norwegian bank ATM consistently dispersed 10 times the amount required. Many people joyously joined the queues as the word spread. A software flaw caused a UK bank to duplicate every transfer payment request for half an hour. The bank lost 2 billion British pounds. The bank eventually recovered the funds but lost half a million pounds in potential interest.<\/p>\n<p>&nbsp;<\/p>\n<p><strong>Making Rupee\u00a0<\/strong><\/p>\n<p>&nbsp;<\/p>\n<p style=\"text-align: justify\">An Australian man purchased $104,500 worth of Sri Lankan Rupees. The next day he sold the Rupees to another bank for $440,258. The first bank\u2019s software had displayed a bogus exchange rate in the Rupee position. A judge ruled that the man had acted without intended fraud and could keep the extra $335,758.<\/p>\n<p>&nbsp;<\/p>\n<p><strong>Bug in BoNY Software\u00a0<\/strong><\/p>\n<p>&nbsp;<\/p>\n<p style=\"text-align: justify\">The Bank of New York (BoNY) had a $32 billion overdraft as the result of a 16-bit integer counter that went unchecked. BoNY was unable to process the incoming credits from security transfers, while the NY Federal Reserve automatically debited BoNY\u2019s cash account.<\/p>\n<p>&nbsp;<\/p>\n<p><strong>SPECIFICATION\u00a0<\/strong><\/p>\n<p>&nbsp;<\/p>\n<p style=\"text-align: justify\">You have to know what your product is before you can say if it has a bug -\u201cif you can\u2019t say it, you can\u2019t do it\u201d. A <em>specification <\/em>defines the product being created and includes the functional requirements that describe the features the product will support (E.g. on a word processor save, print, check spelling, change font etc) and non-functional requirements that focuses on the constraints of the product (E.g. Security, reliability, user friendliness, platform etc).<\/p>\n<p>&nbsp;<\/p>\n<p><strong>SOFTWARE BUGS\u00a0<\/strong><\/p>\n<p>&nbsp;<\/p>\n<p>A software bug occurs when at least one of these rules is true:<\/p>\n<p>&nbsp;<\/p>\n<p>\u25e6\u00a0 The software does not do something that the specification says it should do.<\/p>\n<p>\u25e6\u00a0 The software does something that the specification says it should not do.<\/p>\n<p>\u25e6\u00a0 The software does something that the specification does not mention.<\/p>\n<p><span style=\"font-size: 1em;text-align: initial\">\u25e6\u00a0 The software does not do something that the product specification does not mention but should.<\/span><\/p>\n<p><span style=\"text-align: initial;font-size: 1em\">\u25e6\u00a0 The software is difficult to understand, hard to use or slow.<\/span><\/p>\n<\/div>\n<div style=\"text-align: justify\">\n<p>&nbsp;<\/p>\n<p>Most bugs are not because of mistakes in the code, the estimation of the bugs uncovered at various phases is as follows:<\/p>\n<ul>\n<li>Specification (~= 55%)<\/li>\n<li>Design (~= 25%)<\/li>\n<li>Code (~= 15%)<\/li>\n<li>Other (~= 5%)<\/li>\n<\/ul>\n<p>&nbsp;<\/p>\n<p><strong>Relative cost of bugs\u00a0<\/strong><\/p>\n<p>&nbsp;<\/p>\n<p style=\"text-align: justify\">The bugs that are found at later phases cost more to fix. Cost to fix a bug increases exponentially (10x) i.e. it increases tenfold as time increases. E.g. a bug found during specification costs $1 to fix. If the bug is found in design cost is $10, if found in code cost is $100 and if found in released software cost is $1000. The cost keeps increasing tenfold as the time increases.<\/p>\n<p>&nbsp;<\/p>\n<p><strong>Bug Free Software\u00a0<\/strong><\/p>\n<p>&nbsp;<\/p>\n<p style=\"text-align: justify\">Software is in the news for the wrong reason such as security breach, Mars Lander lost, hackers getting credit card information, etc. The development of a bug free software is difficult when software gets more features and supports more platforms, it becomes increasingly difficult to make it create bug-free. The common questions that arise with the development of a bug free software are:<\/p>\n<p>&nbsp;<\/p>\n<p>\u25e6\u00a0 Why can\u2019t software engineers develop software that just works?<\/p>\n<p>\u25e6\u00a0 Do you think bug free software is unattainable?<\/p>\n<p>\u25e6\u00a0 Are their technical barriers that make this impossible?<\/p>\n<p>\u25e6\u00a0 Is it just a question of time before we can do this?<\/p>\n<p>\u25e6\u00a0 Are we missing technology or processes?<\/p>\n<\/div>\n<p>&nbsp;<\/p>\n<p style=\"text-align: justify\"><strong>GOAL OF A SOFTWARE TESTER<\/strong><\/p>\n<p>&nbsp;<\/p>\n<p style=\"text-align: justify\">The goals of a software tester is to find bugs as early in the software development processes as possible and make sure they get fixed. The software tester must be careful not to get caught in the dangerous spiral of unattainable perfection. The expectation on a software tester involves checking the following:<\/p>\n<ul style=\"text-align: justify\">\n<li>Are they explorers?<\/li>\n<li>Are they troubleshooters?<\/li>\n<li>Are they relentless?<\/li>\n<li>Are they creative?<\/li>\n<li>Are they perfectionists (within reason)?<\/li>\n<li>Do they exercise good judgment?<\/li>\n<li>Are they tactful and diplomatic?<\/li>\n<li>Are they persuasive?<\/li>\n<\/ul>\n<p>&nbsp;<\/p>\n<p style=\"text-align: justify\"><strong>TESTING<\/strong><\/p>\n<p>&nbsp;<\/p>\n<p style=\"text-align: justify\">Testing is the confirming of correct behavior of a piece of software with respect to this context. Software testing is the evaluation of a system with the intention of finding an error or fault or a bug. It also checks for the functionalities of the system so that it meets the specified requirements. We know what we intended the code to do \u2013 we need to confirm that it does what we intended. Testing involves conducting test to ensure the production function correctly, but the test conducted must be looked into to check whether the tests are testing the right (relevant) \u201cstuff\u201d. The test is testing \u201cmost\u201d of the code and not just repeatedly testing the same code.<\/p>\n<p>&nbsp;<\/p>\n<p style=\"text-align: justify\"><strong>Good Testing Practices<\/strong><\/p>\n<p>&nbsp;<\/p>\n<p style=\"text-align: justify\">A good test case is one that has a high probability of detecting an undiscovered defect, not one that shows that the program works correctly. It is impossible to test your own program. A necessary part of every test case is a description of the expected result. Non-reproducible or on-the-fly testing is avoided. The test cases for valid as well as invalid input conditions are written and the results of each test are thoroughly inspected.<\/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, 2017.<\/li>\n<li>PankajJalote, \u201cAn Integrated Approach to Software Engineering\u201d, Second Edition, Springer Verlag, 1997.<\/li>\n<li>Ian Sommerville, \u201cSoftware Engineering\u201d, Sixth Edition, Addison Wesley, 2015.<\/li>\n<\/ul>\n","protected":false},"author":4,"menu_order":23,"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-232","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\/232","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":5,"href":"https:\/\/ebooks.inflibnet.ac.in\/csp8\/wp-json\/pressbooks\/v2\/chapters\/232\/revisions"}],"predecessor-version":[{"id":404,"href":"https:\/\/ebooks.inflibnet.ac.in\/csp8\/wp-json\/pressbooks\/v2\/chapters\/232\/revisions\/404"}],"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\/232\/metadata\/"}],"wp:attachment":[{"href":"https:\/\/ebooks.inflibnet.ac.in\/csp8\/wp-json\/wp\/v2\/media?parent=232"}],"wp:term":[{"taxonomy":"chapter-type","embeddable":true,"href":"https:\/\/ebooks.inflibnet.ac.in\/csp8\/wp-json\/pressbooks\/v2\/chapter-type?post=232"},{"taxonomy":"contributor","embeddable":true,"href":"https:\/\/ebooks.inflibnet.ac.in\/csp8\/wp-json\/wp\/v2\/contributor?post=232"},{"taxonomy":"license","embeddable":true,"href":"https:\/\/ebooks.inflibnet.ac.in\/csp8\/wp-json\/wp\/v2\/license?post=232"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}