1. Fundamentals of Testing1.1. What is Testing?1.1.1 Typical Objectives of Testing 1.1.2 Testing and Debugging
1 Fundamentals of Testing
1.1 What is Software Testing?
Software testing is defined as an activity to check whether the actual results match the expected results and to ensure that the software system is Defect free. It involves the execution of a software component or system component to evaluate one or more properties of interest.
Testing involving the execution of the component or system being tested
Testing that does not involve the execution of the component or system being tested
1.1.1 Typical Objectives of Testing
- To evaluate work products such as requirements, user stories, design, and code
- To verify whether all specified requirements have been fulfilled
- To validate whether the test object is complete and works as the users and other stakeholders expect
- To build confidence in the level of quality of the test object
- To prevent defects
- To find failures and defects
- To provide sufficient information to stakeholders to allow them to make informed decisions, especially regarding the level of quality of the test object
- To reduce the level of risk of inadequate software quality (e.g., previously undetected failures occurring in operation)
- To comply with contractual, legal, or regulatory requirements or standards, and/or to verify the test object’s compliance with such requirements or standards
1.1.2 Testing and DebuggingTesting is a process of finding bugs or errors in a software product that is done manually by the tester or can be automated.
Debugging is a process of fixing the bugs found in the testing phase. Programmer or developer is responsible for debugging and it can’t be automated.
1.2 Why is software testing necessary?
It is common that software systems due to the presence of defects when delivered caused failures or not meeting the stakeholder requirements. This is where the importance of software testing comes. Testing can reduce the frequency of such defects.
1.2.1 Testing’s Contributions to Success
1. Software testing reduces the risk of incorrect or untestable functionality being developed.
1. Saves Money: Bugs caught in earlier stages of development can save a lot of money for the business. Without testing major bugs in the software remains uncaught which can lead to major losses for the Business.2. Adding Security: Software testing checks for security vulnerabilities so that added security improves the quality of a software. Thus making it trustworthy for the end-users.3. Product Quality: Software Testing ensures the product brings the value it has promised to the customers and the best customer experience.4. Customer Satisfaction: Software testing provides the ultimate goal of a product owner, customer satisfaction. It ensures to bring the best user experience that leads to customer satisfaction.
1.2.2 Quality Assurance and Testing
Test activities are part of the overall software development or maintenance process. Since quality assurance is concerned with the proper execution of the entire process, quality assurance supports proper testing. Testing contributes to the achievement of quality in a variety of ways.
QA is a process, while testing is an activity embedded within QC. While the goal of QA and QC is to have a quality product in the end, both use different approaches and tools. Other activities that contribute to quality in addition to testing include groomings, plannings, and code reviews
- QA is process-oriented: Ensuring the processes used to manage and create deliverables work to prevent defects. QA uses audits and metrics as tools to monitor these processes.
- QC is product-oriented: The processes, tools, and people focused on detecting defects. QC determines whether the end result matches expectations.
https://www.devbridge.com/articles/are-we-quality-assurance-or-testers/ , Rasa Mazutiene 03/15/2017
Quality Assurance and testing are related terms but not the same.
1.2.3 Errors, Defects, and Failures
ERROR: An error is a mistake, misconception, or misunderstanding on the part of a human
DEFECT: It can be simply defined as a variance between expected and actual.
FAILURE: A failure is the inability of a software system or component to perform its required functions within specified performance requirements.
A human being can make an error, which produces a defect in a program code document. If a defect in the code is executed, the system may fail to function properly causing a failure.
1.2.4 Defects, Root Causes, and Effects
The root cause is the earliest action/condition that contributed to defects. Defects can be analyzed to identify their root causes, so as to reduce the occurrence of similar defects in the future. The consequences of the defects are called effects. For example, customer complaints due to the failure of software due to defects.
1.3 Seven Testing Principles
1. Testing shows the presence of defects, not their absence
Testing can show that defects are present, but cannot prove that there are no defects. Testing reduces the probability of undiscovered defects remaining in the software but, even if no defects are found, testing is not a proof of correctness.
2. Exhaustive testing is impossible
Testing everything is not feasible except for trivial cases. Rather than attempting to test exhaustively, risk analysis, test techniques, and priorities should be used to focus on test efforts.
3. Early testing saves time and money
To find defects early, both static and dynamic test activities should be started as early as possible in the software development lifecycle. Early testing is sometimes referred to as a shift left. Testing early in the software development lifecycle helps reduce or eliminate costly changes
4. Defects cluster together
A small number of modules usually contains most of the defects discovered during pre-release testing or is responsible for most of the operational failures. Predicted defect clusters and the actually observed defect clusters in test or operation are an important input into a risk analysis used to focus the test effort
5. Beware of the pesticide paradox
If the same tests are repeated over and over again, eventually these tests no longer find any new defects. To detect new defects, existing tests and test data may need changing, and new tests may need to be written. In some cases, such as automated regression testing, the pesticide paradox has a beneficial outcome, which is the relatively low number of regression defects.
6. Testing is context-dependent
Testing is done differently in different contexts. For example, safety-critical industrial control software is tested differently from an e-commerce mobile app. As another example, testing in an Agile project is done differently than testing in a sequential lifecycle project
7. Absence-of-errors is a fallacy
Some organizations expect that testers can run all possible tests and find all possible defects, but principles 2 and 1, respectively, tell us that this is impossible. Further, it is a fallacy (i.e., a mistaken belief) to expect that just finding and fixing a large number of defects will ensure the success of a system. For example, thoroughly testing all specified requirements and fixing all defects found could still produce a system that is difficult to use, that does not fulfill the users’ needs and expectations, or that is inferior compared to other competing systems.