Why testing is neccessary (Causes of software defects ( consider defects…
Why testing is neccessary
Testing and quality
What is quality?
What we as software developers and testers may see as quality - that the software meets its defined specification, is technically excellent and has few bugs in it - may not provide a quality solution for our customers
Projects aim to deliver software to specification
Customer and developer quality view may differ from each other
Testing can give confidence in the quality of the software if it finds few or no defects, provided we are happy that the testing is sufficiently rigorous.
Testing helps us to measure the quality of software in terms of the number of defects found, the tests run, and the system covered by the tests
What is root cause analysis?
Root cause can be traced as the reason of the system failure
Developers should not confined to only software, also consider the failure of the system as a whole(include hardware, firmware, external cause,...)
With root cause confirmed, it is possible to correct the defect or work around the cause
Developer should also consider the failure and cause from other project to further improve the system
Role of testing in software development, maintenance and operations
We may also be required to carry out software testing to meet contractual or legal requirements, or industry-specific standards
Executing tests helps us move towards improved quality of product and service, but that is just one of the verification and validation methods applied to products
Rigorous testing is necessary during development and maintenance to identify defects, in order to reduce failures in the operational environment and increase the quality of the operational system
Causes of software defects
What is the cost of defects?
if an error is made and the consequent defect is detected in the requirements at the specification stage, then it is relatively cheap to find and fix
The cost of finding and fixing defects rises considerably across the life cycle
When do defects arise
assessments of thousands of projects have shown that defects introduced during requirements and design make up close to half of the total number of defects
we built exactly what we were told to but unfortunately the designer made some mistakes so there are defects in the design
these are easily spotted and corrected during testing, because we can see the product does not meet its design specification
functionally, it does what it is supposed to do and it also has the right non-functional attributes, so it is fast enough, easy to understand and so on
consider defects and failures arising
potential consequences of earlier errors, intentional damage, defects and failure
errors in use of the system
errors in the specification, design and implementation of the software and system;
failures may also be caused by someone deliberately trying to cause a failure in a system - malicious damage
Failures can also be caused by environmental conditions as well
Do our mistakes matter?
Our mistakes are also important because software systems and projects are complicated
the mistakes we make matter partly because they have consequences for the products for which we are responsible.
Not all defects result in failures; some stay dormant in the code and we may never notice them
When the software code has been built, it is executed and then any defects may cause the system to fail to do what it should do (or do something it shouldn't), causing a failure
people also design and build the software and they can make mistakes during the design and build
Sofware system context
A risk is something that has not happened yet and it may never happen; it is a potential problem
Testing is done differently in different context
Not all software systems carry the same level of risk and not all problems have the same impact when they occur
How much testing is enough?
Choice for testing
Testing amount must correspond with customer time, budget and expectation
Managing and assessing risk decide the amount and effort of the testing procedure