300 likes | 352 Views
Understand software testing principles, from quality conformance to defect prevention, to enhance product quality and customer satisfaction. Learn how to balance defect detection and prevention, automate testing intelligently, and test effectively throughout the software lifecycle for optimal results.
E N D
Testing Fundamentals In God we trust, everything else we test
It may be acceptable to say that 99.9% of defects are fixed in a product for a release, and only 0.1% defects are outstanding. It appears to be an excellent statistics to go ahead and release the product. However, • if we map the 0.1% failure in mission critical applications, the data will look like this. • A total of 10,000incorrect surgery operations per week. • Three airplane crashes every day. • No electricity for five hours every week. Principles of Testing
What is “quality”? Principles of Testing
Two Different Interpretations of “Quality” • “Quality of design” or “grade quality” • More features for more money • E.g., A BMW vs Maruti 800 • “Quality of conformance” • How well does the product meet the “promised” needs? Principles of Testing
Our Definition:Quality of Conformance “Quality” is meeting the requirements consistently and predictably. Principles of Testing
Relationship of effectiveness of testing to quality of other phases Principles of Testing
Principles of Testing • 1. The goal of testing is to find defects before customers find them out. • 2. Exhaustive testing is not possible; program testing can only show the presence of defects, never their absence. • 3. Testing applies all through the software life cycle and is not an end of- cycle activity. • 4. Understand the reason behind the test. • 5. Test the tests first. • 6. Tests develop immunity and have to be revised constantly. Principles of Testing
Principles of Testing • 7. Defects occur in convoys or clusters, and testing should focus on these convoys. • 8. Testing encompasses defect prevention. • 9. Testing is a fine balance of defect prevention and defect detection. • 10. Intelligent and well-planned automation is key to realizing the benefits of testing. • 11. Testing requires talented, committed people who believe in themselves and work in teams. Principles of Testing
Principle #1 • A product should meet the customers’ needs. • Customers need not be “external” customers. • Testers are customers for developers. • A software should be “testable.” Testing should identify defects before the customer finds them out! Principles of Testing
Exhaustive testing is not possible; Program testing can never prove the absence of bugs, only their presence. Principle #2 • The “6-character” problem • Choose your tests intelligently. • Choose tests that have a higher probability of uncovering defects. Principles of Testing
Testing applies all through the software life cycle and is not an end of - cycle activity. Principle #3 Principles of Testing
Principle #3 How defects from early phases add to the costs. Principles of Testing
Defects should be detected and corrected at the earliest – postponing detection of defects compounds cost! Principle #3 Principles of Testing
Knowing why you are testing something is as important as knowing what you are testing. Understand the reason behind the test. Principle #4:The Cat and the Saint Principles of Testing
Principle #4:Implications • White box testing • Starting from code • Black box testing • Starting from external functionality • Integration testing • Stuff works together! • System / performance testing • Works in real-life conditions • Regression testing • Makes sure changes don’t affect existing stuff • Domain / ad hoc testing • Bringing domain expertise into testing Principles of Testing
Test the tests first! A defective test is even more dangerous than a defective product! Principle #5 Principles of Testing
Bugs are like bacteria – they develop resistance to antibiotics; new antibiotics have to be developed! Tests develop immunity and have to be revised constantly. Principle #6:The Pesticide Paradox Principles of Testing
Principle #6:Implications • We need to redefine and refine tests as we move forward. • As we “pass” old tests, new defects will surface. Principles of Testing
Principle #7:The Rags and the Convoy Principles of Testing
Defects come in convoys ; Testing should focus on these convoys. Fixing a defect in the convoy is likely to add more defects to it. Principle #7: Principles of Testing
Principle #7:Implications • Look for side effects. • Tie maintenance and testing functions closely. Principles of Testing
Prevention is better than cure – prevention can substantially open new vistas Principle #8:Cop on the Bridge Testing encompasses defect prevention. Principles of Testing
Prevention and Cure:Quality Assurance vs Quality Control • Quality assurance • Process oriented • Defect prevention oriented • Proactive • Staff function • Quality control • Product oriented • Defect detection / correction oriented • Reactive • Line function Principles of Testing
Principle #8 Leads to Principle #9: Principles of Testing
Principle #9:Ends of a Pendulum Testing is a fine balance of defect prevention and defect detection. Principles of Testing
Principle #8 and #9:Implications • Achieve a balance between defect prevention (quality assurance) and defect detection (quality control). • View QA and QC as supplementary and not adversary job functions. • Distribute QA / QC functions throughout for early detection (Principle #1). Principles of Testing
Focus on WHAT you want to automate; relate it to the goals. Remember: automation is not a panacea. Principle #10:Automation Syndrome Intelligent and well-planned automation is key to realizing the benefits of testing. Principles of Testing
Principle #11:The Men in Black • The IBM experiment (Peopleware, DeMarco & Lister) Testing requires talented, committed people who believe in themselves and work in teams. Principles of Testing
Putting It All Together… • #: The goal of testing is to find defects BEFORE customers find them. • #: Program testing can only show the presence of bugs, never their absence. • #: Test early and often. • #: Understand the “why” and not just the “what” / “how”. • #: Test the tests first. • #: Bugs develop immunity – discover new tests! • #: Focus on convoys of defects. • #:Testing encompasses defect prevention. • #: Strike a fine balance between defect prevention and defect detection. • #: Plan the automation initiatives. • #: Instill pride in testers. Principles of Testing