Table of Contents Software Systems Overview and Examples Categories of Software Defects Causes of Software Defects Causes of Software Defects (contd.) Consequences of Software Defects View More This lesson on the fundamentals of software testing, will help you learn the fundamental concepts and terminologies in software testing as required by the ISTQB. In the coming sections we will learn about software systems and defects. First, let us begin with its overview and a few examples. Read more: Top 16 Types of Software Testing and How to Use Them? Choose the Best for Your Career! Caltech Program in DevOpsExplore Program Software Systems Overview and Examples Software systems are an integral part of life. They help run critical applications like hospital tools, daily business operations like ATMs, and consumer products like televisions or smartphones. Any functionality issue in software can lead to severe impacts like loss of life, money, time, and reputation, in case of companies. Defects in software systems can, therefore, cause a significant effect on our day-to-day lives. Now let us look at a few real-life examples over the years. In the 1980s, software defects in the code controlling the Therac-25 radiation therapy machine were directly responsible for some patient deaths. In 1996, the US$1 billion prototype Arianne 5 rocket of the European Space Agency was destroyed less than a minute after launch due to a bug in the onboard guidance computer program. In 2011, Honda Company was forced to recall 2.49 million cars, small SUVs, and minivans worldwide, including its popular Accord sedan, to repair a software problem that could damage the automatic transmission. Such issues can impact the reputation of a company and lead to substantial costs for software replacement. Now, let us look at examples of software defects and how they impact life. In an incident, fire department paramedics placed a woman on oxygen at the start of the trip and confirmed that the onboard oxygen system was operating normally. However, the oxygen system stopped working for approximately eight minutes before the paramedics noticed it. They immediately restarted the system; however, by the time they did, the woman was dead. After the incident, the fire department changed all the electrical equipment; yet, weeks later, the same malfunction occurred with the new equipment. An independent investigation pointed to a software problem with the ambulance oxygen system. The fire department is now using portable oxygen until the ambulance company provides a fix. After these examples, let us find out the categories of software defects in the next section. Learn Concepts - Basics to Advanced! Caltech Program in DevOpsExplore Program Categories of Software Defects Typical examples of software defects include defects that impact individuals and defects that impact the society at large. Let us discuss them separately. Individual Impact Some examples of defects that impact individuals include defects in the monthly bills. Any minor defect in the software generating these bills can lead to over or underpayment of bills, causing losses to the billing company. Another common defect in this category is defects in salary computations. Other examples are defects in ATM withdrawal amounts, and amount of waiting time at traffic lights, phone booths, and petrol filling stations. Wherever there is software being used, there is a chance of software defects. While defects that impact individuals are lesser in impact, they still cause inconvenience to users and can lead to loss of brand name or even legal issues for the organization. Let us now look at some defects that impact the society at large. Impact on Society For example in the railways, a bug in the automated system could lead to train collisions and a loss of life and property. Similarly, defects in airline software, nuclear reactors, or stock exchange software can have a huge impact on the public. In the following section, we will discuss the causes of software defects. Causes of Software Defects Mistakes or errors are made by software developers during production and cause defects in the software. These defects lead to software failure. The software has chances of errors as they are manually designed. The errors produce defects or bugs in the software. These defects can be introduced during the coding phase of the software and throughout the development lifecycle. In the development life cycle, errors can occur at the beginning phase where requirements are understood, written, or designed. Errors can also result from a mistake while porting the application into production. If the faulty system is executed, it might cause a failure. However, every mistake does not lead to a defect, neither does every defect lead to a failure. Sometimes, defects lie dormant within the software till they are triggered. We will discuss this in the following sections. Causes of Software Defects (contd.) Let us look at the standard causes that introduce defects into the software. First is poorly documented requirements. Since requirements are the starting point in software development, any defect introduced at this phase gets inbuilt into the subsequent phases. Often requirements are not clearly thought and contain gaps in the thought process. Even if requirements are clearly understood, the way they are defined can lead to defects. Also clearly defined documents, when handed to different teams, can often lead to different interpretations if teams are not trained to understand requirement documents. Often, insufficient time is provided during development to complete coding and testing. This is due to the business demands of launching the application in the market. This leads to defects being introduced and missed out during the testing phase. Other common causes of defects include complex architecture or code, lack of domain knowledge, and technical limitations like programming language constraints. Let us find out the consequences of software defects in the following section. Unleash a High-paying Career in DevOps! Caltech Program in DevOpsExplore Program Consequences of Software Defects It can be argued that if a mistake does not lead to a defect or a defect does not lead to failure; then the mistake is unimportant. For example, due to an error in the software that controls the traffic signals at a busy crossroad, all the directions see the red signal between 00:00 AM to 0:15 AM every day. This may not lead to a failure as signals are set as blinking orange light during this period. However, if the same error sets the green signal between 12:00 Noon to 12:15 PM every day, this leads to a signaling failure and may cause significant accidents. After understanding the different aspects of software defects, let us move on to the next topic, ‘Overview of Software Testing,’ in the following section. Overview of Software Testing In the next few sections, you will get an overview of software testing and discuss the standard terms, roles, objectives, and principles of software testing. Read more: How to Build a Career in Software Testing? Let us begin with defining software testing in the following section. Definition of Software Testing While testing has no single standard definition, some popular ones are: Glenford J Myers; an American author, computer scientist, and entrepreneur; defines testing as—“the process of executing a program or part of a program with the intention of finding errors.” Institute of Electrical and Electronic Engineers (IEEE 83a) standard defines testing as—“the process of exercising or evaluating a system or system component by manual or automated means to verify that it satisfies specified requirements.” Another definition of testing states that—“testing is the process of analyzing a system to detect the difference between existing and required conditions and to evaluate the features of the system.” To sum up, software testing is the act of “verifying if the software behavior is as expected.” After defining software testing, let us look at why it is needed in the next section. Need for Software Testing A study conducted by National Institute of Standards and Technology (NIST) in 2002 reported that software bugs cost the U.S. economy 59.5 billion dollars annually. More than one-third of this cost could be avoided if better software testing was performed. Therefore testing is necessary as some errors can turn out to be expensive or dangerous. Every product needs to be checked to ensure there are no errors. If developers check their own product, there are chances that they might miss errors due to bad assumptions or blind spots. It is advisable to get the product checked by another individual who was not involved in product development. It is important to check the severity of the error and its consequences, as well. For software systems, some errors are important while others are not. You need to determine the impact of a software error. For this, consider the context within which the different software systems operate. Now that we have established the need for software testing let us list some common software testing terms in the following section. Learn from Experts in the Industry! DevOps Engineer Masters ProgramExplore Program Common Testing Terms The terms commonly used in testing are the following: Debugging Debugging is a part of the development activity that identifies, analyzes, and removes defects. Debugging is performed by Developers on their piece of code. Testing Testing is the activity of identifying defects and is performed by Testers. Testing is done by testers in an environment similar to production. There are different kinds of software testing levels, types, and techniques. These two terms, Debugging and Testing, are often confused and used interchangeably. However, they are not the same and are used by separate teams to identify different kinds of defects. Review A review can be performed on deliverables like documents, code, test plan, and test cases. While testing can only be done when the executable code is ready, reviews can be done on different kinds of documents and at all stages of development. Reviews are commonly referred to as a static testing technique as they are done without executing the code. Reviews are very important for each software or product as finding a defect early will reduce its development cost and time. In the next section, let us discuss the roles of software testing. Role of Software Testing Rigorous testing is necessary during software development and maintenance to Identify defects Reduce failures in the operational environment Increase quality of the operational system. meet contractual or legal requirements Meet industry-specific standards, which may specify the type of techniques that must be used or the percentage of the software code that must be executed. In the following section, we will look at the objectives of software testing. Objectives of Software Testing Following are the objectives of software testing: Finding defects which prevent the probability of their occurrence in production Gaining confidence in the quality of the software application. Providing information helps GO or NO GO decision-making while moving to the next phase. Defect analysis in one phase can also help identify the root cause and prevent defects in the subsequent phases. Let us now find out the objectives of different types of testing in the next section. Objectives of Different Testing Types Each type of testing has its specific objectives. Let us look at the different types of testing and their respective objectives. Development Testing The objective of development testing, also known as a unit or component testing, is to find maximum defects early in the development lifecycle. Fixing the defects at an early stage saves defect leakage cost and time. User Acceptance Testing User acceptance testing is performed with the objective of confirming whether the system works, as expected by the end users. This is the final stage of testing before deploying the code to production. Maintenance Testing The objective of Maintenance testing is to ensure no new defects have been introduced, especially in the case of enhancements and/or defect fixes. Operational Testing The objective of Operational testing is to ensure reliability and performance. Software should be tested to check whether it works satisfactorily even with the maximum expected workload. Let us discuss the seven principles of testing in the next section. Seven Principles of Testing There are seven principles of testing, which have evolved over 40 years and can be used as a general guideline for all testing. First Principle The first principle states that testing can show that defects are present; however cannot prove that there are no defects. Testing reduces the probability of residual defects or defects remaining in the software. Even if no defects are found, it does not mean that the system is 100% defect free. Exhaustive testing, also known as complete testing, is a test approach in which the test suite comprises all combinations of input values and preconditions. Second Principle The second principle states that testing all combinations of inputs and preconditions is not feasible, except in trivial cases. Instead, risks and priorities are used to focus on testing efforts. Third Principle