Software Testing Training - Session 2

Jul 3, 2024

Software Testing Training - Session 2

Why is Testing Necessary?

  • Defect Impact: Defects can lead to harm to individuals or organizations.
    • Example: Defective road traffic control systems can lead to accidents, even causing deaths.
  • Monetary Impact: Defects can cause financial losses.
    • Example: If e-commerce sites like eBay or Amazon go down, they face massive revenue losses.
  • Quality Improvement: Testing identifies defects, which when fixed, improve software quality.
  • Risk Reduction: Proper testing of software reduces risks by identifying and fixing defects early.
  • Human Error: Humans make mistakes during development, and testing helps catch these mistakes.
    • Minor errors may not affect much, but critical applications like hospital or air traffic control systems must be tested thoroughly.

Software Systems Context

  • Personal Blogs: Errors don’t impact others significantly.
  • Business Websites: Errors can make the company appear unprofessional.
  • Banking Applications: Errors affect bank credibility; these systems must be reliable.
  • Air Traffic Control Systems: Must be thoroughly tested to ensure safety.

Causes of Software Defects

  • Requirement Phase: Mistakes in gathering requirements.
  • Design Phase: Flaws introduced during design.
  • Coding Phase: Errors during development.
  • Mistakes at any phase in the Software Development Life Cycle (SDLC) can introduce defects, known as bugs.

When Do Defects Arise?

  • Defects can arise in any phase: requirements, design, or development.
  • Different scenarios:
    1. Requirement Correct: Design and development are correct, leading to correct software.
    2. Development Error: Correct requirements and design, but errors in coding lead to defects.
    3. Design Error: Correct requirements, but flawed design leads to defects, which are hard to fix.
    4. Requirement Error: Incorrect requirements lead to fundamentally flawed software that meets design but not actual needs. These defects are identified in the User Acceptance Test (UAT) phase.

Cost of Defects

  • Early Detection: Less costly if defects are found in the requirements phase.
  • Late Detection: Cost increases exponentially if defects are detected in later stages like coding or production.
  • Graph: Shows cost increasing from requirements, through design, coding, testing, to production.

Role of Testing

  • Development and Maintenance: Identifies defects and ensures a higher quality product.
  • Operational Risk: Testing replicates operational environments to reduce the risk of failures.
  • Contractual and Legal: Some software must meet legal standards (e.g., air traffic control).

Testing and Quality

  • Measure Quality: Testing identifies and helps fix defects, thus measuring software quality.
  • Confidence in Software: Reduced defects over time increase confidence in software quality.
  • Test Design: Well-designed tests uncover most defects, improving quality.

Software Quality (ISTQB Definition)

  • Quality is meeting specified requirements and user needs.
  • Stakeholder Views: Developers focus on specifications and few defects, while stakeholders also look at value for money.
  • Attributes of Quality: Fit for use, development process, value for money.

Root Cause Analysis

  • Identify Causes: Find the real reason for failures (e.g., network issues, server downtime).
  • Brainstorming: Team assesses potential causes and categorizes them to find solutions.

How Much Testing is Enough?

  • Exhaustive Testing Impossible: Testing every scenario is impractical due to the vast number of possible inputs.
  • Risk Assessment: Testing effort is based on the risk associated with the software modules.
    • Minimal for personal blogs, rigorous for critical applications.

Summary

  • Necessary due to potential harm and monetary loss.
  • Defects arise from human errors in various SDLC phases.
  • Early detection of defects is cheaper.
  • Testing ensures high-quality software, reduces operational risks, and meets legal requirements.

Thank you.