Upcoming SlideShare
Loading in...5







Total Views
Slideshare-icon Views on SlideShare
Embed Views



1 Embed 1 1



Upload Details

Uploaded via as Microsoft PowerPoint

Usage Rights

© All Rights Reserved

Report content

Flagged as inappropriate Flag as inappropriate
Flag as inappropriate

Select your reason for flagging this presentation as inappropriate.

  • Full Name Full Name Comment goes here.
    Are you sure you want to
    Your message goes here
Post Comment
Edit your comment

    Ch9-2-testability.ppt Ch9-2-testability.ppt Presentation Transcript

    • Introduction to Software Testing Chapter 9.2 Challenges in Testing Software – Software Testability Paul Ammann & Jeff Offutt
    • Chapter 9 Outline
      • Testing for Emergent Properties: Safety and Security
      • Software Testability
      • Test Criteria and the Future of Software Testing
      Introduction to Software Testing (Ch 9.2) © Ammann & Offutt Software Testability
    • Testability Overview
      • Testability is distinct from software testing
      • General definition :
      Introduction to Software Testing (Ch 9.2) © Ammann & Offutt An estimate or measurement of a conditional probability – assuming that a software artifact contains a fault, how likely is it that testing will reveal that fault ?
      • What do we do with testability estimates ?
        • Pay more attention to components with low testability – code reviews, formal analysis, stronger test criteria
        • Modify low testability components to increase their testability
        • We have more confidence in components with high testability
        • Risk analysis – low testability components represent risk that management needs to be aware of
    • Model of Testability Introduction to Software Testing (Ch 9.2) © Ammann & Offutt If a program has a fault, how difficult will it be to find a test that causes a failure ? Impractical to measure Simple model Out failure causing Inputs P Testability = | failure causing | | Input | X 100 %
    • Approximating Testability Introduction to Software Testing (Ch 9.2) © Ammann & Offutt Testability can be approximated with the RIP model and mutation Sensitivity ( X ) = R * I * P Testability ( P ) = F (Sensitivity ( X )), for all X in P Given a location X in a program P P: entry X exit Induce faults (mutants) R = % inputs from some distribution that reach X I = % inputs that cause a fault to infect (average over N faults) P = % infected states that propagate to output
    • Issues in Approximating Testability
      • Reasonable input distribution ?
      • How to induce faults ?
        • What faults ?
      • How to measure propagation ?
        • Expensive!
      • Information hiding reduces propagation
      • Assertion checking can be used to increase testability
      Introduction to Software Testing (Ch 9.2) © Ammann & Offutt
    • Testability of OO Software
      • Information hiding decreases testability
        • State information is saved in instance variables
        • No direct access to instance variables
      • Inheritance compounds the problem
        • Instance variables are defined in ancestor classes – harder to get to
      • These are primarily issues of observability
      • Increasing observability in OO software :
        • Require additional get ( ) methods – must be done during development
        • Use Java reflection to access internal variables – hard to interpret the data values
      • This is an area of ongoing research
      Introduction to Software Testing (Ch 9.2) © Ammann & Offutt
    • Testability of Web Applications
      • Both controllability and observability are very low
      • User interface and most software components distributed on different computers
        • Server software may be distributed even further
      • Most communication is through message passing
      • Much of the inter- component communication goes through the client
        • Stateless HTTP messages
      • State is kept in an unusual combination of technologies
        • Cookies and session objects
      Introduction to Software Testing (Ch 9.2) © Ammann & Offutt Testability in web applications is still very much an open research area
    • Testability Summary
      • Testability can give valuable information to testers, managers and developers
      • Testability is often thought of as combining two characteristics of software
        • Controllability and observability
      • Measuring testability is a very technical task
      Introduction to Software Testing (Ch 9.2) © Ammann & Offutt How best to measure testability is still an open research problem