Software Quality Engineering - - PDF document

software quality
SMART_READER_LITE
LIVE PREVIEW

Software Quality Engineering - - PDF document


slide-1
SLIDE 1
✂ ✄ ✄☎ ✆ ✝ ✞ ☎ ✟ ✠ ✄ ✡ ✝ ✟ ☛ ☞ ✌ ✍ ✎ ✏ ✍✑ ✒ ✑ ✓ ☛ ☛ ✔ ✕ ✖ ✖ ✗ ✗ ✗✙✘ ✚ ✝ ✘ ✛ ✂ ✄ ✄☎ ✝ ✂ ✘ ✚✜ ✖✣✢ ✚ ✟ ✝ ✚ ✑ ✒ ✑

CISC 323: Intro to Software Engineering

Software Quality

slide-2
SLIDE 2 ✒ ✁ ✂ ✄ ✄☎ ✆ ✝ ✞ ☎ ✟ ✠ ✄ ✡ ✝ ✟ ☛ ☞ ✌ ✍ ✎ ✏ ✍✑ ✒ ✑ ✓ ☛ ☛ ✔ ✕ ✖ ✖ ✗ ✗ ✗✙✘ ✚ ✝ ✘ ✛ ✂ ✄ ✄☎ ✝ ✂ ✘ ✚✜ ✖✣✢ ✚ ✟ ✝ ✚ ✑ ✒ ✑

What Does Quality Mean?

  • Operational meanings:

– Software does what is wanted and expected – On budget and on schedule – Users are happy – Level of bugginess is tolerable – Changes are not too expensive – Software is cost-effective in use and supports

  • rganizational mandate
slide-3
SLIDE 3 ✑ ✁ ✂ ✄ ✄☎ ✆ ✝ ✞ ☎ ✟ ✠ ✄ ✡ ✝ ✟ ☛ ☞ ✌ ✍ ✎ ✏ ✍✑ ✒ ✑ ✓ ☛ ☛ ✔ ✕ ✖ ✖ ✗ ✗ ✗✙✘ ✚ ✝ ✘ ✛ ✂ ✄ ✄☎ ✝ ✂ ✘ ✚✜ ✖✣✢ ✚ ✟ ✝ ✚ ✑ ✒ ✑

Definitions of Quality

  • OED: the standard of something when compared to other

things like it (a wine of excellent quality); of high quality, general excellence

  • Crosby: zero defects
  • ISO: The totality of features and characteristics of a product
  • r service that bear on its ability to satisfy specified or implied

needs.

  • Juran: Fitness for Purpose
  • DoD: The degree to which the attributes of the software

enable it to perform its intended end use.

slide-4
SLIDE 4
✂ ✄ ✄☎ ✆ ✝ ✞ ☎ ✟ ✠ ✄ ✡ ✝ ✟ ☛ ☞ ✌ ✍ ✎ ✏ ✍✑ ✒ ✑ ✓ ☛ ☛ ✔ ✕ ✖ ✖ ✗ ✗ ✗✙✘ ✚ ✝ ✘ ✛ ✂ ✄ ✄☎ ✝ ✂ ✘ ✚✜ ✖✣✢ ✚ ✟ ✝ ✚ ✑ ✒ ✑

Quality is Relative

  • Rolls Royce: quality when cost is no object
  • Ford Taurus: quality tradeoffs when cost

is a factor

  • Mini: minimum acceptable quality when

cost is the dominant factor.

  • Costs include initial cost, cost of operation, and

cost of repairs.

slide-5
SLIDE 5
✂ ✄ ✄☎ ✆ ✝ ✞ ☎ ✟ ✠ ✄ ✡ ✝ ✟ ☛ ☞ ✌ ✍ ✎ ✏ ✍✑ ✒ ✑ ✓ ☛ ☛ ✔ ✕ ✖ ✖ ✗ ✗ ✗✙✘ ✚ ✝ ✘ ✛ ✂ ✄ ✄☎ ✝ ✂ ✘ ✚✜ ✖✣✢ ✚ ✟ ✝ ✚ ✑ ✒ ✑

Quality -- General

  • is multidimensional (all aspects of a car)
  • is subject to constraints (e.g. cars must fit on

roads)

  • is about acceptable compromises (e.g. poorer

ride for lower cost)

  • criteria are not independent (e.g. fuel use vs.

vehicle weight)

  • is not absolute (all levels of cars have quality)
slide-6
SLIDE 6
✂ ✄ ✄☎ ✆ ✝ ✞ ☎ ✟ ✠ ✄ ✡ ✝ ✟ ☛ ☞ ✌ ✍ ✎ ✏ ✍✑ ✒ ✑ ✓ ☛ ☛ ✔ ✕ ✖ ✖ ✗ ✗ ✗✙✘ ✚ ✝ ✘ ✛ ✂ ✄ ✄☎ ✝ ✂ ✘ ✚✜ ✖✣✢ ✚ ✟ ✝ ✚ ✑ ✒ ✑

Characteristics of Software

  • not physical
  • needs are usually uncertain
  • needs change
  • platforms change (CPUs, OS, network)
  • high expectations, especially of adaptability
slide-7
SLIDE 7
✂ ✄ ✄☎ ✆ ✝ ✞ ☎ ✟ ✠ ✄ ✡ ✝ ✟ ☛ ☞ ✌ ✍ ✎ ✏ ✍✑ ✒ ✑ ✓ ☛ ☛ ✔ ✕ ✖ ✖ ✗ ✗ ✗✙✘ ✚ ✝ ✘ ✛ ✂ ✄ ✄☎ ✝ ✂ ✘ ✚✜ ✖✣✢ ✚ ✟ ✝ ✚ ✑ ✒ ✑

Changing Approaches to Software Quality

  • increasing use of metrics
  • increasing emphasis on process, components

and intermediate products, as opposed to the end product

  • software crisis persists, but progress is being

made

slide-8
SLIDE 8
✂ ✄ ✄☎ ✆ ✝ ✞ ☎ ✟ ✠ ✄ ✡ ✝ ✟ ☛ ☞ ✌ ✍ ✎ ✏ ✍✑ ✒ ✑ ✓ ☛ ☛ ✔ ✕ ✖ ✖ ✗ ✗ ✗✙✘ ✚ ✝ ✘ ✛ ✂ ✄ ✄☎ ✝ ✂ ✘ ✚✜ ✖✣✢ ✚ ✟ ✝ ✚ ✑ ✒ ✑

Dimensions of Quality

  • A Partial List:

– Timeliness – Functionality – Cost – Correctness – Reliability – Maintainability

slide-9
SLIDE 9
✂ ✄ ✄☎ ✆ ✝ ✞ ☎ ✟ ✠ ✄ ✡ ✝ ✟ ☛ ☞ ✌ ✍ ✎ ✏ ✍✑ ✒ ✑ ✓ ☛ ☛ ✔ ✕ ✖ ✖ ✗ ✗ ✗✙✘ ✚ ✝ ✘ ✛ ✂ ✄ ✄☎ ✝ ✂ ✘ ✚✜ ✖✣✢ ✚ ✟ ✝ ✚ ✑ ✒ ✑

Quality - Software

  • is multidimensional (portability, usability, functionality)
  • is subject to constraints (regulations, rules,

resources)

  • is about acceptable compromises (e.g. less

functionality / lower cost)

  • criteria are not independent (e.g. efficiency vs

maintainability)

  • is not absolute (different levels of quality are

acceptable for different software types

slide-10
SLIDE 10
✂ ✄ ✄☎ ✆ ✝ ✞ ☎ ✟ ✠ ✄ ✡ ✝ ✟ ☛ ☞ ✌ ✍ ✎ ✏ ✍✑ ✒ ✑ ✓ ☛ ☛ ✔ ✕ ✖ ✖ ✗ ✗ ✗✙✘ ✚ ✝ ✘ ✛ ✂ ✄ ✄☎ ✝ ✂ ✘ ✚✜ ✖✣✢ ✚ ✟ ✝ ✚ ✑ ✒ ✑

How can the Dimensions of Quality be assured?

  • by establishing and enforcing a process
  • process must include measurement
  • by making sure everyone understands the qualities

that must be embedded in the product

  • by keeping focused on the relevant qualities

throughout the development lifecycle

  • by determining “up front” how to achieve each

quality

  • verification and validation
slide-11
SLIDE 11
✂ ✄ ✄☎ ✆ ✝ ✞ ☎ ✟ ✠ ✄ ✡ ✝ ✟ ☛ ☞ ✌ ✍ ✎ ✏ ✍✑ ✒ ✑ ✓ ☛ ☛ ✔ ✕ ✖ ✖ ✗ ✗ ✗✙✘ ✚ ✝ ✘ ✛ ✂ ✄ ✄☎ ✝ ✂ ✘ ✚✜ ✖✣✢ ✚ ✟ ✝ ✚ ✑ ✒ ✑

Cost of Quality

  • prevention
✂ ✄ ☎ ✆ ✝ ✞ ✟ ☎ ✄✠ ✠ ✆ ✠ ✡ ☛ ☞✍✌ ✎ ✏ ✄ ☎ ✝ ✑✒ ✓ ✠ ✆ ✒ ✄ ☎ ✎ ✑ ✔ ✆ ✑ ✕ ✖ ☛ ✝ ✑ ✖ ✝ ✑ ✁ ✂ ✆ ✟ ✏ ✑ ✠ ✝ ☛ ✝ ✎ ✄ ✆ ✠ ✆ ✠ ✡
  • appraisal
☛ ✆ ✠ ✗ ✟ ✎ ✌ ✒ ✑ ✖ ✖ ✘ ✆ ✠ ✝ ✑ ✎ ✟ ✎ ✌ ✒ ✑ ✖ ✖ ✆ ✠ ✖ ✟ ✑✒ ✝ ✆ ✌ ✠ ☛ ✑ ✁ ✂ ✆ ✟ ✏ ✑ ✠ ✝ ✒ ✄ ☎ ✆ ✙ ✎ ✄ ✝ ✆ ✌ ✠ ✘ ✏ ✄ ✆ ✠ ✝ ✑ ✠ ✄✠ ✒ ✑ ☛ ✝ ✑ ✖ ✝ ✆ ✠ ✡
  • failure - internal
☛ ✎ ✑ ✕ ✌ ✎ ✚ ☛ ✎ ✑ ✟ ✄ ✆ ✎ ☛ ☞ ✄ ✆ ☎✛✂ ✎ ✑ ✏ ✌ ✜ ✑ ✄✠ ✄ ☎ ✞ ✖ ✆ ✖
  • failure - external
☛ ✒ ✌ ✏ ✟ ☎ ✄ ✆ ✠ ✝ ✎ ✑ ✖ ✌ ☎✛✂ ✝ ✆ ✌ ✠ ☛ ✟ ✎ ✌ ✜✛✂ ✒ ✝ ✎ ✑ ✝ ✂ ✎ ✠ ✘ ✎ ✑ ✟ ☎ ✄ ✒ ✑ ✏ ✑ ✠ ✝ ☛ ✓ ✑ ☎ ✟ ☎ ✆ ✠ ✑ ✖ ✂ ✟ ✟ ✌ ✎ ✝ ☛ ✕ ✄ ✎ ✎ ✄✠ ✝ ✞ ✕ ✌ ✎ ✚
slide-12
SLIDE 12
✂ ✄ ☎ ☎✆ ✝ ✞ ✟ ✆ ✠ ✡ ☎ ☛ ✞ ✠ ☞ ✌ ✍ ✎ ✏ ✑ ✎✒ ✁ ✒ ✓ ☞ ☞ ✔ ✕ ✖ ✖ ✗ ✗ ✗✙✘ ✚ ✞ ✘ ✛ ✄ ☎ ☎✆ ✞ ✄ ✘ ✚✜ ✖✣✢ ✚ ✠ ✞ ✚ ✒ ✁ ✒

Views of Quality (not software specific)

  • Transcendental: “eureka!”, “the ideal”
  • User: fitness for purpose
  • Manufacturing: conformance to spec
  • Product: characteristics of the product
  • Value-based: willingness to pay
slide-13
SLIDE 13
✂ ✄ ☎ ☎✆ ✝ ✞ ✟ ✆ ✠ ✡ ☎ ☛ ✞ ✠ ☞ ✌ ✍ ✎ ✏ ✑ ✎ ✁✒ ✁ ✓ ☞ ☞ ✔ ✕ ✖ ✖ ✗ ✗ ✗✙✘ ✚ ✞ ✘ ✛ ✄ ☎ ☎✆ ✞ ✄ ✘ ✚✜ ✖✣✢ ✚ ✠ ✞ ✚ ✁✒ ✁

User View

  • can be highly personalized
  • typical user views:

– reliability – performance – usability

slide-14
SLIDE 14
✄ ☎ ☎✆ ✝ ✞ ✟ ✆ ✠ ✡ ☎ ☛ ✞ ✠ ☞ ✌ ✍ ✎ ✏ ✑ ✎ ✁✒ ✁ ✓ ☞ ☞ ✔ ✕ ✖ ✖ ✗ ✗ ✗✙✘ ✚ ✞ ✘ ✛ ✄ ☎ ☎✆ ✞ ✄ ✘ ✚✜ ✖✣✢ ✚ ✠ ✞ ✚ ✁✒ ✁

ISO 9126

source: http://www.cse.dcu.ie/essiscope/sm2/9126ref.html

slide-15
SLIDE 15
✄ ☎ ☎✆ ✝ ✞ ✟ ✆ ✠ ✡ ☎ ☛ ✞ ✠ ☞ ✌ ✍ ✎ ✏ ✑ ✎ ✁✒ ✁ ✓ ☞ ☞ ✔ ✕ ✖ ✖ ✗ ✗ ✗✙✘ ✚ ✞ ✘ ✛ ✄ ☎ ☎✆ ✞ ✄ ✘ ✚✜ ✖✣✢ ✚ ✠ ✞ ✚ ✁✒ ✁

Manufacturing View

  • avoid rework and associated costs
  • often leads to process focus (ISO 9001-3)
  • process does not guarantee good products;
  • nly guarantees uniformity of output
slide-16
SLIDE 16
✄ ☎ ☎✆ ✝ ✞ ✟ ✆ ✠ ✡ ☎ ☛ ✞ ✠ ☞ ✌ ✍ ✎ ✏ ✑ ✎ ✁✒ ✁ ✓ ☞ ☞ ✔ ✕ ✖ ✖ ✗ ✗ ✗✙✘ ✚ ✞ ✘ ✛ ✄ ☎ ☎✆ ✞ ✄ ✘ ✚✜ ✖✣✢ ✚ ✠ ✞ ✚ ✁✒ ✁

Product View

  • measure internal characteristics?

– Measurements chosen depend on type of product (e.g. code, design, …) – may not ensure quality of external characteristics

  • measure external characteristics?

– Corresponds to user/manufacturer views – measurements chosen depend on product (e.g. OS, spreadsheet, …)

slide-17
SLIDE 17
✄ ☎ ☎✆ ✝ ✞ ✟ ✆ ✠ ✡ ☎ ☛ ✞ ✠ ☞ ✌ ✍ ✎ ✏ ✑ ✎ ✁✒ ✁ ✓ ☞ ☞ ✔ ✕ ✖ ✖ ✗ ✗ ✗✙✘ ✚ ✞ ✘ ✛ ✄ ☎ ☎✆ ✞ ✄ ✘ ✚✜ ✖✣✢ ✚ ✠ ✞ ✚ ✁✒ ✁

Value-based view

  • helps to decide trade-offs during

development

– cost vs. reliability – cost vs. functionality

  • cost to consumer is affected by scale

– high volume products have a higher perceived value

  • value is defined by

– potential savings/productivity enhancements – profit opportunities

slide-18
SLIDE 18
✄ ☎ ☎✆ ✝ ✞ ✟ ✆ ✠ ✡ ☎ ☛ ✞ ✠ ☞ ✌ ✍ ✎ ✏ ✑ ✎ ✁✒ ✁ ✓ ☞ ☞ ✔ ✕ ✖ ✖ ✗ ✗ ✗✙✘ ✚ ✞ ✘ ✛ ✄ ☎ ☎✆ ✞ ✄ ✘ ✚✜ ✖✣✢ ✚ ✠ ✞ ✚ ✁✒ ✁

Problems with Qualities

  • qualities are at odds with one another

– always a compromise

✁ ✂✄ ☎ ✆✞✝ ✟ ✠ ✡ ✠ ✆☞☛ ✌ ✍ ☎ ✎ ✏ ✎ ✂ ✍ ☎ ✑ ✄ ☎ ✒ ✝ ✓✔ ✍ ✁ ✎ ✍ ✔ ✏ ☎ ✠ ✆☞☛ ✌ ✍ ☎ ✎ ✏ ✎ ✑ ✝ ✏ ✡ ✆ ✆ ✄ ✡ ✍ ☎ ✝ ✓ ✔ ✍ ✁ ✒ ✄ ✕ ✏ ✡ ✝ ☎ ✠ ✆☞☛ ✌ ✍ ☎ ✎ ✏ ✎ ✍ ✑ ✑ ✠ ✔ ✠ ✍ ✓ ✔ ☛
  • difficulty in trying to measure qualities e.g.,

accuracy, usability

  • what does quality really mean?
slide-19
SLIDE 19
✂ ✄ ☎ ☎✆ ✝ ✞ ✟ ✆ ✠ ✡ ☎ ☛ ✞ ✠ ☞ ✌ ✍ ✎ ✏ ✑ ✎✒ ✓ ✒ ✔ ☞ ☞ ✕ ✖ ✗ ✗ ✘ ✘ ✘✚✙ ✛ ✞ ✙ ✜ ✄ ☎ ☎✆ ✞ ✄ ✙ ✛✢ ✗✤✣ ✛ ✠ ✞ ✛ ✒ ✓ ✒

Proposed solution 1: Focus on Product

  • most dimensions of quality are measured

after the fact

  • need to identify actions that can embed

needed qualities in the products, up front

  • implementation quality model: identify what

the programmer can do to ensure quality

– link these actions to high level qualities

slide-20
SLIDE 20 ✓ ✂ ✄ ☎ ☎✆ ✝ ✞ ✟ ✆ ✠ ✡ ☎ ☛ ✞ ✠ ☞ ✌ ✍ ✎ ✏ ✑ ✎✒ ✓ ✒ ✔ ☞ ☞ ✕ ✖ ✗ ✗ ✘ ✘ ✘✚✙ ✛ ✞ ✙ ✜ ✄ ☎ ☎✆ ✞ ✄ ✙ ✛✢ ✗✤✣ ✛ ✠ ✞ ✛ ✒ ✓ ✒

Proposed Solution 1 (cont’d)

  • requirements quality model: all requirement

statements must be measurable

  • design quality model: define qualities for

design, identify characteristics of design that would embed those qualities

slide-21
SLIDE 21
✄ ☎ ☎✆ ✝ ✞ ✟ ✆ ✠ ✡ ☎ ☛ ✞ ✠ ☞ ✌ ✍ ✎ ✏ ✑ ✎✒ ✓ ✒ ✔ ☞ ☞ ✕ ✖ ✗ ✗ ✘ ✘ ✘✚✙ ✛ ✞ ✙ ✜ ✄ ☎ ☎✆ ✞ ✄ ✙ ✛✢ ✗✤✣ ✛ ✠ ✞ ✛ ✒ ✓ ✒

Proposed solution 2: Focus on Process

  • integrate quality decisions into the design

process, e.g.:

– by using quality checklists during inspection, design – by determining testing criteria up front – by following a documented design process

slide-22
SLIDE 22 ✓ ✓ ✂ ✄ ☎ ☎✆ ✝ ✞ ✟ ✆ ✠ ✡ ☎ ☛ ✞ ✠ ☞ ✌ ✍ ✎ ✏ ✑ ✎✒ ✓ ✒ ✔ ☞ ☞ ✕ ✖ ✗ ✗ ✘ ✘ ✘✚✙ ✛ ✞ ✙ ✜ ✄ ☎ ☎✆ ✞ ✄ ✙ ✛✢ ✗✤✣ ✛ ✠ ✞ ✛ ✒ ✓ ✒

Qualities Discernable at Runtime

  • performance
  • security
  • availablity
  • functionality
  • usability
slide-23
SLIDE 23 ✓ ✒ ✂ ✄ ☎ ☎✆ ✝ ✞ ✟ ✆ ✠ ✡ ☎ ☛ ✞ ✠ ☞ ✌ ✍ ✎ ✏ ✑ ✎✒ ✓ ✒ ✔ ☞ ☞ ✕ ✖ ✗ ✗ ✘ ✘ ✘✚✙ ✛ ✞ ✙ ✜ ✄ ☎ ☎✆ ✞ ✄ ✙ ✛✢ ✗✤✣ ✛ ✠ ✞ ✛ ✒ ✓ ✒

Qualities Not Discernable at Runtime

  • modifiability
  • portability
  • reusability
  • testability

– ease with which software can be made to demonstrate its faults through execution based testing – related to architectural documentation, separation

  • f concern, information hiding, incremental

development

slide-24
SLIDE 24
✂ ✄ ☎ ☎✆ ✝ ✞ ✟ ✆ ✠ ✡ ☎ ☛ ✞ ✠ ☞ ✌ ✍ ✎ ✏ ✑ ✎✒
✓ ☞ ☞ ✔ ✕ ✖ ✖ ✗ ✗ ✗✙✘ ✚ ✞ ✘ ✛ ✄ ☎ ☎✆ ✞ ✄ ✘ ✚✜ ✖✣✢ ✚ ✠ ✞ ✚ ✒

Business Qualities

  • time to market
  • cost
  • projected lifetime of system
  • targeted market
  • integration with existing legacy systems
slide-25
SLIDE 25
✄ ☎ ☎✆ ✝ ✞ ✟ ✆ ✠ ✡ ☎ ☛ ✞ ✠ ☞ ✌ ✍ ✎ ✏ ✑ ✎✒
✓ ☞ ☞ ✔ ✕ ✖ ✖ ✗ ✗ ✗✙✘ ✚ ✞ ✘ ✛ ✄ ☎ ☎✆ ✞ ✄ ✘ ✚✜ ✖✣✢ ✚ ✠ ✞ ✚ ✒

What's Ahead

Remainder of material about quality focuses on two topics related to software quality:

– Testing: finding defects by executing software and examining results (and then fixing the defects) – Inspection: a formal way of analyzing software and other documents

slide-26
SLIDE 26
✄ ☎ ☎✆ ✝ ✞ ✟ ✆ ✠ ✡ ☎ ☛ ✞ ✠ ☞ ✌ ✍ ✎ ✏ ✑ ✎✒
✓ ☞ ☞ ✔ ✕ ✖ ✖ ✗ ✗ ✗✙✘ ✚ ✞ ✘ ✛ ✄ ☎ ☎✆ ✞ ✄ ✘ ✚✜ ✖✣✢ ✚ ✠ ✞ ✚ ✒

What is Software Inspection?

  • Formal process to statically analyze a

software product and record metrics related to that product.

  • Differs from informal "walk-throughs" or

"reviews":

– formal process – products inspected at greater level of detail – metrics

slide-27
SLIDE 27
✄ ☎ ☎✆ ✝ ✞ ✟ ✆ ✠ ✡ ☎ ☛ ✞ ✠ ☞ ✌ ✍ ✎ ✏ ✑ ✎✒
✓ ☞ ☞ ✔ ✕ ✖ ✖ ✗ ✗ ✗✙✘ ✚ ✞ ✘ ✛ ✄ ☎ ☎✆ ✞ ✄ ✘ ✚✜ ✖✣✢ ✚ ✠ ✞ ✚ ✒

IEEE Definition

"...a formal evaluation technique in which software requirements, design, or code are examined in detail by a person or group other than the author to detect faults, violations of development standards, and other problems..."

✁ ✁ ✂✄ ✄ ✄ ☎ ✆✞✝ ✟ ✠ ✝ ✡ ✠ ☛ ☞✍✌ ✎ ✎ ✝ ✡✏ ✌ ✑ ☎ ✌ ✑ ✆ ✒ ✝ ✡ ✓ ✄ ✟✔ ✕ ✟ ✓ ✓ ✡ ✕ ✟ ✔ ✖ ✓ ✡ ✗ ✕ ✟ ✌ ☞✍✌ ✔ ✏
slide-28
SLIDE 28 ✁ ✂ ✄ ☎ ☎✆ ✝ ✞ ✟ ✆ ✠ ✡ ☎ ☛ ✞ ✠ ☞ ✌ ✍ ✎ ✏ ✑ ✎✒
✓ ☞ ☞ ✔ ✕ ✖ ✖ ✗ ✗ ✗✙✘ ✚ ✞ ✘ ✛ ✄ ☎ ☎✆ ✞ ✄ ✘ ✚✜ ✖✣✢ ✚ ✠ ✞ ✚ ✒

History

  • Traditional meaning of inspection:

– Inspecting the product of a manufacturing process – Physical product, evaluate by looking, manipulating – Often put through rigorous tests, keep metrics

  • Michael Fagan at IBM:

– used similar processes to inspect software (code) – landmark paper in 1976 – often called "Fagan Inspections" – Inspection process has been extended & refined since, ongoing research

slide-29
SLIDE 29 ✁ ✂ ✄ ☎ ☎✆ ✝ ✞ ✟ ✆ ✠ ✡ ☎ ☛ ✞ ✠ ☞ ✌ ✍ ✎ ✏ ✑ ✎✒
✓ ☞ ☞ ✔ ✕ ✖ ✖ ✗ ✗ ✗✙✘ ✚ ✞ ✘ ✛ ✄ ☎ ☎✆ ✞ ✄ ✘ ✚✜ ✖✣✢ ✚ ✠ ✞ ✚ ✒

What Gets Inspected?

  • Inspection process initially used to inspect software

(code)

  • Extended to include all documents:
✤ ✥✦ ✥ ✧✩★ ✪ ✫ ✪ ✬✩✭ ✮✯ ✰ ✫ ✭ ✮ ✱ ✮ ✦ ✲ ✪ ✳ ✴ ✮ ✪ ✫✶✵ ✦ ✴✸✷ ✹ ✰ ✱ ✮ ✦ ✲ ✪ ✳ ✲ ✮ ✪ ✲✻✺ ✧ ✥✦ ✪ ✳ ✰ ✪ ✮ ✭ ✱ ✥✦ ✰ ✥ ✧ ✪ ✳ ✮ ✲ ✹✽✼
  • Above includes diagrams, prose, pseudo-code, etc.
  • Some other industries have adopted Inspection for

design documents, drawings, etc.

slide-30
SLIDE 30 ✁ ✂ ✄ ☎ ☎✆ ✝ ✞ ✟ ✆ ✠ ✡ ☎ ☛ ✞ ✠ ☞ ✌ ✍ ✎ ✏ ✑ ✎ ✒
☞ ☞ ✔ ✕ ✖ ✖ ✗ ✗ ✗✙✘ ✚ ✞ ✘ ✛ ✄ ☎ ☎✆ ✞ ✄ ✘ ✚✜ ✖✣✢ ✚ ✠ ✞ ✚ ✒
  • Inspection Versus Testing (1)
  • AT&T classifies inspection as a form of testing
  • In CISC 323, we use the term "testing" to

mean dynamic testing: executing software to find faults

  • inspection does not replace dynamic testing
  • software process should include both

inspection and testing

slide-31
SLIDE 31
✂ ✄ ☎ ☎✆ ✝ ✞ ✟ ✆ ✠ ✡ ☎ ☛ ✞ ✠ ☞ ✌ ✍ ✎ ✏ ✑ ✎ ✒
☞ ☞ ✔ ✕ ✖ ✖ ✗ ✗ ✗✙✘ ✚ ✞ ✘ ✛ ✄ ☎ ☎✆ ✞ ✄ ✘ ✚✜ ✖✣✢ ✚ ✠ ✞ ✚ ✒
  • Inspection Versus Testing (2)
  • difficult to inspect for qualities such as

performance, timing, load

  • inspection can be applied earlier than testing
  • inspection can be applied to any software

product, not just code

slide-32
SLIDE 32 ✒ ✂ ✄ ☎ ☎✆ ✝ ✞ ✟ ✆ ✠ ✡ ☎ ☛ ✞ ✠ ☞ ✌ ✍ ✎ ✏ ✑ ✎ ✒
☞ ☞ ✔ ✕ ✖ ✖ ✗ ✗ ✗✙✘ ✚ ✞ ✘ ✛ ✄ ☎ ☎✆ ✞ ✄ ✘ ✚✜ ✖✣✢ ✚ ✠ ✞ ✚ ✒
  • Defects vs. Faults
  • Inspection finds defects: problems in

software

  • Testing finds faults: incorrect behavior
  • When you find a fault by testing:

– must debug to trace the fault to a defect in the code

  • Often more cost-effective to find defaults via

Inspection

slide-33
SLIDE 33
✄ ☎ ☎✆ ✝ ✞ ✟ ✆ ✠ ✡ ☎ ☛ ✞ ✠ ☞ ✌ ✍ ✎ ✏ ✑ ✎ ✒
☞ ☞ ✔ ✕ ✖ ✖ ✗ ✗ ✗✙✘ ✚ ✞ ✘ ✛ ✄ ☎ ☎✆ ✞ ✄ ✘ ✚✜ ✖✣✢ ✚ ✠ ✞ ✚ ✒
  • Analysis Tools
  • static analysis tools can find some types of

defects

– compilers find undeclared variables, syntax errors – other static analysis tools may check for:

✂ ✄ ☎✆ ✝ ✞ ✆ ✟✠ ☎ ✝✡ ☛ ☎ ☞ ✁ ✂ ✁ ✌ ☎ ☛ ✍ ✆ ✄ ✎ ✆ ✟✠ ☎ ✌ ☞ ✏ ☎ ✏ ✡ ✄ ✑ ✠ ☎✆ ✒ ✌ ☞ ✓ ✁ ✂ ✌✆ ✔ ☎ ✓✖✕ ✄ ✡ ✗ ✄ ✆ ✏ ✏ ✎ ✂ ✗ ✕ ✄ ✆ ✝ ✘ ✎ ✝ ☎ ✌ ☞ ✏ ✎ ✌ ✌ ✕ ☎ ✠ ✠ ☎ ☛ ✙ ✡ ✄ ☛ ✌✛✚ ✌ ✡ ✏ ☎ ✗ ✄ ✆ ✏ ✏ ✆ ✘ ✎ ✝✆ ✠ ☎ ✄ ✄ ✡ ✄ ✌
  • should inspect for things tools can’t find
slide-34
SLIDE 34
✂ ✄ ☎ ☎✆ ✝ ✞ ✟ ✆ ✠ ✡ ☎ ☛ ✞ ✠ ☞ ✌ ✍ ✎ ✏ ✑ ✎ ✒
☞ ☞ ✔ ✕ ✖ ✖ ✗ ✗ ✗✙✘ ✚ ✞ ✘ ✛ ✄ ☎ ☎✆ ✞ ✄ ✘ ✚✜ ✖✣✢ ✚ ✠ ✞ ✚ ✒
  • Inspection Metrics
  • to be classified as “inspection”, metrics must be kept
  • record:
✤ ☛ ☎ ✔ ☎ ✝ ✘ ✌ ✔ ✡ ✁ ✂ ☛ ✎ ✂ ✕ ✄ ✡ ☛ ✁ ✝ ✘ ✁ ✂ ☛ ☎ ✄ ✎ ✂ ✌ ✕ ☎ ✝ ✘ ✎ ✡ ✂ ✤ ✙ ✞ ☎ ✄ ☎ ☛ ☎ ✔ ☎ ✝ ✘ ✔ ✡ ✁ ✂ ☛ ✎ ✂ ✕ ✄ ✡ ☛ ✁ ✝ ✘ ✤ ✘ ✎ ✏ ☎ ✘ ✆ ✒ ☎ ✂ ✘ ✡ ✕ ☎ ✄ ✔ ✡ ✄ ✏ ✎ ✂ ✌ ✕ ☎ ✝ ✘ ✎ ✡ ✂ ✤ ✌ ✎✣✥ ☎ ✡ ✔ ✕ ✄ ✡ ☛ ✁ ✝ ✘ ✎ ✂ ✌ ✕ ☎ ✝ ✘ ☎ ☛
  • may also record
✤ ✦✧ ★✪✩ ✫✬ ✭✮ ✬ ✯ ✰ ✩ ✯ ✩ ✦ ★ ✱ ✩ ✲ ✫ ✲✳ ✴ ✧ ✵✶✬ ✭ ✷ ✴ ✸✶✹ ✬ ✭ ✺ ✻ ✼ ✽ ✧ ★✪✾ ✭ ✬ ✴ ✾ ★✪✩ ✰ ✰ ✩ ★✪✩ ✦ ★ ✸✶✹ ✫ ★ ✽ ✩ ✰ ✩ ✯ ✩ ✦ ★ ✻ ✿ ❀ ✫ ✫ ✩ ✿ ★✪✩ ✰ ✸ ✴ ✾ ✭ ✬ ❁ ✩ ✴ ✩ ✹ ★ ✿ ✻ ✯ ✧ ✸ ❂ ❀ ✭ ✩ ✦ ✬ ❀ ✹ ★ ✿ ✦ ✬ ❂ ❂ ✩ ✦ ★✪✩ ✰ ✰ ❀ ✭ ✸✶✹ ✫ ★✪✩ ✿ ★ ✸✶✹ ✫ ✧ ✹ ✰ ✸✶✹ ★ ✽ ✩ ✯ ✸ ✩ ❂ ✰
slide-35
SLIDE 35
✂ ✄ ☎ ☎✆ ✝ ✞ ✟ ✆ ✠ ✡ ☎ ☛ ✞ ✠ ☞ ✌ ✍ ✎ ✏ ✑ ✎ ✒
☞ ☞ ✔ ✕ ✖ ✖ ✗ ✗ ✗✙✘ ✚ ✞ ✘ ✛ ✄ ☎ ☎✆ ✞ ✄ ✘ ✚✜ ✖✣✢ ✚ ✠ ✞ ✚ ✒
  • Use of Metrics
  • Data collected can tell you:
✻ ★ ✬ ★ ✧ ❂ ✰ ✩ ✯ ✩ ✦ ★ ✿ ✾ ✩ ✭ ❂ ✸ ✹ ✩ ✬ ✯ ✦ ✬ ✰ ✩ ✬ ✭ ✾ ✩ ✭ ★ ✸ ✴ ✩ ❀ ✹ ✸ ★ ✻ ✾ ✩ ✭ ✦ ✩ ✹ ★ ✧ ✫ ✩ ✬ ✯ ✰ ✩ ✯ ✩ ✦ ★ ✿ ✯ ✬ ❀ ✹ ✰ ✧ ★ ✰ ✸ ✯ ✯ ✩ ✭ ✩ ✹ ★ ✿ ★ ✧ ✫ ✩ ✿ ✤ ✩ ✲ ✫ ✲ ✥✦ ✧ ✬ ✯ ✰ ✩ ✯ ✩ ✦ ★ ✿ ✯ ✬ ❀ ✹ ✰★ ✮ ✩✶✹ ✿ ✾ ✩ ✦ ★ ✸ ✬ ✹ ✳ ✪ ✦ ✧ ★ ✮ ★✪✩ ✿ ★ ✸✶✹ ✫ ✻ ✾ ✩ ✭ ✦ ✩ ✹ ★ ✧ ✫ ✩ ✬ ✯ ★ ✸ ✴ ✩ ✿ ✾ ✩ ✹ ★ ✬ ✹ ✰ ✸ ✯ ✯ ✩ ✭ ✩ ✹ ★ ✧ ✦ ★ ✸ ❁ ✸ ★ ✸ ✩ ✿ ✫ ✤ ✰ ✩ ✿ ✸ ✫ ✹ ✳ ✦ ✬ ✰ ✸✶✹ ✫ ✳ ✰ ✬ ✦ ❀ ✴ ✩ ✹ ★ ✧ ★ ✸ ✬ ✹ ✳ ✸✶✹ ✿ ✾ ✩ ✦ ★ ✸ ✬ ✹ ✳ ★✪✩ ✿ ★ ✸✶✹ ✫ ✳ ✩ ★ ✦ ✲
  • Data can be used to:
✻ ✵ ❀ ✿ ★ ✸ ✯ ✮ ★ ✸ ✴ ✩ ✿ ✾ ✩ ✹ ★ ✸ ✹ ✿ ✾ ✩ ✦ ★ ✸ ✹ ✫ ✬ ★✪✩ ✿ ★ ✸✶✹ ✫ ✻ ✿ ❀ ✫ ✫ ✩ ✿ ★ ✸ ✴ ✾ ✭ ✬ ❁ ✩ ✴ ✩ ✹ ★ ✿ ✸✶✹ ✰ ✩ ❁ ✩ ❂ ✬ ✾ ✴ ✩ ✹ ★✪✾ ✭ ✬ ✦ ✩ ✿ ✿ ✻ ✩ ❁ ✧ ❂ ❀ ✧ ★✪✩ ✦ ✽ ✧ ✹ ✫ ✩ ✿ ✸✶✹ ✾ ✭ ✬ ✦ ✩ ✿ ✿
slide-36
SLIDE 36
✄ ☎ ☎✆ ✝ ✞ ✟ ✆ ✠ ✡ ☎ ☛ ✞ ✠ ☞ ✌ ✍ ✎ ✏ ✑ ✎ ✒
☞ ☞ ✔ ✕ ✖ ✖ ✗ ✗ ✗✙✘ ✚ ✞ ✘ ✛ ✄ ☎ ☎✆ ✞ ✄ ✘ ✚✜ ✖✣✢ ✚ ✠ ✞ ✚ ✒
  • Inspection Process

from Software Inspection, Tom Gilb & Dorothy Graham

slide-37
SLIDE 37
✄ ☎ ☎✆ ✝ ✞ ✟ ✆ ✠ ✡ ☎ ☛ ✞ ✠ ☞ ✌ ✍ ✎ ✏ ✑ ✎ ✒
☞ ☞ ✔ ✕ ✖ ✖ ✗ ✗ ✗✙✘ ✚ ✞ ✘ ✛ ✄ ☎ ☎✆ ✞ ✄ ✘ ✚✜ ✖✣✢ ✚ ✠ ✞ ✚ ✒
  • People Involved in Inspection
  • Inspection is a team process: ideally 2-6 people
  • Inspection Leader:
✻ ✬ ✭ ✫ ✧ ✹ ✸✂✁ ✩ ✿ ✬ ✴ ✧ ✹ ✧ ✫ ✩ ✿ ✩✶✹ ✿ ✾ ✩ ✦ ★ ✸ ✬ ✹ ✾ ✭ ✬ ✦ ✩ ✿ ✿ ✻ ✴✬ ✰ ✩ ✭ ✧ ★✪✩ ✿ ✴ ✩ ✩ ★ ✸✶✹ ✫ ✿ ✻ ✿ ✽ ✬ ❀ ❂ ✰ ✽ ✧ ❁ ✩ ✿ ✾ ✩ ✦ ✸ ✧ ❂ ★ ✭ ✧ ✸✶✹ ✸✶✹ ✫ ✱ ✴ ❀ ❂ ★ ✸☎✄ ✰ ✧ ✮ ✦ ✬ ❀ ✭ ✿ ✩ ✳ ✦ ✩ ✭ ★ ✸ ✯ ✸ ✦✧ ★ ✸ ✬ ✹ ✺
  • checkers (inspectors)
✻ ✿ ✾ ✩ ✹ ✰ ★ ✸ ✴ ✩ ✭ ✩ ✧ ✰ ✸ ✹ ✫ ✷ ✧ ✹ ✧ ❂ ✮ ✁ ✸ ✹ ✫ ★ ✽ ✩ ✾ ✭ ✬ ✰ ❀ ✦ ★ ✻ ✴ ✧ ✮ ✸ ✹ ✦ ❂ ❀ ✰ ✩ ✧ ❀ ★ ✽ ✬ ✭ ✱ ✿ ✺ ✳ ❂ ✩ ✧ ✰ ✩ ✭ ✻ ✿ ✽ ✬ ✭ ★ ★ ✭ ✧ ✸✶✹ ✸✶✹ ✫ ✫ ✆ ✄ ✰ ✧ ✮ ✦ ✬ ❀ ✭ ✿ ✩ ✬ ✭ ✝ ✬ ✹ ★ ✽ ✩ ✵✶✬ ★ ✝ ✻ ★✪✩ ✦ ✽ ✹ ✸ ✦✧ ❂ ✞ ✹ ✬ ✼ ❂ ✩ ✰ ✫ ✩ ✭ ✩ ❂ ✧ ★ ✸✶✹ ✫ ★ ✬ ✾ ✭ ✬ ✰ ❀ ✦ ★
slide-38
SLIDE 38
✄ ☎ ☎✆ ✝ ✞ ✟ ✆ ✠ ✡ ☎ ☛ ✞ ✠ ☞ ✌ ✍ ✎ ✏ ✑ ✎ ✒
☞ ☞ ✔ ✕ ✖ ✖ ✗ ✗ ✗✙✘ ✚ ✞ ✘ ✛ ✄ ☎ ☎✆ ✞ ✄ ✘ ✚✜ ✖✣✢ ✚ ✠ ✞ ✚ ✒
  • Entry
  • entry criteria set up for products to be inspected
  • a lot of controversy about when to inspect code
✻ ★ ✩ ✯ ✬ ✭ ✩ ✬ ✭ ✧ ✯ ★✪✩ ✭ ★ ✩ ✿ ★ ✸ ✹ ✫ ✻ ★ ✩ ✯ ✬ ✭ ✩ ✬ ✭ ✧ ✯ ★✪✩ ✭ ✦ ✬ ✴ ✾ ✸ ❂ ✩
  • if entry criteria not met, product not inspected
✻ ✩ ✲ ✫ ✲✳ ★ ✬ ✬ ✴ ✧ ✹ ✮ ★ ✮ ✾ ✸✶✹ ✫ ✩ ✭ ✭ ✬ ✭ ✿ ✻ ✩ ✲ ✫ ✲✳ ✿ ✬ ❀ ✭ ✦ ✩ ✦ ✬ ✰ ✩ ✰ ✬ ✩ ✿ ✹ ✬ ★ ✦ ✬ ✴ ✾ ✸ ❂ ✩ ✦ ❂ ✩ ✧ ✹ ❂ ✮
  • inspections are expensive
✻ ✰ ✬ ✹ ✁ ★ ✼ ✧ ✿ ★✪✩ ✸✶✹ ✿ ✾ ✩ ✦ ★ ✬ ✭ ✿ ★ ✸ ✴ ✩
  • author offers up product for inspection
  • leaders decides if it's ready -- quick examination
slide-39
SLIDE 39
✄ ☎ ☎✆ ✝ ✞ ✟ ✆ ✠ ✡ ☎ ☛ ✞ ✠ ☞ ✌ ✍ ✎ ✏ ✑ ✎ ✒
☞ ☞ ✔ ✕ ✖ ✖ ✗ ✗ ✗✙✘ ✚ ✞ ✘ ✛ ✄ ☎ ☎✆ ✞ ✄ ✘ ✚✜ ✖✣✢ ✚ ✠ ✞ ✚ ✒
  • Kickoff
  • initial meeting for all participants
  • organized by leader
  • familiarize everyone involved with task at hand
  • define everyone’s roles
  • hand out materials needed
  • deal with general questions
  • set goals
  • discuss overall plan, timetable
  • long documents divided into "chunks": separate

inspection & logging for each chunk

slide-40
SLIDE 40
✂ ✄ ☎ ☎✆ ✝ ✞ ✟ ✆ ✠ ✡ ☎ ☛ ✞ ✠ ☞ ✌ ✍ ✎ ✏ ✑ ✎✒ ✓ ✒ ✔ ☞ ☞ ✕ ✖ ✗ ✗ ✘ ✘ ✘✚✙ ✛ ✞ ✙ ✜ ✄ ☎ ☎✆ ✞ ✄ ✙ ✛✢ ✗✤✣ ✛ ✠ ✞ ✛ ✒ ✓ ✒

Individual Checking (1)

  • each checker works alone using documents handed
  • ut in kick-off meeting
  • aims to find maximum number of unique major

potential defects

  • mainly by looking for discrepancies between source

documents and products being inspected, i.e.:

✥ ✦ ✧★ ✩ ✪ ✦ ✧ ✫ ✧✬ ✭✯✮ ✭✯✰ ✱ ✧ ✮ ✪✳✲ ✬ ✥ ✱ ✧ ✮ ✪ ✲ ✬ ✭ ✰ ✴✰ ✱ ✧ ✥ ✦ ✧★ ✩ ✪ ✦ ✧ ✫ ✧✬ ✭✯✮ ✭✯✰ ✭ ✧ ✮ ✭✯✵ ✶✸✷ ✬
slide-41
SLIDE 41
✄ ☎ ☎✆ ✝ ✞ ✟ ✆ ✠ ✡ ☎ ☛ ✞ ✠ ☞ ✌ ✍ ✎ ✏ ✑ ✎✒ ✓ ✒ ✔ ☞ ☞ ✕ ✖ ✗ ✗ ✘ ✘ ✘✚✙ ✛ ✞ ✙ ✜ ✄ ☎ ☎✆ ✞ ✄ ✙ ✛✢ ✗✤✣ ✛ ✠ ✞ ✛ ✒ ✓ ✒

Individual Checking (2)

  • usually uses a checklist
  • kickoff meeting suggests amount of time to spend:
✥ ✭ ✁ ✵ ✪ ✴ ✷ ✶ ✦ ✷ ✭ ✧ ✪ ✮ ✂ ✄ ✰ ✩ ✦ ✵ ✧ ✦ ✱ ✰ ✴ ✩ ✫ ✧✬ ✭✯✵ ✷ ✲ ✧
  • checker records actual time taken
  • keeps notes of issues found
✥ ✱ ✧ ✮ ✴ ✦ ✪ ✵ ✭ ✪ ✰ ✬ ☎ ✶ ✰ ✴ ✷ ✭ ✪ ✰ ✬ ☎ ✵ ✰ ✮ ✮ ✪ ✆ ✶ ✁ ✪ ✫ ✵ ✷ ✴ ✭
  • "issue" = matter requiring attention
✥ ✵ ✰ ✮ ✮ ✪ ✆ ✶ ✧ ✱ ✧ ✝ ✧ ✴ ✭ ✥ ✞ ★ ✩ ✧ ✮ ✭ ✪ ✰ ✬ ✰ ✝ ✪ ✬ ✭ ✧✬ ✭ ✞ ✥ ✮ ✩ ✲ ✲ ✧ ✮ ✭ ✪ ✰ ✬
slide-42
SLIDE 42
✂ ✄ ☎ ☎✆ ✝ ✞ ✟ ✆ ✠ ✡ ☎ ☛ ✞ ✠ ☞ ✌ ✍ ✎ ✏ ✑ ✎✒ ✓ ✒ ✔ ☞ ☞ ✕ ✖ ✗ ✗ ✘ ✘ ✘✚✙ ✛ ✞ ✙ ✜ ✄ ☎ ☎✆ ✞ ✄ ✙ ✛✢ ✗✤✣ ✛ ✠ ✞ ✛ ✒ ✓ ✒

Logging Meeting (1)

  • 3 purposes:

– log issues identified by each checker – work as group to find more issues – suggestions for process improvement (inspection process and overall software process)

  • controlled by moderator (usually the leader)

– must be very skilled in handling people and issues – maintain time discipline and issue discipline

  • no evaluation of issues

– just log issues, like brainstorming

slide-43
SLIDE 43
✂ ✄ ☎ ☎✆ ✝ ✞ ✟ ✆ ✠ ✡ ☎ ☛ ✞ ✠ ☞ ✌ ✍ ✎ ✏ ✑ ✎ ✁✒ ✁ ✓ ☞ ☞ ✔ ✕ ✖ ✖ ✗ ✗ ✗✙✘ ✚ ✞ ✘ ✛ ✄ ☎ ☎✆ ✞ ✄ ✘ ✚✜ ✖✣✢ ✚ ✠ ✞ ✚ ✁✒ ✁

Logging Meeting (2)

  • must not last more than 2 hours
  • not for explaining, defending, suggesting fixes, or

training

  • identify issues, then log them
  • issues can be questions to product author and

suggestions for improvements

✤ ✥✦ ✧ ★ ✩ ✪✫ ✬ ✪ ✪✭ ★ ✩ ✥ ✮ ✭ ✭ ✧ ✩ ✥✯
  • NOT an attack or evaluation of product author
  • management personnel should NOT be in attendance
slide-44
SLIDE 44
✂ ✄ ✄☎ ✆ ✝ ✞ ☎ ✟ ✠ ✄ ✡ ✝ ✟ ☛ ☞ ✌ ✍ ✎ ✏ ✍✑ ✒ ✑ ✓ ☛ ☛ ✔ ✕ ✖ ✖ ✗ ✗ ✗✙✘ ✚ ✝ ✘ ✛ ✂ ✄ ✄☎ ✝ ✂ ✘ ✚✜ ✖✣✢ ✚ ✟ ✝ ✚ ✑ ✒ ✑

Edit

  • log of issues given to author to resolve
  • author can

– classify or reclassify issues (which are really defects) – voluntarily improve product as per issues raised – request rules or checklist be changed

slide-45
SLIDE 45
✂ ✄ ✄☎ ✆ ✝ ✞ ☎ ✟ ✠ ✄ ✡ ✝ ✟ ☛ ☞ ✌ ✍ ✎ ✏ ✍✑ ✒ ✑ ✓ ☛ ☛ ✔ ✕ ✖ ✖ ✗ ✗ ✗✙✘ ✚ ✝ ✘ ✛ ✂ ✄ ✄☎ ✝ ✂ ✘ ✚✜ ✖✣✢ ✚ ✟ ✝ ✚ ✑ ✒ ✑

Follow-up

  • inspection leader makes sure satisfactory

closure has taken place on all issues

– actions to correct all defects (change or change request) – suggestions for process changes reported

  • if major changes, product may need to be

inspected again

slide-46
SLIDE 46
✂ ✄ ✄☎ ✆ ✝ ✞ ☎ ✟ ✠ ✄ ✡ ✝ ✟ ☛ ☞ ✌ ✍ ✎ ✏ ✍✑ ✒ ✑ ✓ ☛ ☛ ✔ ✕ ✖ ✖ ✗ ✗ ✗✙✘ ✚ ✝ ✘ ✛ ✂ ✄ ✄☎ ✝ ✂ ✘ ✚✜ ✖✣✢ ✚ ✟ ✝ ✚ ✑ ✒ ✑

Exit

  • need exit criteria
  • need closure on all issues in writing
  • record metrics for inspection process (for

process improvement)

  • product now considered “safe” to pass on to

next phase in software development

slide-47
SLIDE 47 ✁ ✂ ✄ ☎ ☎✆ ✝ ✞ ✟ ✆ ✠ ✡ ☎ ☛ ✞ ✠ ☞ ✌ ✍ ✎ ✏ ✑ ✎✒ ✓ ✒ ✔ ☞ ☞ ✕ ✖ ✗ ✗ ✘ ✘ ✘✚✙ ✛ ✞ ✙ ✜ ✄ ☎ ☎✆ ✞ ✄ ✙ ✛✢ ✗✤✣ ✛ ✠ ✞ ✛ ✒ ✓ ✒

The V-model

Requirem ents Cost of running inspections is about 10-15% of cost of development budget. Inspection Architecture Inspection Design Inspection Code Inspection Unit Test Integration Test System Test

slide-48
SLIDE 48
✄ ☎ ☎✆ ✝ ✞ ✟ ✆ ✠ ✡ ☎ ☛ ✞ ✠ ☞ ✌ ✍ ✎ ✏ ✑ ✎✒ ✓ ✒ ✔ ☞ ☞ ✕ ✖ ✗ ✗ ✘ ✘ ✘✚✙ ✛ ✞ ✙ ✜ ✄ ☎ ☎✆ ✞ ✄ ✙ ✛✢ ✗✤✣ ✛ ✠ ✞ ✛ ✒ ✓ ✒

Costs of Inspection

  • Inspection takes time
  • Typically 10-15% of development budget
  • Also start-up costs:

– establishing procedures – training leaders, inspectors

  • Is it worth it?
slide-49
SLIDE 49
✄ ☎ ☎✆ ✝ ✞ ✟ ✆ ✠ ✡ ☎ ☛ ✞ ✠ ☞ ✌ ✍ ✎ ✏ ✑ ✎✒ ✓ ✒ ✔ ☞ ☞ ✕ ✖ ✗ ✗ ✘ ✘ ✘✚✙ ✛ ✞ ✙ ✜ ✄ ☎ ☎✆ ✞ ✄ ✙ ✛✢ ✗✤✣ ✛ ✠ ✞ ✛ ✒ ✓ ✒

Benefits of Inspection (1)

  • Defects found early save time and money
  • many defects found before testing

– testing is much quicker

  • total development time is reduced

– even when counting time for inspection

  • inspections increase productivity
slide-50
SLIDE 50
✂ ✄ ☎ ☎✆ ✝ ✞ ✟ ✆ ✠ ✡ ☎ ☛ ✞ ✠ ☞ ✌ ✍ ✎ ✏ ✑ ✎✒ ✓ ✒ ✔ ☞ ☞ ✕ ✖ ✗ ✗ ✘ ✘ ✘✚✙ ✛ ✞ ✙ ✜ ✄ ☎ ☎✆ ✞ ✄ ✙ ✛✢ ✗✤✣ ✛ ✠ ✞ ✛ ✒ ✓ ✒

Benefits of Inspection (2)

  • Defects found early result in better product
  • inspection results in

– cleaner design – better documentation – better code – fewer defects – defects that remain will be easier to fix when found

slide-51
SLIDE 51
✄ ☎ ☎✆ ✝ ✞ ✟ ✆ ✠ ✡ ☎ ☛ ✞ ✠ ☞ ✌ ✍ ✎ ✏ ✑ ✎✒ ✓ ✒ ✔ ☞ ☞ ✕ ✖ ✗ ✗ ✘ ✘ ✘✚✙ ✛ ✞ ✙ ✜ ✄ ☎ ☎✆ ✞ ✄ ✙ ✛✢ ✗✤✣ ✛ ✠ ✞ ✛ ✒ ✓ ✒

Benefits of Inspection (3)

  • feedback for mangement about software

process:

– inspector's comments plus metrics

  • defects found earlier means fewer deadline

surprises

  • inspection trains inspectors:

– learn from good code and documentation of

  • thers

– learn from mistakes of others

slide-52
SLIDE 52
✂ ✄ ☎ ☎✆ ✝ ✞ ✟ ✆ ✠ ✡ ☎ ☛ ✞ ✠ ☞ ✌ ✍ ✎ ✏ ✑ ✎✒ ✓ ✒ ✔ ☞ ☞ ✕ ✖ ✗ ✗ ✘ ✘ ✘✚✙ ✛ ✞ ✙ ✜ ✄ ☎ ☎✆ ✞ ✄ ✙ ✛✢ ✗✤✣ ✛ ✠ ✞ ✛ ✒ ✓ ✒

Success Stories (1)

  • IBM Federal Systems Division

– kept metrics for similar projects before and after introducing Inspection into development process – delivered lines of code per work-month:

✂ ✂ ✄ ☎ ✆ ✝✟✞ ✠ ✆ ✡☞☛ ✌✍ ✎✏ ✆ ☎ ✞ ☛
  • ✑✒
✒ ✄ ☎ ✆ ✝ ✡☞☛ ✌✍ ✎✏ ✆ ☎ ✞ ☛
slide-53
SLIDE 53
✂ ✄ ☎ ☎✆ ✝ ✞ ✟ ✆ ✠ ✡ ☎ ☛ ✞ ✠ ☞ ✌ ✍ ✎ ✏ ✑ ✎ ✁✒ ✁ ✓ ☞ ☞ ✔ ✕ ✖ ✖ ✗ ✗ ✗✙✘ ✚ ✞ ✘ ✛ ✄ ☎ ☎✆ ✞ ✄ ✘ ✚✜ ✖✣✢ ✚ ✠ ✞ ✚ ✁✒ ✁

Success Stories (2)

  • ICL (in U.K.):

– 57.7% of defects found by Inspection – cost of finding defect by Inspection: 1.58 work hours – cost of finding without Inspection: 8.47 work hours – only 6% of development time devoted to Inspection

slide-54
SLIDE 54
✄ ☎ ☎✆ ✝ ✞ ✟ ✆ ✠ ✡ ☎ ☛ ✞ ✠ ☞ ✌ ✍ ✎ ✏ ✑ ✎ ✁✒ ✁ ✓ ☞ ☞ ✔ ✕ ✖ ✖ ✗ ✗ ✗✙✘ ✚ ✞ ✘ ✛ ✄ ☎ ☎✆ ✞ ✄ ✘ ✚✜ ✖✣✢ ✚ ✠ ✞ ✚ ✁✒ ✁

Success Stories (3)

  • Large IBM project:

– 500,000 lines of code (networked operating system) – based on past experience without inspection, expected to find about 800 bugs during tests at trial site – used inspection at 11 stages of devopment – found 8 bugs at trial site!

slide-55
SLIDE 55
✂ ✄ ✄☎ ✆ ✝ ✞ ☎ ✟ ✠ ✄ ✡ ✝ ✟ ☛ ☞ ✌ ✍ ✎ ✏ ✍✑ ✒ ✑ ✓ ☛ ☛ ✔ ✕ ✖ ✖ ✗ ✗ ✗✙✘ ✚ ✝ ✘ ✛ ✂ ✄ ✄☎ ✝ ✂ ✘ ✚✜ ✖✣✢ ✚ ✟ ✝ ✚ ✑ ✒ ✑

Software Inspection Research (1)

  • Research into inspection

– inspection process – techniques for individual inspectors

slide-56
SLIDE 56
✂ ✄ ✄☎ ✆ ✝ ✞ ☎ ✟ ✠ ✄ ✡ ✝ ✟ ☛ ☞ ✌ ✍ ✎ ✏ ✍✑ ✒ ✑ ✓ ☛ ☛ ✔ ✕ ✖ ✖ ✗ ✗ ✗✙✘ ✚ ✝ ✘ ✛ ✂ ✄ ✄☎ ✝ ✂ ✘ ✚✜ ✖✣✢ ✚ ✟ ✝ ✚ ✑ ✒ ✑

Software Inspection Research (2)

  • research at Lucent Technologies (University
  • f Maryland)

– experiment where they varied

✁ ✂ ✄ ☎ ✆✞✝ ✟ ✠ ✡ ☛ ✂☞ ✌✝ ✍ ✎ ✠ ✟ ☞ ✏ ✂ ✄ ☎ ✆✞✝ ✟ ✠ ✡ ✎ ✝ ✑ ☎ ☞ ☛ ✂ ☞ ✌✝ ✍ ✎ ☛ ✂✒ ✎ ✓ ✝ ☞ ✑ ☎ ✝ ✍ ✠ ✔ ✝ ✏ ✎ ✝ ✑ ☎ ☞ ✕ ✠ ✟ ✖ ☛ ✂✒ ☛ ✂ ✌ ✑ ✟ ✑ ✗ ✗ ✝ ✗ ✑ ✂ ✔ ✎ ✝ ✑ ☎ ☞ ✕ ✠ ✟ ✖ ☛ ✂✒ ☛ ✂ ✎ ✑ ✂ ✔ ✝ ☎ ✘ ✕ ✓ ✝ ✟ ✝ ✆ ✄ ✒ ☞ ✕ ✝ ✟ ✝ ✡ ☛ ✙ ✝ ✔ ✆✞✝ ✡ ✠ ✟ ✝ ✚ ✂ ✔ ☛ ✂☞ ✌✝ ✍ ✎ ☛ ✠ ✂ ✎ ✠ ✠ ✖ ✌ ✗ ✑ ✍ ✝ ✛

– one of the conclusions

✏ ☎ ✠ ☞ ✎ ☞ ☛ ✒ ✂ ☛ ✡ ☛ ✍ ✑ ✂ ✎ ☛ ☎ ✌ ✟ ✠ ✜ ✝ ☎ ✝ ✂ ✎ ☞ ☛ ✂ ☛ ✂☞ ✌ ✝ ✍ ✎ ☛ ✠ ✂ ✍ ✠ ☎ ✝ ☞ ✡ ✟ ✠ ☎ ☛ ☎ ✌ ✟ ✠ ✜ ☛ ✂ ✒ ✎ ✓ ✝ ✕ ✑ ✢ ✎ ✓ ✝ ☛ ✂ ☞ ✌✝ ✍ ✎ ✠ ✟ ☞ ✔ ✠ ✎ ✓ ✝ ☛ ✟ ☛ ✂ ✔ ☛ ✜ ☛ ✔ ✄ ✑ ✗ ✕ ✠ ✟ ✖
slide-57
SLIDE 57 ✁ ✂ ✄ ☎ ☎✆ ✝ ✞ ✟ ✆ ✠ ✡ ☎ ☛ ✞ ✠ ☞ ✌ ✍ ✎ ✏ ✑ ✎✒ ✓ ✒ ✔ ☞ ☞ ✕ ✖ ✗ ✗ ✘ ✘ ✘✚✙ ✛ ✞ ✙ ✜ ✄ ☎ ☎✆ ✞ ✄ ✙ ✛✢ ✗✤✣ ✛ ✠ ✞ ✛ ✒ ✓ ✒

Software Inspection Research (3)

  • new techniques to help guide inspectors in

their work

– scenario-based reading

✏ ✝ ✒ ✥ ✌ ✄ ✎ ✢ ✠ ✄ ✟ ☞ ✝ ✗ ✡ ☛ ✂ ✎ ✓ ✝ ✟ ✠ ✗ ✝ ✠ ✡ ✑ ✎ ✝ ☞ ✎ ✝ ✟ ✏ ✓ ✑ ✜ ✝ ✑ ☞ ✝ ✟ ☛ ✝ ☞ ✠ ✡ ✦ ✄ ✝ ☞ ✎ ☛ ✠ ✂ ☞ ✑ ✂ ✔ ☞ ✍✝ ✂ ✑ ✟ ☛ ✠ ☞ ✎ ✠ ✕ ✠ ✟ ✖ ✕ ☛ ✎ ✓ ✑ ☞ ✢ ✠ ✄ ☛ ✂ ☞ ✌✝ ✍ ✎
slide-58
SLIDE 58
✄ ☎ ☎✆ ✝ ✞ ✟ ✆ ✠ ✡ ☎ ☛ ✞ ✠ ☞ ✌ ✍ ✎ ✏ ✑ ✎✒ ✓ ✒ ✔ ☞ ☞ ✕ ✖ ✗ ✗ ✘ ✘ ✘✚✙ ✛ ✞ ✙ ✜ ✄ ☎ ☎✆ ✞ ✄ ✙ ✛✢ ✗✤✣ ✛ ✠ ✞ ✛ ✒ ✓ ✒

Checklists

  • common guidance used for inspections
  • good checklists are hard to make up

– rely on past experience – can get too long and unwieldy – need to be updated as new situations arise – inspectors have a tendency to follow the checklist and do no more – can be misinterpreted – may not cover everything necessary to the right level of detail

slide-59
SLIDE 59
✂ ✄ ☎ ☎✆ ✝ ✞ ✟ ✆ ✠ ✡ ☎ ☛ ✞ ✠ ☞ ✌ ✍ ✎ ✏ ✑ ✎✒ ✓ ✒ ✔ ☞ ☞ ✕ ✖ ✗ ✗ ✘ ✘ ✘✚✙ ✛ ✞ ✙ ✜ ✄ ☎ ☎✆ ✞ ✄ ✙ ✛✢ ✗✤✣ ✛ ✠ ✞ ✛ ✒ ✓ ✒

Approach for Checklists

  • (general approach for inspections as well)
  • determine what qualities are important for the

software system

  • determine what software design/code characteristics

contribute to those qualities

  • determine what you want the inspectors to look for
✥ ✦ ✧✩★ ✪ ✫✩✬ ✭ ✬ ✮ ✯ ✰✲✱ ✬ ★ ✳ ✮ ✦✴ ✭ ✰ ✴ ✬ ★ ✵ ✪ ✶ ✷ ✦✱ ✭ ✭ ✸✩✬ ★ ✪ ✹ ✭ ✷ ✦ ✮ ✬ ✫✩✬ ✺ ✬ ✧ ✪ ✳ ✬ ✮ ★ ✭ ✪ ✹ ✪ ✧ ✧ ✪ ✷
  • checklist used for Assignment 4 is based on McCall's

Quality Model

slide-60
SLIDE 60

McCall's Quality Model

slide-61
SLIDE 61
✂ ✄ ☎ ☎✆ ✝ ✞ ✟ ✆ ✠ ✡ ☎ ☛ ✞ ✠ ☞ ✌ ✍ ✎ ✏ ✑ ✎✒ ✓ ✒ ✔ ☞ ☞ ✕ ✖ ✗ ✗ ✘ ✘ ✘✚✙ ✛ ✞ ✙ ✜ ✄ ☎ ☎✆ ✞ ✄ ✙ ✛✢ ✗✤✣ ✛ ✠ ✞ ✛ ✒ ✓ ✒

Testing

  • Now we move to the subject of testing
  • Recall that software process should include

both testing and inspection

  • Inspecting documents & code before testing

results in fewer defects for testing to find – speeds up testing

  • A bit of informal testing before code

inspection might save time – get rid of

  • bvious bugs quickly
slide-62
SLIDE 62 ✁ ✂ ✄ ☎ ☎✆ ✝ ✞ ✟ ✆ ✠ ✡ ☎ ☛ ✞ ✠ ☞ ✌ ✍ ✎ ✏ ✑ ✎✒ ✁ ✒ ✓ ☞ ☞ ✔ ✕ ✖ ✖ ✗ ✗ ✗✙✘ ✚ ✞ ✘ ✛ ✄ ☎ ☎✆ ✞ ✄ ✘ ✚✜ ✖✣✢ ✚ ✠ ✞ ✚ ✒ ✁ ✒

Testing is Hard!

  • hits budget and schedule limits
  • may include heavy debugging

– may even include product (re-)development

  • bugs slip through to customers

– user executes untested code – order in which statements are executed in actual use differ from that in testing – user applies combination of untested input values – user’s operating environment is never tested

slide-63
SLIDE 63
✂ ✄ ☎ ☎✆ ✝ ✞ ✟ ✆ ✠ ✡ ☎ ☛ ✞ ✠ ☞ ✌ ✍ ✎ ✏ ✑ ✎✒ ✁ ✒ ✓ ☞ ☞ ✔ ✕ ✖ ✖ ✗ ✗ ✗✙✘ ✚ ✞ ✘ ✛ ✄ ☎ ☎✆ ✞ ✄ ✘ ✚✜ ✖✣✢ ✚ ✠ ✞ ✚ ✒ ✁ ✒

Skills of a Tester (1)

  • Not all testers are developers
  • ✁✄✂
☎ ✂ ✆ ✁✝ ✆ ✁ ✞ ✝ ✟ ✆ ✠☛✡ ✞ ✁ ☞ ✌ ✍ ✡ ✟ ✞ ✁✎ ✍ ✡ ✆ ✡ ☎ ✞ ✟ ✎ ✍ ✁ ✞ ✝ ✏ ✠☛✡ ✞ ✁ ☞ ✑ ✞ ✟ ✌ ✆ ✁ ✝ ✆ ✒✔✓ ☎ ✕
  • ✁✄✂
☎ ✂ ✆ ✁✝ ✆ ✒✔✓ ☎ ✖✘✗ ✙ ✙ ✒ ✁ ✝ ✟ ✆ ✚ ✒✔✛ ✞ ✡ ✝ ✡ ✜ ✆
  • testers who are developers must have
✖ ✒ ☞ ✒ ✆✣✢ ✆ ✡ ✝ ✁ ☞ ✁ ✛ ✆ ☎ ✡ ✡ ✙ ✆ ✁✝ ✆ ✛ ✟ ✝ ✁✝
✖ ✒ ☞ ✒ ✆✣✢ ✆ ✡ ✌ ✒ ✆ ✍ ✝ ✆ ✟✓ ✙ ✆ ✍ ✁ ✤ ✡ ✝ ✆ ✝ ✁ ✥ ✁ ✞ ✁ ✙ ✁ ✟ ✙ ☞ ✒✔✓ ✁ ✟ ✓ ✙ ✞ ✁ ✝ ✡ ✗ ✞ ✛ ✁ ✎ ✞ ✁ ✝ ✝ ✗ ✞ ✁ ✝
✖ ✒ ☞ ✒ ✆✣✢ ✆ ✡ ✡ ✞ ☎ ✟ ✓ ✒☛✦ ✁ ✟ ✓ ✙ ✟ ✓ ✟ ☞ ✢ ✦ ✁ ☞ ✟ ✞ ☎ ✁ ✥ ✡ ☞ ✗ ✤ ✁ ✝ ✡ ✜ ✙ ✟ ✆ ✟
✖ ✒ ☞ ✒ ✆✣✢ ✆ ✡ ✝ ✡ ✞ ✆ ✡ ✗ ✆ ✛ ✡ ✤ ✎ ☞ ✁ ✧ ✥ ✁ ✞ ✝ ✒ ✡ ✓ ✛ ✡ ✓ ✆ ✞ ✡ ☞ ✒ ✝ ✝ ✗ ✁ ✝
☞ ✗ ✝ ✆ ✍ ✁ ✟ ✖ ✒ ☞ ✒ ✆ ✒ ✁✝ ✡ ✜ ✟ ✙ ✁ ✥ ✁ ☞ ✡ ✎ ✁ ✞
slide-64
SLIDE 64
✂ ✄ ☎ ☎✆ ✝ ✞ ✟ ✆ ✠ ✡ ☎ ☛ ✞ ✠ ☞ ✌ ✍ ✎ ✏ ✑ ✎✒ ✓ ✒ ✔ ☞ ☞ ✕ ✖ ✗ ✗ ✘ ✘ ✘✚✙ ✛ ✞ ✙ ✜ ✄ ☎ ☎✆ ✞ ✄ ✙ ✛✢ ✗✤✣ ✛ ✠ ✞ ✛ ✒ ✓ ✒

Skills of a Tester (2)

  • More skills employers look for:

– software engineering skills

✥ ✗ ✓ ✙ ✁ ✞ ✝ ✆ ✟✓ ✙ ✒✔✓ ☎ ✆ ✍ ✁ ✞ ✗ ☞ ✁ ✝ ✡ ✜ ✝ ✡ ✜ ✆ ✌ ✟ ✞ ✁ ✁ ✓ ☎ ✒ ✓ ✁ ✁ ✞ ✒✔✓ ☎ ✥ ✛ ✡ ✤ ✎ ✗ ✆ ✁ ✞ ✎ ✞ ✡ ☎ ✞ ✟ ✤ ✤ ✒✔✓ ☎ ✥ ✡ ✎ ✁ ✞ ✟ ✆ ✒✔✓ ☎ ✝ ✢ ✝ ✆ ✁ ✤ ☞ ✁ ✥ ✁ ☞ ✦ ✓ ✡ ✌ ☞ ✁ ✙ ☎ ✁

– communication skills – organizational skills – hands-on experience

slide-65
SLIDE 65
✂ ✄ ☎ ☎✆ ✝ ✞ ✟ ✆ ✠ ✡ ☎ ☛ ✞ ✠ ☞ ✌ ✍ ✎ ✏ ✑ ✎✒ ✓ ✒ ✔ ☞ ☞ ✕ ✖ ✗ ✗ ✘ ✘ ✘✚✙ ✛ ✞ ✙ ✜ ✄ ☎ ☎✆ ✞ ✄ ✙ ✛✢ ✗✤✣ ✛ ✠ ✞ ✛ ✒ ✓ ✒

Attitude For Testers

  • destructive creativity
  • detective skills
  • understanding the product as the sum of its parts
  • appreciating the customer’s perspective
  • requirements change
  • skeptical but not hostile attitude
  • ability to be the bearer of bad news and remain objective
  • an eagerness to embrace new technologies
slide-66
SLIDE 66
✄ ☎ ☎✆ ✝ ✞ ✟ ✆ ✠ ✡ ☎ ☛ ✞ ✠ ☞ ✌ ✍ ✎ ✏ ✑ ✎✒ ✓ ✒ ✔ ☞ ☞ ✕ ✖ ✗ ✗ ✘ ✘ ✘✚✙ ✛ ✞ ✙ ✜ ✄ ☎ ☎✆ ✞ ✄ ✙ ✛✢ ✗✤✣ ✛ ✠ ✞ ✛ ✒ ✓ ✒

Definitions of Testing (1)

  • Myers, Glenford J., The Art of Software

Testing, Wiley, 1979

– “The Process of executing a program with the intent of finding errors”

  • Hetzel, Bill, A Complete Guide to Software

Testing, QED Information Sciences Inc., 1988

– "Testing is any activity aimed at evaluating an attribute or capability of a program or system and determining that it meets its required results."

slide-67
SLIDE 67
✄ ☎ ☎✆ ✝ ✞ ✟ ✆ ✠ ✡ ☎ ☛ ✞ ✠ ☞ ✌ ✍ ✎ ✏ ✑ ✎✒ ✓ ✒ ✔ ☞ ☞ ✕ ✖ ✗ ✗ ✘ ✘ ✘✚✙ ✛ ✞ ✙ ✜ ✄ ☎ ☎✆ ✞ ✄ ✙ ✛✢ ✗✤✣ ✛ ✠ ✞ ✛ ✒ ✓ ✒

Definitions of Testing (2)

  • IEEE Standard 610.12-1990

– “The process of operating a system or component under specified conditions, observing or recording the results, and making an evaluation of some aspect of the system or component”

  • IEEE Standard 829-1983

– “The process of analyzing a software item to detect the differences between existing and required conditions (that is , bugs) and to evaluate the features of the software items”

slide-68
SLIDE 68
✄ ☎ ☎✆ ✝ ✞ ✟ ✆ ✠ ✡ ☎ ☛ ✞ ✠ ☞ ✌ ✍ ✎ ✏ ✑ ✎✒ ✓ ✒ ✔ ☞ ☞ ✕ ✖ ✗ ✗ ✘ ✘ ✘✚✙ ✛ ✞ ✙ ✜ ✄ ☎ ☎✆ ✞ ✄ ✙ ✛✢ ✗✤✣ ✛ ✠ ✞ ✛ ✒ ✓ ✒

Purposes of Testing

  • To find bugs - including bugs in the tests!
  • To estimate reliability in use by tracking the

execution time interval between failures

  • To estimate defects remaining by tracking the defects

found per person-hour of testing and debugging time

  • To decide on when to release: e.g. by deciding that

the remaining known defects are acceptable in the target market

  • To learn where process problems are by classifying

and counting defects found

slide-69
SLIDE 69
✄ ☎ ☎✆ ✝ ✞ ✟ ✆ ✠ ✡ ☎ ☛ ✞ ✠ ☞ ✌ ✍ ✎ ✏ ✑ ✎✒ ✓ ✒ ✔ ☞ ☞ ✕ ✖ ✗ ✗ ✘ ✘ ✘✚✙ ✛ ✞ ✙ ✜ ✄ ☎ ☎✆ ✞ ✄ ✙ ✛✢ ✗✤✣ ✛ ✠ ✞ ✛ ✒ ✓ ✒

What Testing Can't Do

  • Testing can't guarantee code is correct
  • You can't try every possible combination of

inputs, every environment

  • Rigorous testing increases confidence that

software runs correctly, or that few bugs remain

  • For some critical software, formal

mathematical methods used to "prove" correctness – but that's another topic for

  • ther courses
slide-70
SLIDE 70
✄ ☎ ☎✆ ✝ ✞ ✟ ✆ ✠ ✡ ☎ ☛ ✞ ✠ ☞ ✌ ✍ ✎ ✏ ✑ ✎✒ ✓ ✒ ✔ ☞ ☞ ✕ ✖ ✗ ✗ ✘ ✘ ✘✚✙ ✛ ✞ ✙ ✜ ✄ ☎ ☎✆ ✞ ✄ ✙ ✛✢ ✗✤✣ ✛ ✠ ✞ ✛ ✒ ✓ ✒

Stages of Testing (1)

  • Requirements and Design testing

– when requirements and design are written in special languages which permit "execution" to simulate actual system

  • User Interface testing

– Often done at prototyping stage

  • Unit/Module Testing
  • Component/subsystem Testing
slide-71
SLIDE 71 ✁ ✂ ✄ ☎ ☎✆ ✝ ✞ ✟ ✆ ✠ ✡ ☎ ☛ ✞ ✠ ☞ ✌ ✍ ✎ ✏ ✑ ✎✒ ✓ ✒ ✔ ☞ ☞ ✕ ✖ ✗ ✗ ✘ ✘ ✘✚✙ ✛ ✞ ✙ ✜ ✄ ☎ ☎✆ ✞ ✄ ✙ ✛✢ ✗✤✣ ✛ ✠ ✞ ✛ ✒ ✓ ✒

Stages of Testing (2)

  • Integration Testing

– Incremental Testing

  • the

usual version

  • f

integration testing.

  • Daily builds and Sanity testing
  • System Testing

– Performance and Load/Stress Testing – Usability Testing, but this is a late stage to be doing it!

slide-72
SLIDE 72
✂ ✄ ☎ ☎✆ ✝ ✞ ✟ ✆ ✠ ✡ ☎ ☛ ✞ ✠ ☞ ✌ ✍ ✎ ✏ ✑ ✎✒ ✓ ✒ ✔ ☞ ☞ ✕ ✖ ✗ ✗ ✘ ✘ ✘✚✙ ✛ ✞ ✙ ✜ ✄ ☎ ☎✆ ✞ ✄ ✙ ✛✢ ✗✤✣ ✛ ✠ ✞ ✛ ✒ ✓ ✒

Stages of Testing (3)

  • Alpha and Beta Testing

– alpha = testing full system in-house – beta = outside users

  • Acceptance Testing
  • Installation/Compatibility Testing
  • Platform/Configuration/Port testing
slide-73
SLIDE 73
✂ ✄ ☎ ☎✆ ✝ ✞ ✟ ✆ ✠ ✡ ☎ ☛ ✞ ✠ ☞ ✌ ✍ ✎ ✏ ✑ ✎✒ ✓ ✒ ✔ ☞ ☞ ✕ ✖ ✗ ✗ ✘ ✘ ✘✚✙ ✛ ✞ ✙ ✜ ✄ ☎ ☎✆ ✞ ✄ ✙ ✛✢ ✗✤✣ ✛ ✠ ✞ ✛ ✒ ✓ ✒

Stages of Testing (4)

  • Integrity and Release testing
  • ✁✄✂
☎ ✆ ✝✞ ✟ ✠☛✡ ✠ ☞ ✂ ✟ ☎ ✂ ✟✌ ☞ ✌ ✠ ✞ ✟ ✠ ✍ ☞ ✠ ✎✄✏ ✑ ✂ ✁ ✆ ☎ ✠ ✒ ✝✞ ✁ ☞ ✡ ✟ ✂ ✠ ☞ ✟ ✓ ✞ ☎ ✠ ✞ ✁ ✍ ☞ ✠ ✎✕✔ ☞ ✑ ✆ ✌ ✞ ✌ ✒ ☞ ✟ ✠ ✞ ✟ ✁✄✞ ✁✕✔ ✞ ✑ ✌ ☞ ✂ ✟ ☞ ✌ ✍ ✎ ✡ ✠ ☞✖✌ ✡ ☎ ✠ ✆ ✡ ✗ ✗✕✘ ✑ ✞ ✗ ✞ ✡ ✌ ✞ ✁✚✙✛ ✛ ✛
  • Reliability/Certification Testing
✒ ✞ ✌ ✠ ☞ ✝ ✡ ✠ ✞ ✌ ✜✢ ✢ ✣ ✤ ✝✞ ✡ ✟ ✠ ☞ ✝ ✞ ✠ ✂ ✓ ✡ ☞ ✗ ✆ ✑ ✞ ✥ ✍ ☞ ✠ ✎ ✑ ✞ ✓ ✞ ✑ ✞ ✟ ☎ ✞ ✠ ✂ ✂ ✏ ✞ ✑ ✡ ✠ ☞ ✂ ✟ ✡ ✗✄✏ ✑ ✂ ✓ ☞ ✗✄✞ ✌ ✒ ✌ ✂ ✝✞ ✠ ☞ ✝✞ ✌ ✓ ✂ ✑ ☎ ✞ ✑ ✠ ☞ ✓ ☞ ☎ ✡ ✠ ☞ ✂ ✟ ✂ ✓ ☎ ✂ ✟ ✓ ✂ ✑ ✝ ✡ ✟ ☎ ✞ ✠ ✂ ✡ ✌ ✠☛✡ ✟ ✁ ✡ ✑ ✁ ✦ ✞ ✛ ✧ ✛ ★ ✩ ✪ ✩ ✤ ★ ✁ ✡ ✥ ✙ ✫ ✬✭ ✏ ✑ ✂ ✠ ✂ ☎ ✂ ✗ ✠ ✞ ✌ ✠ ✌ ✆ ☞ ✠ ✞ ✌
  • Security/Fault Tolerance/Recovery testing
  • Regression Testing
slide-74
SLIDE 74 ✁ ✂ ✄ ☎ ☎✆ ✝ ✞ ✟ ✆ ✠ ✡ ☎ ☛ ✞ ✠ ☞ ✌ ✍ ✎ ✏ ✑ ✎✒ ✓ ✒ ✔ ☞ ☞ ✕ ✖ ✗ ✗ ✘ ✘ ✘✚✙ ✛ ✞ ✙ ✜ ✄ ☎ ☎✆ ✞ ✄ ✙ ✛✢ ✗✤✣ ✛ ✠ ✞ ✛ ✒ ✓ ✒

Black Box Testing

  • pick test cases based on requirements only
  • don't use knowledge of implementation
  • view code as a black box: insides not visible
  • can be used at any stage:

– unit, subsystem, system testing

slide-75
SLIDE 75 ✁ ✂ ✄ ☎ ☎✆ ✝ ✞ ✟ ✆ ✠ ✡ ☎ ☛ ✞ ✠ ☞ ✌ ✍ ✎ ✏ ✑ ✎✒ ✓ ✒ ✔ ☞ ☞ ✕ ✖ ✗ ✗ ✘ ✘ ✘✚✙ ✛ ✞ ✙ ✜ ✄ ☎ ☎✆ ✞ ✄ ✙ ✛✢ ✗✤✣ ✛ ✠ ✞ ✛ ✒ ✓ ✒

Black-Box Testing Strategies

  • look at specifications for inputs
  • test normal use:

– sampling of "normal" inputs (random values)

  • test abnormal use:

– different kinds of erroneous/illegal input – combinations of errors

  • test boundary conditions:

– values close to boundary between normal and abnormal

slide-76
SLIDE 76
✄ ☎ ☎✆ ✝ ✞ ✟ ✆ ✠ ✡ ☎ ☛ ✞ ✠ ☞ ✌ ✍ ✎ ✏ ✑ ✎✒ ✓ ✒ ✔ ☞ ☞ ✕ ✖ ✗ ✗ ✘ ✘ ✘✚✙ ✛ ✞ ✙ ✜ ✄ ☎ ☎✆ ✞ ✄ ✙ ✛✢ ✗✤✣ ✛ ✠ ✞ ✛ ✒ ✓ ✒

Example

/** * Raises a number to an integral power. * * @param base the number to be raised to a power * @param pow the power to which base is to be raised. * Must not be negative. * @return base raised to the pow-th power */ static double power(double base, int pow) {

  • error inputs: negative values for pow
  • boundary cases: pow = 0, pow = 1, pow = -1
  • normal cases:

– pow >= 2, range of values – base: negative, 0, positive – combinations of these

slide-77
SLIDE 77
✄ ☎ ☎✆ ✝ ✞ ✟ ✆ ✠ ✡ ☎ ☛ ✞ ✠ ☞ ✌ ✍ ✎ ✏ ✑ ✎✒ ✓ ✒ ✔ ☞ ☞ ✕ ✖ ✗ ✗ ✘ ✘ ✘✚✙ ✛ ✞ ✙ ✜ ✄ ☎ ☎✆ ✞ ✄ ✙ ✛✢ ✗✤✣ ✛ ✠ ✞ ✛ ✒ ✓ ✒

Possibilities For Automation

  • Ideal: tool to generate set of test cases and

expected results from specifications

  • Reality: needs very precise, mathematical

specifications, usually not available

  • So usually generate test cases & expected

results by hand

  • Automated execution is still possible
slide-78
SLIDE 78
✄ ☎ ☎✆ ✝ ✞ ✟ ✆ ✠ ✡ ☎ ☛ ✞ ✠ ☞ ✌ ✍ ✎ ✏ ✑ ✎✒ ✓ ✒ ✔ ☞ ☞ ✕ ✖ ✗ ✗ ✘ ✘ ✘✚✙ ✛ ✞ ✙ ✜ ✄ ☎ ☎✆ ✞ ✄ ✙ ✛✢ ✗✤✣ ✛ ✠ ✞ ✛ ✒ ✓ ✒

Test Harness

  • Takes set of test inputs & expected results
  • Runs program on each test input, compares

results with expected

  • Reports any discrepancies
  • Complicated to write for GUIs, embedded

systems, but often possible

  • Takes lots of drudgery out of testing
  • Makes testers willing to run and re-run large

test suites

slide-79
SLIDE 79
✄ ☎ ☎✆ ✝ ✞ ✟ ✆ ✠ ✡ ☎ ☛ ✞ ✠ ☞ ✌ ✍ ✎ ✏ ✑ ✎✒ ✓ ✒ ✔ ☞ ☞ ✕ ✖ ✗ ✗ ✘ ✘ ✘✚✙ ✛ ✞ ✙ ✜ ✄ ☎ ☎✆ ✞ ✄ ✙ ✛✢ ✗✤✣ ✛ ✠ ✞ ✛ ✒ ✓ ✒

White Box Testing

  • Pick test cases based on the actual software
  • also called "clear box" or "structural" testing
  • key word is coverage:

– do the test cases cover all of the code?

  • different measures of coverage
slide-80
SLIDE 80 ✁ ✂ ✄ ☎ ☎✆ ✝ ✞ ✟ ✆ ✠ ✡ ☎ ☛ ✞ ✠ ☞ ✌ ✍ ✎ ✏ ✑ ✎✒ ✓ ✒ ✔ ☞ ☞ ✕ ✖ ✗ ✗ ✘ ✘ ✘✚✙ ✛ ✞ ✙ ✜ ✄ ☎ ☎✆ ✞ ✄ ✙ ✛✢ ✗✤✣ ✛ ✠ ✞ ✛ ✒ ✓ ✒

Statement Coverage

  • Every statement in the software must be

executed at least once by the test cases

  • Quote from text (Murray):

– "Testing less than this for new software is unconscionable and should be criminalized"

  • NASA story
slide-81
SLIDE 81
✂ ✄ ☎ ☎✆ ✝ ✞ ✟ ✆ ✠ ✡ ☎ ☛ ✞ ✠ ☞ ✌ ✍ ✎ ✏ ✑ ✎✒ ✓ ✒ ✔ ☞ ☞ ✕ ✖ ✗ ✗ ✘ ✘ ✘✚✙ ✛ ✞ ✙ ✜ ✄ ☎ ☎✆ ✞ ✄ ✙ ✛✢ ✗✤✣ ✛ ✠ ✞ ✛ ✒ ✓ ✒

Branch Coverage

  • Every branch alternative must be covered by

at least one test case

  • More demanding than statement coverage:

if (x > 3) y = 14; // continue -- no else part

  • We need at least one test case where x > 3 is

and at least one where x > 3 is false.

slide-82
SLIDE 82
✂ ✄ ☎ ☎✆ ✝ ✞ ✟ ✆ ✠ ✡ ☎ ☛ ✞ ✠ ☞ ✌ ✍ ✎ ✏ ✑ ✎✒ ✓ ✒ ✔ ☞ ☞ ✕ ✖ ✗ ✗ ✘ ✘ ✘✚✙ ✛ ✞ ✙ ✜ ✄ ☎ ☎✆ ✞ ✄ ✙ ✛✢ ✗✤✣ ✛ ✠ ✞ ✛ ✒ ✓ ✒

Path Coverage

  • Every possible path through the program must be

covered by at least one test case

void tst(int x) { if (x>0) pos = pos+1; if (x%2==0) even = even+1; return; }

  • Needs 4 test cases:

– all combinations alternatives

√ √

  • ✁✄✂
☎ ✆ ✆

√ √

  • ✁✄✂
✝ ✞ ✝✟
✡ ☛
slide-83
SLIDE 83 ✁ ✂ ✄ ☎ ☎✆ ✝ ✞ ✟ ✆ ✠ ✡ ☎ ☛ ✞ ✠ ☞ ✌ ✍ ✎ ✏ ✑ ✎ ✁ ✒ ✁ ✓ ☞ ☞ ✔ ✕ ✖ ✖ ✗ ✗ ✗✙✘ ✚ ✞ ✘ ✛ ✄ ☎ ☎✆ ✞ ✄ ✘ ✚✜ ✖✣✢ ✚ ✠ ✞ ✚ ✁ ✒ ✁

Example

void tst(int x) { if (x>0) pos = pos+1; if (x%2==0) even = even+1; }

  • Statement Coverage: tst(2)
  • Branch Coverage: tst(-1),tst(2)
  • Path Coverage: tst(-2),tst(-1),tst(1),tst(2)
slide-84
SLIDE 84
✄ ☎ ☎✆ ✝ ✞ ✟ ✆ ✠ ✡ ☎ ☛ ✞ ✠ ☞ ✌ ✍ ✎ ✏ ✑ ✎ ✁ ✒ ✁ ✓ ☞ ☞ ✔ ✕ ✖ ✖ ✗ ✗ ✗✙✘ ✚ ✞ ✘ ✛ ✄ ☎ ☎✆ ✞ ✄ ✘ ✚✜ ✖✣✢ ✚ ✠ ✞ ✚ ✁ ✒ ✁

What About Loops?

  • May require test cases which make each loop

execute 0 times, 1 time, many times

  • for (int i = 0; i < n; i++) {...}

– Test cases should include:

  • n <= 0 (no times around the loop)
  • n = 1 (one time around the loop)
  • n > 1 (several times around the loop)
slide-85
SLIDE 85
✂ ✄ ☎ ☎✆ ✝ ✞ ✟ ✆ ✠ ✡ ☎ ☛ ✞ ✠ ☞ ✌ ✍ ✎ ✏ ✑ ✎✒ ✓ ✒ ✔ ☞ ☞ ✕ ✖ ✗ ✗ ✘ ✘ ✘✚✙ ✛ ✞ ✙ ✜ ✄ ☎ ☎✆ ✞ ✄ ✙ ✛✢ ✗✤✣ ✛ ✠ ✞ ✛ ✒ ✓ ✒

More About Loops

  • real time software generally runs inside an

infinite loop

– need to carefully define what you mean by path or loop coverage

slide-86
SLIDE 86
✄ ☎ ☎✆ ✝ ✞ ✟ ✆ ✠ ✡ ☎ ☛ ✞ ✠ ☞ ✌ ✍ ✎ ✏ ✑ ✎✒ ✓ ✒ ✔ ☞ ☞ ✕ ✖ ✗ ✗ ✘ ✘ ✘✚✙ ✛ ✞ ✙ ✜ ✄ ☎ ☎✆ ✞ ✄ ✙ ✛✢ ✗✤✣ ✛ ✠ ✞ ✛ ✒ ✓ ✒

Path Coverage: Impossible Combinations

  • Not all combinations are possible:

if (x > 2) ... else ... if (x > 4) ... else ...

  • impossible to have first loop false, second

true – no test case for that combination

slide-87
SLIDE 87
✄ ☎ ☎✆ ✝ ✞ ✟ ✆ ✠ ✡ ☎ ☛ ✞ ✠ ☞ ✌ ✍ ✎ ✏ ✑ ✎✒ ✓ ✒ ✔ ☞ ☞ ✕ ✖ ✗ ✗ ✘ ✘ ✘✚✙ ✛ ✞ ✙ ✜ ✄ ☎ ☎✆ ✞ ✄ ✙ ✛✢ ✗✤✣ ✛ ✠ ✞ ✛ ✒ ✓ ✒

Path Coverage: Combinatorial Explosion

  • Large method with many branches and

loops:

– many combinations, lots of test cases – difficult to manage – May catch sepcial inputs that trigger an error

  • Full path coverage only practical for unit

testing

slide-88
SLIDE 88
✄ ☎ ☎✆ ✝ ✞ ✟ ✆ ✠ ✡ ☎ ☛ ✞ ✠ ☞ ✌ ✍ ✎ ✏ ✑ ✎✒ ✓ ✒ ✔ ☞ ☞ ✕ ✖ ✗ ✗ ✘ ✘ ✘✚✙ ✛ ✞ ✙ ✜ ✄ ☎ ☎✆ ✞ ✄ ✙ ✛✢ ✗✤✣ ✛ ✠ ✞ ✛ ✒ ✓ ✒

Example

static double power(double base, int pow) { double answer = 1; while (pow > 0) { if (pow % 2 == 0) { // pow is even pow = pow / 2; base = base * base; } else { // pow is odd pow = pow - 1; answer = answer * base; } // end if } // end while return answer; } // end power

White box checklist: pow = 0, 1, 2, bigger (so while loop executed 0, 1, many times) even and odd powers to exercise both parts of if statement

slide-89
SLIDE 89
✄ ☎ ☎✆ ✝ ✞ ✟ ✆ ✠ ✡ ☎ ☛ ✞ ✠ ☞ ✌ ✍ ✎ ✏ ✑ ✎✒ ✓ ✒ ✔ ☞ ☞ ✕ ✖ ✗ ✗ ✘ ✘ ✘✚✙ ✛ ✞ ✙ ✜ ✄ ☎ ☎✆ ✞ ✄ ✙ ✛✢ ✗✤✣ ✛ ✠ ✞ ✛ ✒ ✓ ✒

Data Flow Testing

  • Another kind of white box testing
  • exercise (in order of weakest to strongest testing)

– all input and output variables – both truth values of all predicates – all definitions of variables (eg variables on LHS of assignments) – all uses of variables that are defined – all loops

slide-90
SLIDE 90
✄ ☎ ☎✆ ✝ ✞ ✟ ✆ ✠ ✡ ☎ ☛ ✞ ✠ ☞ ✌ ✍ ✎ ✏ ✑ ✎✒ ✓ ✒ ✔ ☞ ☞ ✕ ✖ ✗ ✗ ✘ ✘ ✘✚✙ ✛ ✞ ✙ ✜ ✄ ☎ ☎✆ ✞ ✄ ✙ ✛✢ ✗✤✣ ✛ ✠ ✞ ✛ ✒ ✓ ✒

Possibilities For Automation

  • Ideal: tool to generate set of test cases satisfying

coverage requirements

✁ ✂ ✄ ☎ ✆ ✝ ✞ ✟ ✟ ✞ ✠ ✡ ☛ ☞
  • Can't generate expected output from code!
  • Some help: tools to help verify coverage:
✌ ✍ ✎ ✏✒✑ ✎ ✓ ✔✖✕ ✔✖✗ ✘ ✗ ✙ ✔ ✓ ✍ ✗ ✚ ✗ ✗ ✛ ✗ ✑ ✜ ✔✖✗ ✢ ✣✥✤ ✔ ✎ ✏ ✓ ✔✖✗ ✓ ✔ ✑ ✕ ✓ ✗✧✦ ★ ✚ ✔ ✎ ✏ ✓ ✓ ✗ ✔ ★ ✩ ✔✖✗ ✓ ✔ ✑ ✕ ✓ ✗ ✓ ✪ ✌ ✍ ✎ ✏✒✑ ✎ ✣ ✚ ✕ ✙ ✑ ✎ ✕ ✫ ✔✖✗ ✚ ✙ ✕ ✔ ✏✭✬ ✗ ✓ ✍ ✗ ✚ ✗ ✗ ✛ ✗ ✑ ✜ ✔✖✗ ✢ ✪ ✌ ✍ ✎ ✏✒✑ ✎ ✮ ✕ ✔ ✎ ✓ ✪ ✌ ✔✖✗ ✓ ✔ ✎ ✕ ✚ ✙ ✗ ✓ ✓ ✓ ✔ ✏ ✫ ✫ ✜ ✓ ✗ ✩ ✜ ✫ ✦ ★ ✚ ✕ ✣ ★ ✬ ✗ ✑ ✕ ✙ ✣ ✗ ✏ ✙ ✔ ✗ ✯ ✚ ✕ ✔✖✗ ✢ ✏ ✙ ✔ ★ ✎ ✕ ✚ ✙ ✗ ✓ ✓
slide-91
SLIDE 91
✂ ✄ ☎ ☎✆ ✝ ✞ ✟ ✆ ✠ ✡ ☎ ☛ ✞ ✠ ☞ ✌ ✍ ✎ ✏ ✑ ✎✒ ✓ ✒ ✔ ☞ ☞ ✕ ✖ ✗ ✗ ✘ ✘ ✘✚✙ ✛ ✞ ✙ ✜ ✄ ☎ ☎✆ ✞ ✄ ✙ ✛✢ ✗✤✣ ✛ ✠ ✞ ✛ ✒ ✓ ✒

White Box Alone

  • White box alone is not a good way to

generate test cases.

– may lead to focus on less important parts – intrinsically leads to incomplete testing – if coder overlooked possibilities, test cases will not detect them

slide-92
SLIDE 92
✂ ✄ ☎ ☎✆ ✝ ✞ ✟ ✆ ✠ ✡ ☎ ☛ ✞ ✠ ☞ ✌ ✍ ✎ ✏ ✑ ✎✒ ✓ ✒ ✔ ☞ ☞ ✕ ✖ ✗ ✗ ✘ ✘ ✘✚✙ ✛ ✞ ✙ ✜ ✄ ☎ ☎✆ ✞ ✄ ✙ ✛✢ ✗✤✣ ✛ ✠ ✞ ✛ ✒ ✓ ✒

Black Box Alone

  • Black box alone may not cover the code

adequately

– some special cases are not obvious from specifications, depend on algorithms

  • Studies examined black box test suites

developers considered extremely thorough

– only exercised 1/3 to 1/2 of code!

slide-93
SLIDE 93
✂ ✄ ☎ ☎✆ ✝ ✞ ✟ ✆ ✠ ✡ ☎ ☛ ✞ ✠ ☞ ✌ ✍ ✎ ✏ ✑ ✎✒ ✓ ✒ ✔ ☞ ☞ ✕ ✖ ✗ ✗ ✘ ✘ ✘✚✙ ✛ ✞ ✙ ✜ ✄ ☎ ☎✆ ✞ ✄ ✙ ✛✢ ✗✤✣ ✛ ✠ ✞ ✛ ✒ ✓ ✒

Another Example: Background

  • Heron's formula for area of triangle:

– let s = – area =

  • Example program takes three sides of triangle as

command-line arguments (string form)

  • checks to make sure it's an equilateral triangle
✂ ✄☎ ✆✞✝ ✟ ✠ ✁ ✄ ✆☛✡ ☞ ✠ ✠ ☎ ✠ ✌ ☞ ✡ ✡ ✍✎ ☞ ✏ ✁ ✂✒✑ ☞ ✡ ✝ ✓ ☎ ✌ ✟ ✔ ✆ ☞ ✡ ✍ ✄ ✕ ✟ ✠ ✁ ✄ ✆☛✡ ✍ ✠ ☞ ✍

2 c b a + + ) )( )( ( c s b s a s s − − −

slide-94
SLIDE 94
✂ ✄ ☎ ☎✆ ✝ ✞ ✟ ✆ ✠ ✡ ☎ ☛ ✞ ✠ ☞ ✌ ✍ ✎ ✏ ✑ ✎✒ ✓ ✒ ✔ ☞ ☞ ✕ ✖ ✗ ✗ ✘ ✘ ✘✚✙ ✛ ✞ ✙ ✜ ✄ ☎ ☎✆ ✞ ✄ ✙ ✛✢ ✗✤✣ ✛ ✠ ✞ ✛ ✒ ✓ ✒

Example Code with two Branches

public class Triangle { public static void main(String args []) { int sideA = Integer.parseInt(args[0]); int sideB = Integer.parseInt(args[1]); int sideC = Integer.parseInt(args[1]); if ((sideA == sideB) && (sideA == sideC)) { double s = 0.5 * (sideA + sideB + sideC); double area = Math.sqrt(s / (s - sideA) * (s - sideB) * (s - sideC)); System.out.println("area = " + area); } else System.out.println("not equilateral"); } // end main } // end class

slide-95
SLIDE 95
✄ ☎ ☎✆ ✝ ✞ ✟ ✆ ✠ ✡ ☎ ☛ ✞ ✠ ☞ ✌ ✍ ✎ ✏ ✑ ✎✒ ✓ ✒ ✔ ☞ ☞ ✕ ✖ ✗ ✗ ✘ ✘ ✘✚✙ ✛ ✞ ✙ ✜ ✄ ☎ ☎✆ ✞ ✄ ✙ ✛✢ ✗✤✣ ✛ ✠ ✞ ✛ ✒ ✓ ✒

Branch Coverage

  • one if statement, so two test cases needed
  • false case: pick sides that aren't equal

– run Triangle 2 3 4 – output: not equilateral

  • true case: pick equal sides

– run Triangle 2 2 2 – output: area = 1.7320508075688772

  • output is correct, looks like all is well
slide-96
SLIDE 96 ✁ ✂ ✄ ☎ ☎✆ ✝ ✞ ✟ ✆ ✠ ✡ ☎ ☛ ✞ ✠ ☞ ✌ ✍ ✎ ✏ ✑ ✎✒ ✓ ✒ ✔ ☞ ☞ ✕ ✖ ✗ ✗ ✘ ✘ ✘✚✙ ✛ ✞ ✙ ✜ ✄ ☎ ☎✆ ✞ ✄ ✙ ✛✢ ✗✤✣ ✛ ✠ ✞ ✛ ✒ ✓ ✒

Two Errors not Caught by Test Cases

public class Triangle { public static void main(String args []) { int sideA = Integer.parseInt(args[0]); int sideB = Integer.parseInt(args[1]); int sideC = Integer.parseInt(args[1]); if ((sideA == sideB) && (sideA == sideC)) { double s = 0.5 * (sideA + sideB + sideC); double area = Math.sqrt(s / (s - sideA) * (s - sideB) * (s - sideC)); System.out.println("area = " + area); } else System.out.println("not equilateral"); } // end main } // end class

should be 2 should be *

slide-97
SLIDE 97
✄ ☎ ☎✆ ✝ ✞ ✟ ✆ ✠ ✡ ☎ ☛ ✞ ✠ ☞ ✌ ✍ ✎ ✏ ✑ ✎✒ ✓ ✒ ✔ ☞ ☞ ✕ ✖ ✗ ✗ ✘ ✘ ✘✚✙ ✛ ✞ ✙ ✜ ✄ ☎ ☎✆ ✞ ✄ ✙ ✛✢ ✗✤✣ ✛ ✠ ✞ ✛ ✒ ✓ ✒

Combining the Two Approaches

  • pick a set of test cases from the specification

(black box)

  • then look at code (white box) and see if test cases

cover the code adequately

  • it not, add more to complete coverage
  • power example:

– black box alone didn't tell us it was important to make sure we tested both odd and even powers – suggests additional test cases: pow = 16, pow = 15

slide-98
SLIDE 98
✄ ☎ ☎✆ ✝ ✞ ✟ ✆ ✠ ✡ ☎ ☛ ✞ ✠ ☞ ✌ ✍ ✎ ✏ ✑ ✎✒ ✓ ✒ ✔ ☞ ☞ ✕ ✖ ✗ ✗ ✘ ✘ ✘✚✙ ✛ ✞ ✙ ✜ ✄ ☎ ☎✆ ✞ ✄ ✙ ✛✢ ✗✤✣ ✛ ✠ ✞ ✛ ✒ ✓ ✒

Testing at Different Levels

  • Unit testing:

– dual black box/clear box approach – level of smallest granularity: want to look at code

  • Above unit testing level: gray box

– awareness of structure, but not all details,

  • System testing: primarily black box
slide-99
SLIDE 99
✄ ☎ ☎✆ ✝ ✞ ✟ ✆ ✠ ✡ ☎ ☛ ✞ ✠ ☞ ✌ ✍ ✎ ✏ ✑ ✎✒ ✓ ✒ ✔ ☞ ☞ ✕ ✖ ✗ ✗ ✘ ✘ ✘✚✙ ✛ ✞ ✙ ✜ ✄ ☎ ☎✆ ✞ ✄ ✙ ✛✢ ✗✤✣ ✛ ✠ ✞ ✛ ✒ ✓ ✒

Stages

  • Big Bang Testing: go right to System Testing

– generally least effective – very difficult to find bugs – avoid this!

  • Better way:

– test all modules individually (unit testing) – put together gradually & test larger pieces

✂ ✄ ☎✝✆ ✞ ✟ ✠ ☎ ✂ ✡ ✄ ☛✌☞ ✍ ✎ ☞ ✏ ☞ ☎ ✆ ✑ ☎ ✆ ☞ ☎ ✂ ✄ ✞ ✒

– finally test whole system

slide-100
SLIDE 100
✁ ✂ ✄ ☎ ☎✆ ✝ ✞ ✟ ✆ ✠ ✡ ☎ ☛ ✞ ✠ ☞ ✌ ✍ ✎ ✏ ✑ ✎✒ ✓ ✒ ✔ ☞ ☞ ✕ ✖ ✗ ✗ ✘ ✘ ✘✚✙ ✛ ✞ ✙ ✜ ✄ ☎ ☎✆ ✞ ✄ ✙ ✛✢ ✗✤✣ ✛ ✠ ✞ ✛ ✒ ✓ ✒

Integration Testing

  • Tests uses between modules - source of 40%
  • f all errors in code.
  • Incremental: Top Down vs. Bottom Up

– start with tested modules in either case – planning of increments starts early

✦ ✧ ★ ✩✪ ✫ ✬ ✭ ✧ ✩ ✭ ✬ ✮ ✫ ✧ ★ ✯ ✪ ★ ✥ ✬ ✥ ✦ ✰ ✬ ✫ ✮ ✫ ✱ ✦✳✲

– top down requires stubs – bottom up requires drivers – 'sandwich' variants exist

slide-101
SLIDE 101
✄ ☎ ☎✆ ✝ ✞ ✟ ✆ ✠ ✡ ☎ ☛ ✞ ✠ ☞ ✌ ✍ ✎ ✏ ✑ ✎✒ ✓ ✒ ✔ ☞ ☞ ✕ ✖ ✗ ✗ ✘ ✘ ✘✚✙ ✛ ✞ ✙ ✜ ✄ ☎ ☎✆ ✞ ✄ ✙ ✛✢ ✗✤✣ ✛ ✠ ✞ ✛ ✒ ✓ ✒

System Testing

  • Functional Testing (does it work?)
  • Also:
✥ ✦ ✰ ✧ ✰ ✯★✪✩ ✫ ✧ ✮ ✪✬✩ ✭ ✬ ✫ ✮ ✧ ✫ ✧ ✮ ✯ ✱ ✬ ✮ ✯ ✪ ✯ ✰ ✫ ✬ ✥ ✥ ✦ ✬ ✥ ✰ ✰ ✯★ ✥ ✱ ✥ ✮ ✲ ✰ ✩ ✰ ✰ ✲ ✦ ✬ ✥ ✰ ✰ ✯ ★ ✥ ✯ ✬ ✱ ★ ✫ ✰ ✰ ✲ ✦ ✬ ✥ ✰ ✰ ✯★ ✥ ✯ ✰ ✧ ✫ ✮★ ✬ ✰ ✬ ✥ ✰ ✰ ✯★ ✥ ✭ ✫ ✧ ✱ ✬ ✪ ★ ✫ ✬ ✮ ✯ ✪ ✪ ✧ ✱ ★ ✧ ✬ ✯ ✰ ✰ ✬ ✥ ✰ ✰ ✯★ ✳ ✴✶✵ ✷ ✵ ✸ ✹ ✴ ✺ ✻✼ ✽ ✸ ✼ ✾ ✹ ✿ ❀❂❁ ❃❄ ❅ ❁ ❆ ❇ ❈ ❁ ❉ ❈ ❊❂❋
❍❂■ ❆ ❏▲❑ ■ ❆ ❁ ❃ ❄ ❋ ▼ ❊
❆ ■ ❈ ❊ ❄ ❋ ❈ ❁ ❉ ❈ ❊ ❋
  • – etc.
slide-102
SLIDE 102
  • ✁✂
✄ ☎ ✆ ✆✝ ✞ ✟ ✠ ✝ ✡ ☛ ✆ ☞ ✟ ✡ ✌ ✍ ✎ ✏ ✑ ✒ ✏✓ ✂ ✓ ✔ ✌ ✌ ✕ ✖ ✗ ✗ ✘ ✘ ✘✚✙ ✛ ✟ ✙ ✜ ☎ ✆ ✆✝ ✟ ☎ ✙ ✛✢ ✗✤✣ ✛ ✡ ✟ ✛ ✓ ✂ ✓

Regression Testing

  • after system is modified:

– bug fix, change or extension

  • should run all tests over again
  • bug fix in one module can show up bugs in

another – module interactions change

  • automation is a great help here
slide-103
SLIDE 103
  • ✁✂
✄ ☎ ✆ ✆✝ ✞ ✟ ✠ ✝ ✡ ☛ ✆ ☞ ✟ ✡ ✌ ✍ ✎ ✏ ✑ ✒ ✏ ✂ ✓ ✂ ✔ ✌ ✌ ✕ ✖ ✗ ✗ ✘ ✘ ✘✚✙ ✛ ✟ ✙ ✜ ☎ ✆ ✆✝ ✟ ☎ ✙ ✛✢ ✗✤✣ ✛ ✡ ✟ ✛ ✂ ✓ ✂

Regression Testing Issues (1)

  • After changes to system, may need to update test

plan, test cases.

✥ ✦✤✧ ★✪✩ ✫ ★✪✬ ✭ ✫✯✮ ✩ ✫ ✰✱ ✩ ✮ ✩ ✲ ✱ ✳ ✴ ✮ ✵ ✮ ✶ ✩ ✱ ✴✷ ✮ ✸ ✵ ✮ ✫✯✮ ✩ ✫✯✱ ✴✷ ✮ ✸ ✹ ✵ ✹ ✴ ✩ ✹ ✷ ✮ ✫✯✮ ✺ ✻ ✼ ✮ ✵ ✮ ★✪✩ ✱ ✫ ✵ ✱ ✽ ✮✿✾ ✹ ❀ ❀ ✴ ✮ ✫❂❁ ✮ ✮ ✬ ❃ ✹ ✩ ✩ ★ ✴ ✷ ✮ ✵ ✮ ✽ ✶ ✬ ✽ ✱ ✬ ✫ ✫✯✮ ✩ ✫ ★ ✬ ✭ ✰ ✹ ✩ ✫ ✩ ✱ ✬ ✽ ✫ ✼ ✮ ✰ ✹ ✩ ✫ ✩ ✹ ❀ ✽ ✮ ✰ ★ ✽ ★ ✬ ✭ ❁ ✼ ★ ✰ ✼ ✫✯✮ ✩ ✫ ✵ ✮ ✩ ✶ ✷ ✫ ✩ ✰✱ ✬ ✴ ✮ ✵ ✮ ✶ ✩ ✮ ✽ ✱ ✬ ✽ ❁ ✼ ★ ✰ ✼ ✫ ✮ ✩ ✫ ✰ ✱ ✩ ✮ ✩ ✰ ✱ ✬ ✴ ✮ ✵ ✮ ✵ ✶ ✬❅❄ ✺ ❆ ✹ ✲ ✮ ✫✯✮ ✩ ✫ ✰ ✱ ✩ ✮ ✩ ✲ ✱ ✳ ✬ ✮ ✮ ✽ ✫ ✹ ✴ ✮ ✽ ✵ ✹ ❃ ❃ ✮ ✽ ✺ ✬ ✮ ❁ ✫✯✮ ✩ ✫ ✰ ✱ ✩ ✮ ✩ ✲ ✱ ✳ ✴ ✮ ✬ ✮ ✮ ✽ ✮ ✽
  • 2 types of regression testing
✺ ❃ ✵ ✹ ✭ ✵ ✮ ✩ ✩ ★✤❇ ✮ ❈❉✩ ❃ ✮ ✰ ★ ❀ ★ ✰✱ ✫ ★ ✹ ✬ ✼ ✱ ✩ ✰ ✼ ✱ ✬ ✭ ✮ ✽❊ ✺ ✰ ✹ ✵ ✵ ✮ ✰ ✫ ★✤❇ ✮ ❈❉✩ ❃ ✮ ✰ ★ ❀ ★ ✰ ✱ ✫ ★ ✹ ✬ ★✪✩ ✶ ✬ ✰ ✼ ✱ ✬ ✭ ✮ ✽❊ ❄
slide-104
SLIDE 104
✂ ✄ ☎ ✆ ✆✝ ✞ ✟ ✠ ✝ ✡ ☛ ✆ ☞ ✟ ✡ ✌ ✍ ✎ ✏ ✑ ✒ ✏✓ ✔ ✓ ✕ ✌ ✌ ✖ ✗ ✘ ✘ ✙ ✙ ✙✛✚ ✜ ✟ ✚ ✢ ☎ ✆ ✆✝ ✟ ☎ ✚ ✜✣ ✘✥✤ ✜ ✡ ✟ ✜ ✓ ✔ ✓

Regression Testing Issues (2)

  • corrective modifications may require progressive

regression testing if the original specifications were in error

  • Version control is a major issue
✺ ✬ ✮ ✮ ✽ ✮ ✽ ✹ ✬ ✮ ❇ ✮ ✵ ✳ ✫ ✼ ★ ✬ ✭ ✦ ✰ ✹ ✽ ✮❅✸ ✫✯✮ ✩ ✫ ✩ ✶ ★ ✫✯✮ ✩ ✸ ✽ ✱ ✫ ✱ ✸ ✽ ✹ ✰ ✶ ✲ ✮ ✬ ✫ ✱ ✫ ★ ✹ ✬ ✸ ✷ ✮ ❇ ✮ ✷ ✹ ❀ ✹ ❃ ✮ ✵ ✱ ✫ ★ ✬ ✭ ✩ ✳ ✩ ✫✯✮ ✲ ✸ ✰ ✹ ✲ ❃ ★ ✷ ✮ ✵ ✸ ✷ ★✪✬ ✧ ✮ ✵ ✸ ❃ ✹ ✩ ✩ ★ ✴✷ ✳ ✼ ✱ ✵ ✽ ❁ ✱ ✵ ✮ ★ ❀ ✰ ✼ ✱ ✬ ✭ ✮ ✩ ✱ ✵ ✮ ✴ ✮ ★ ✬ ✭ ✲ ✱ ✽ ✮ ✸ ❄ ❄ ❄
slide-105
SLIDE 105
☎ ✆ ✆✝ ✞ ✟ ✠ ✝ ✡ ☛ ✆ ☞ ✟ ✡ ✌ ✍ ✎ ✏ ✑ ✒ ✏✓ ✔ ✓ ✕ ✌ ✌ ✖ ✗ ✘ ✘ ✙ ✙ ✙✛✚ ✜ ✟ ✚ ✢ ☎ ✆ ✆✝ ✟ ☎ ✚ ✜✣ ✘✥✤ ✜ ✡ ✟ ✜ ✓ ✔ ✓

Acceptance Testing

  • Testing

specified early as criteria for accepting product

  • Can be dangerous! If tests are pre-specified,

software may pass tests but not do much else (Ada compilers)

  • Good acceptance testing does not involve

detailed prior specification of the tests, but depends on precise, complete and correct system specifications.

slide-106
SLIDE 106
  • ✁✂
✄ ☎ ✆ ✆✝ ✞ ✟ ✠ ✝ ✡ ☛ ✆ ☞ ✟ ✡ ✌ ✍ ✎ ✏ ✑ ✒ ✏✓ ✔ ✓ ✕ ✌ ✌ ✖ ✗ ✘ ✘ ✙ ✙ ✙✛✚ ✜ ✟ ✚ ✢ ☎ ✆ ✆✝ ✟ ☎ ✚ ✜✣ ✘✥✤ ✜ ✡ ✟ ✜ ✓ ✔ ✓

Resources That Limit Testing

  • Budget
  • Schedule
  • Hardware
  • Testers
  • Debuggers
  • Users (for usability testing)
slide-107
SLIDE 107
☎ ✆ ✆✝ ✞ ✟ ✠ ✝ ✡ ☛ ✆ ☞ ✟ ✡ ✌ ✍ ✎ ✏ ✑ ✒ ✏✓ ✔ ✓ ✕ ✌ ✌ ✖ ✗ ✘ ✘ ✙ ✙ ✙✛✚ ✜ ✟ ✚ ✢ ☎ ✆ ✆✝ ✟ ☎ ✚ ✜✣ ✘✥✤ ✜ ✡ ✟ ✜ ✓ ✔ ✓

Object-Oriented Testing

  • Much wisdom about testing accumulated before

popularity of OOP

  • How is the testing task different for object-oriented

code?

  • sources:
✁ ✂ ✄ ☎✝✆ ✞ ✟✡✠ ✂☞☛ ✌ ✆ ✍ ✟ ✆ ✎ ✏ ✆ ✑ ✟ ✌ ✍✒ ✓ ✔✖✕ ✟ ✗✙✘ ✍ ✎ ✚ ✆ ✘ ✛ ✌ ✟ ✕ ✜ ✢✤✣ ✥✖✦ ✧ ★ ✩✪✤✫ ✬ ✦ ✧✮✭ ✯ ✥ ✰ ✦✱ ★ ✲✤✳✴ ✳ ✵ ✪✤✫ ✦ ✶ ✷ ✷ ✸
  • http://www.rbsc.com/pages/myths.html
  • lectures by
✹✖✺✼✻ ✽✝✾ ✺ ✺✿ ❀ ❁ ✾❂ ❃ ✺ ❄ ❅ ✢✤✣ ❆ ✳ ❇ ✲ ✪ ❇ ✪ ★ ✳ ✧ ❆ ❈ ✣ ❇ ❇ ✦ ✴ ✦ ✣ ❉ ❈ ✳ ✫ ✳ ✬✖✳ ❅ ❊ ❇ ✦ ✱ ★ ✧ ✪ ✱ ✳ ❇ ✳ ✫ ✬ ❈ ✣ ❋● ❍ ★ ✦ ✧ ❊ ✫ ✴ ✪✤✫ ✦ ✦ ✧ ✪✤✫ ✴
slide-108
SLIDE 108
  • ✁✂
✄ ☎ ✆ ✆✝ ✞ ✟ ✠ ✝ ✡ ☛ ✆ ☞ ✟ ✡ ✌ ✍ ✎ ✏ ✑ ✒ ✏✓ ✔ ✓ ✕ ✌ ✌ ✖ ✗ ✘ ✘ ✙ ✙ ✙✛✚ ✜ ✟ ✚ ✢ ☎ ✆ ✆✝ ✟ ☎ ✚ ✜✣ ✘✥✤ ✜ ✡ ✟ ✜ ✓ ✔ ✓

Myth #1

  • Myth:

– OO testing is unnecessary. OO promotes iteration and reuse, so we have a more effective way to develop trustworthy classes.

  • Reality:

– Human error is as likely as ever. We have to check class functionality and interactions between classes

slide-109
SLIDE 109
  • ✁✂
✄ ☎ ✆ ✆✝ ✞ ✟ ✠ ✝ ✡ ☛ ✆ ☞ ✟ ✡ ✌ ✍ ✎ ✏ ✑ ✒ ✏✓ ✔ ✓ ✕ ✌ ✌ ✖ ✗ ✘ ✘ ✙ ✙ ✙✛✚ ✜ ✟ ✚ ✢ ☎ ✆ ✆✝ ✟ ☎ ✚ ✜✣ ✘✥✤ ✜ ✡ ✟ ✜ ✓ ✔ ✓

Myth #2

  • Myth:

– testing is a structured waterfall idea and isn’t consistent with incremental OO development

  • Reality:

– tests can be designed and exercised at many points in the process – paradigm of “design a little, code a little” becomes “design a little, code a little, test a little” – Extreme Programming (XP) promotes early testing (more later)

slide-110
SLIDE 110
✄ ☎ ✆ ✆✝ ✞ ✟ ✠ ✝ ✡ ☛ ✆ ☞ ✟ ✡ ✌ ✍ ✎ ✏ ✑ ✒ ✏✓ ✔ ✓ ✕ ✌ ✌ ✖ ✗ ✘ ✘ ✙ ✙ ✙✛✚ ✜ ✟ ✚ ✢ ☎ ✆ ✆✝ ✟ ☎ ✚ ✜✣ ✘✥✤ ✜ ✡ ✟ ✜ ✓ ✔ ✓

Myth #3

  • Myth:

– testing is too expensive

  • Reality:

– pay me now or pay me MUCH more later – failures in operational systems can cause severe secondary problems – proper testing is very cheap by comparison, even when done manually – efficient testing of large or complex systems needs some automated support

slide-111
SLIDE 111
☎ ✆ ✆✝ ✞ ✟ ✠ ✝ ✡ ☛ ✆ ☞ ✟ ✡ ✌ ✍ ✎ ✏ ✑ ✒ ✏✓ ✔ ✓ ✕ ✌ ✌ ✖ ✗ ✘ ✘ ✙ ✙ ✙✛✚ ✜ ✟ ✚ ✢ ☎ ✆ ✆✝ ✟ ☎ ✚ ✜✣ ✘✥✤ ✜ ✡ ✟ ✜ ✓ ✔ ✓

Myth #4

  • Myth:

– testing is the same as conventional software – all you need is black-box system testing

  • ✁✄✂
☎ ✆ ✝ ✂ ✂ ✞ ✟ ✂ ✠ ✝✡ ☛ ☛✌☞ ✍ ✎✄✏ ✂ ✠✑ ✡ ✎ ☛✄✂ ✎ ✂ ✒✄✡ ✑ ✆ ✍ ✓ ✠ ✟ ✍ ✎ ✂ ✔ ✠ ✍ ✁ ✓ ✕ ✂ ✁ ☎ ✠ ✍ ✖ ✡ ✗ ✆ ✑ ✂ ✝ ✆ ✝ ✔ ✓ ✟ ✘ ✁ ✍ ✝ ✙ ✟ ✝ ✂ ✂ ✁ ✆ ✝ ☎ ✍ ✠ ✖✡ ✟ ✆ ✍ ✝ ✡ ✎ ✍ ✓ ✟ ✆ ✖ ✔ ☛✄✂ ✖ ✂ ✝ ✟ ✡ ✟ ✆ ✍ ✝
  • Reality:

– OO code structure matters – polymorphism, inheritance, encapsulation present

  • pportunities for error (more later)
slide-112
SLIDE 112
✂ ✄ ☎ ☎✆ ✝ ✞ ✟ ✆ ✠ ✡ ☎ ☛ ✞ ✠ ☞ ✌ ✍ ✎ ✏ ✑ ✎✒ ✁ ✒ ✓ ☞ ☞ ✔ ✕ ✖ ✖ ✗ ✗ ✗✙✘ ✚ ✞ ✘ ✛ ✄ ☎ ☎✆ ✞ ✄ ✘ ✚✜ ✖✣✢ ✚ ✠ ✞ ✚ ✒ ✁ ✒

Myth #5

  • Myth:

– conventional testing is useless for objects

  • Reality:

– there is a large body of knowledge about testing – basic testing techniques continue to apply with necessary changes – if scope of testing is small, ie classes and collaborations

✘ ✟ ✂ ✏ ✟ ✆ ✝ ✗ ✟ ✂ ✕ ✒ ✝ ✆ ✤ ✓ ✂ ✏ ✡ ✠ ✂ ✑ ✂ ✠ ☞ ✥ ✥ ✏ ✔ ✂ ✕ ✆ ☎ ✆ ✕ ✦ ✖ ✍ ✠ ✂ ☛✄✡ ✟ ✂ ✠

– as scope of testing gets larger

✘ ✟ ✂ ✏ ✟ ✆ ✝ ✗ ✟ ✂ ✕ ✒ ✝ ✆ ✤ ✓ ✂ ✏ ✎ ✂ ✕ ✍ ✖✂ ✖ ✍ ✠ ✂ ✟ ✠ ✡ ✁ ✆ ✟ ✆ ✍ ✝✡ ☛
slide-113
SLIDE 113
✂ ✄ ☎ ☎✆ ✝ ✞ ✟ ✆ ✠ ✡ ☎ ☛ ✞ ✠ ☞ ✌ ✍ ✎ ✏ ✑ ✎✒ ✁ ✒ ✓ ☞ ☞ ✔ ✕ ✖ ✖ ✗ ✗ ✗✙✘ ✚ ✞ ✘ ✛ ✄ ☎ ☎✆ ✞ ✄ ✘ ✚✜ ✖✣✢ ✚ ✠ ✞ ✚ ✒ ✁ ✒

Myth #6

  • Myth:

– inheritance means never having to say you are sorry – specializing from a trusted superclass means the inherited part of subclasses will also be correct – we don’t need to retest inherited features

  • Reality:

– subclasses create new ways to misuse inherited features – different test cases are needed for each subclass (more later)

slide-114
SLIDE 114
✄ ☎ ☎✆ ✝ ✞ ✟ ✆ ✠ ✡ ☎ ☛ ✞ ✠ ☞ ✌ ✍ ✎ ✏ ✑ ✎✒ ✁ ✒ ✓ ☞ ☞ ✔ ✕ ✖ ✖ ✗ ✗ ✗✙✘ ✚ ✞ ✘ ✛ ✄ ☎ ☎✆ ✞ ✄ ✘ ✚✜ ✖✣✢ ✚ ✠ ✞ ✚ ✒ ✁ ✒

Myth #7

  • Myth:

– reuse means never having to say you are sorry – reusing a trusted class means behaviour of server

  • bject is trustworthy and doesn’t need to be

tested

  • Reality:

– nothing prevents a new client class from using the server object incorrectly – all client class use of a server needs to be exercised

slide-115
SLIDE 115
✄ ☎ ☎✆ ✝ ✞ ✟ ✆ ✠ ✡ ☎ ☛ ✞ ✠ ☞ ✌ ✍ ✎ ✏ ✑ ✎✒ ✁ ✒ ✓ ☞ ☞ ✔ ✕ ✖ ✖ ✗ ✗ ✗✙✘ ✚ ✞ ✘ ✛ ✄ ☎ ☎✆ ✞ ✄ ✘ ✚✜ ✖✣✢ ✚ ✠ ✞ ✚ ✒ ✁ ✒

Myth #8

  • Myth:

– black box testing is sufficient – designing test cases using class interface and specification assures the class is fully exercised – white box testing violates encapsulation

  • Reality:

– studies show black-box test suites typically only exercise 1/3 to 1/2 of the statements (let alone paths or states) – typically miss abnormal paths, exception and error-handling

slide-116
SLIDE 116
✂ ✄ ☎ ☎✆ ✝ ✞ ✟ ✆ ✠ ✡ ☎ ☛ ✞ ✠ ☞ ✌ ✍ ✎ ✏ ✑ ✎✒ ✓ ✒ ✔ ☞ ☞ ✕ ✖ ✗ ✗ ✘ ✘ ✘✚✙ ✛ ✞ ✙ ✜ ✄ ☎ ☎✆ ✞ ✄ ✙ ✛✢ ✗✤✣ ✛ ✠ ✞ ✛ ✒ ✓ ✒

XP’s Approach to Testing

  • programmer should

– focus on testing in order to give chance to think about what code will do, independently of how it is implemented – write every test he/she can think of that won’t run immediately on existing code – consider tests as giving confidence that things are working

✥ ✦ ✧ ★✪✩ ✫ ✧✬ ✭ ✮ ✯ ✧ ✬ ✰ ✧✱ ✭ ★ ✧ ✲ ✩ ✳ ✳ ✮ ✱ ✳

– consider testing as a type of metric:

✴ ✬ ✵ ✶ ✭✸✷ ✹ ✦ ✧ ✶ ✧ ✹ ✭ ✩ ✦ ✧ ✬ ✭ ✺ ✹ ✭ ✫ ✹ ✱ ✻ ✭ ✲ ✧ ★ ✧ ✯ ✵✱ ✬ ✭ ✦ ✹ ✭ ✧ ★ ✲✪✼ ✹ ✩ ✭ ✵ ✯ ✹ ✭ ✧ ★ ✭ ✧ ✬ ✭ ✬✾✽ ★ ✵✱ ✻ ✭ ✧ ✿ ✮ ✬ ✭
slide-117
SLIDE 117
✂ ✄ ☎ ☎✆ ✝ ✞ ✟ ✆ ✠ ✡ ☎ ☛ ✞ ✠ ☞ ✌ ✍ ✎ ✏ ✑ ✎✒ ✓ ✒ ✔ ☞ ☞ ✕ ✖ ✗ ✗ ✘ ✘ ✘✚✙ ✛ ✞ ✙ ✜ ✄ ☎ ☎✆ ✞ ✄ ✙ ✛✢ ✗✤✣ ✛ ✠ ✞ ✛ ✒ ✓ ✒

XP’s Design through Refactoring

  • Based on test cases

– pick up first test case – implement code to get test case running – pick up next test case – refactor code to get simplest implementation to get both test cases running – repeat for rest of test cases

  • probably won’t work for large systems

– focus on testing up front is interesting

slide-118
SLIDE 118
✄ ☎ ☎✆ ✝ ✞ ✟ ✆ ✠ ✡ ☎ ☛ ✞ ✠ ☞ ✌ ✍ ✎ ✏ ✑ ✎✒ ✓ ✒ ✔ ☞ ☞ ✕ ✖ ✗ ✗ ✘ ✘ ✘✚✙ ✛ ✞ ✙ ✜ ✄ ☎ ☎✆ ✞ ✄ ✙ ✛✢ ✗✤✣ ✛ ✠ ✞ ✛ ✒ ✓ ✒

OO Testing in Four Phases

  • 1. modeling the software environment
  • 2. selecting test scenarios

– we will look at unit testing only

  • 3. running and evaluating test scenarios
  • 4. measuring testing progress
slide-119
SLIDE 119
✂ ✄ ☎ ☎✆ ✝ ✞ ✟ ✆ ✠ ✡ ☎ ☛ ✞ ✠ ☞ ✌ ✍ ✎ ✏ ✑ ✎✒ ✓ ✒ ✔ ☞ ☞ ✕ ✖ ✗ ✗ ✘ ✘ ✘✚✙ ✛ ✞ ✙ ✜ ✄ ☎ ☎✆ ✞ ✄ ✙ ✛✢ ✗✤✣ ✛ ✠ ✞ ✛ ✒ ✓ ✒
  • 1. Modelling the Software Environment
  • must identify and simulate interfaces

software system uses

– human interfaces

✥ ✦✧ ★ ✩✫✪ ✬✫✭ ✮ ✧ ✪ ✮ ✯✫✧ ✰ ✭ ✧ ★ ✪ ✱ ✪ ✦ ✦ ✰ ✲ ✳ ✱✴ ★ ✧ ✵ ✳ ★ ✩ ✭ ✪ ✶ ★ ✵ ✴ ✷ ✧ ✸ ✦ ✰ ✭ ★ ✱ ✪ ✲✭ ✳ ✬✫✧ ✷ ✩✫✪ ✵ ★ ✪ ★ ✧ ✭ ★ ✳ ✲ ✮ ✰ ★ ✶ ✷ ✪ ✦ ✬ ✳ ✶ ✶ ✧ ✷ ✧ ✲ ★ ✬✫✧ ✹ ✳ ✱ ✧ ✭

– software interfaces

✸ ✩✫✪ ✵ ✭ ✪ ✶ ★ ✵ ✴ ✷ ✧ ✰ ✭ ✧ ✭ ✪ ✮ ✧ ✷ ✴ ★ ✳ ✲✺ ✭ ✻ ✭ ★ ✧ ✦✽✼ ✬ ✴ ★ ✴ ✾✫✴ ✭ ✧ ✼ ✷ ✰ ✲ ★ ✳ ✦✧ ✯ ✳ ✾ ✷ ✴ ✷ ✻ ✸ ✦ ✰ ✭ ★ ★ ✧ ✭ ★ ✧ ✿ ✮ ✧ ✱ ★ ✧ ✬ ✴ ✲ ✬ ✰ ✲ ✧ ✿ ✮ ✧ ✱ ★ ✧ ✬ ✴ ✱ ★ ✳ ✹ ✳ ★ ✳ ✧ ✭ ✪ ✶ ✭ ✧ ✷ ✹ ✳ ✱ ✧ ✱ ✯ ✴ ✭ ✭ ✧ ✭
slide-120
SLIDE 120
  • ✁✂
✄ ☎ ✆ ✆✝ ✞ ✟ ✠ ✝ ✡ ☛ ✆ ☞ ✟ ✡ ✌ ✍ ✎ ✏ ✑ ✒ ✏✓ ✁ ✓ ✔ ✌ ✌ ✕ ✖ ✗ ✗ ✘ ✘ ✘✚✙ ✛ ✟ ✙ ✜ ☎ ✆ ✆✝ ✟ ☎ ✙ ✛✢ ✗✤✣ ✛ ✡ ✟ ✛ ✓ ✁ ✓
  • 1. Modelling the Software Environment

– file system interfaces

✸ ✷ ✧ ✴ ✬✫✭ ✪ ✷ ✵ ✷ ✳ ★ ✧ ✭ ★ ✪ ✧ ✿ ★ ✧ ✷ ✲ ✴ ✯ ✶ ✳ ✯✫✧ ✭ ✸ ✦ ✰ ✭ ★ ✱ ✩✫✧ ✱ ✥ ★ ✪ ✭ ✧ ✧ ✳ ✶ ✬ ✴ ★ ✴ ✶ ✷ ✪ ✦ ★ ✩✫✧ ✶ ✳ ✯ ✧ ✳ ✭ ✴ ✮ ✮ ✷ ✪ ✮ ✷ ✳ ✴ ★ ✧ ✳ ✲ ✱ ✪ ✲ ★ ✧ ✲ ★ ✴ ✲ ✬ ✶ ✪ ✷ ✦ ✴ ★ ★ ✳ ✲✺

– communication interfaces

✸ ✬ ✳ ✷ ✧ ✱ ★ ✴ ✱ ✱ ✧ ✭ ✭ ★ ✪ ✮ ✩ ✻ ✭ ✳ ✱✴ ✯ ✬✫✧ ✹ ✳ ✱ ✧ ✭ ✦ ✧ ✺ ✧ ★ ✷ ✳ ✹ ✧ ✷ ✭ ✼ ✱ ✪ ✲ ★ ✷ ✪ ✯ ✯✫✧ ✷ ✭ ✼ ✪ ★ ✩ ✧ ✷ ✧ ✦ ✾ ✧ ✬ ✬✫✧ ✬ ✭ ✻ ✭ ★ ✧ ✦ ✭ ✩ ✸ ✦ ✰ ✭ ★ ✾ ✧ ✴ ✾ ✯ ✧ ★ ✪ ✺ ✧ ✲✧ ✷ ✴ ★ ✧ ✹ ✴ ✯ ✳ ✬ ✴ ✲ ✬ ✳ ✲ ✹ ✴ ✯ ✳ ✬ ✮ ✷ ✪ ★ ✪ ✱ ✪ ✯ ✭ ★ ✷ ✧ ✴ ✦✭ ✼ ✧ ✺ ✮ ✴ ✱ ✥ ✧ ★ ✭
slide-121
SLIDE 121
☎ ✆ ✆✝ ✞ ✟ ✠ ✝ ✡ ☛ ✆ ☞ ✟ ✡ ✌ ✍ ✎ ✏ ✑ ✒ ✏✓ ✁ ✓ ✔ ✌ ✌ ✕ ✖ ✗ ✗ ✘ ✘ ✘✚✙ ✛ ✟ ✙ ✜ ☎ ✆ ✆✝ ✟ ☎ ✙ ✛✢ ✗✤✣ ✛ ✡ ✟ ✛ ✓ ✁ ✓
  • 2. Selecting Test Scenarios
  • consider application domain and variables
✧ ✮ ✷ ✧ ✭ ✧ ✲ ★ ✭ ✳ ✲ ✶ ✳ ✲ ✳ ★ ✧ ✲ ✰ ✦ ✾ ✧ ✷ ✪ ✶ ★ ✧ ✭ ★ ✭ ✱ ✧ ✲ ✴ ✷ ✳ ✪ ✭
  • ✩✫✪
✵ ✬✫✪ ✧ ✭ ★ ✧ ✭ ★ ✧ ✷ ✱ ✩✫✪ ✪ ✭ ✧ ✴ ✁ ✷ ✧ ✴ ✭ ✪ ✲ ✴ ✾ ✯✫✧ ✂ ✭ ✰ ✾ ✭ ✧ ★ ✄ ☎✆ ✝ ✆ ✞ ✟ ✠ ✠☛✡ ☞ ✟✌ ✆ ✍ ✎ ✝ ✏ ✎ ✑ ✆ ✞ ✟ ☎✆ ✒ ✓✔ ✕✗✖ ✓✔ ✘ ✖ ✙ ✚✛ ✖ ✜ ✖ ✢ ✖ ✓ ✣ ✤ ✥ ✔ ✦ ✧ ✚ ✤ ★✗✩ ✪ ✫✭✬ ★ ✥ ✤ ✖ ✮ ✔ ✢ ✤ ✖ ✩ ✤ ✥ ✦✛ ✯ ✰ ✓ ✚ ✦ ✮ ✖ ✥ ✦ ✱ ✥ ✦ ✥ ✤ ✖ ✒ ✥ ✦ ✧ ✣ ✤ ✕ ✔ ✲ ✚ ✥ ✦ ✓ ✔ ✘ ✖ ✙ ✚✛ ✖ ✫ ✮✳ ✚ ✓ ✴ ✮ ✔ ✢ ✤ ✖ ✩ ✤ ✥ ✦✛ ✯ ✰ ✦ ✔ ✤ ✥ ✦ ✕ ✥ ✘ ✥ ✕ ✣ ✚ ✳ ✥ ✦ ✧ ✣ ✤ ✩✶✵ ✮ ✣ ✤ ✥ ✦ ✧ ✣ ✤ ✩ ✖ ✷ ✣ ✖ ✦ ✓ ✖ ✩ ✰ ✦ ✔ ✤ ✔ ✦ ✳✭✸ ✥ ✦ ✧ ✣ ✤ ✩ ✮ ✣ ✤ ✩ ✤ ✚ ✤ ✖ ✔ ✱ ✔ ✮ ✹ ✖ ✓ ✤ ✲ ✚ ✤ ✤ ✖ ✙ ✩ ✰ ✩ ✓ ✖ ✦ ✚ ✙ ✥ ✔ ✩ ✤ ✔ ✬ ★ ✥ ✓ ★ ✧ ✙ ✔ ✛ ✙ ✚ ✲ ✲ ✣ ✩ ✤ ✙ ✖ ✩ ✧ ✔ ✦ ✕ ✰ ✚ ✳ ✩ ✔ ✓ ✚ ✦ ✮ ✖ ✥ ✦ ✱ ✥ ✦ ✥ ✤ ✖ ✺ ✻✗✼ ✽ ✻✿✾ ❀ ✼ ✼ ❁❃❂ ❄ ❀ ✻ ❅ ❄❆ ✻ ❇ ✾ ❆ ❆ ❁ ❅❈ ❄ ✻ ❄❆ ✻ ❉ ❀ ✻ ❀ ❀ ❉ ❄❊ ❋ ❀● ✽
❁ ✻ ❄ ✼ ❁ ❀ ❍ ✑ ✆ ✞ ✡ ✌ ■ ☞ ❏ ✆ ✏ ❑ ▲ ✑ ✆
slide-122
SLIDE 122
✁ ✂ ✄ ☎ ☎✆ ✝ ✞ ✟ ✆ ✠ ✡ ☎ ☛ ✞ ✠ ☞ ✌ ✍ ✎ ✏ ✑ ✎✒ ✁ ✒ ✓ ☞ ☞ ✔ ✕ ✖ ✖ ✗ ✗ ✗✙✘ ✚ ✞ ✘ ✛ ✄ ☎ ☎✆ ✞ ✄ ✘ ✚✜ ✖✣✢ ✚ ✠ ✞ ✚ ✒ ✁ ✒

Complications From Inheritance (1)

  • test class super first, including methods A and B
  • now test class sub
  • new version of B – need to test in sub
  • sub inherits A – no need to re-test in sub
  • suppose C calls A:

– no guarantee that C calls A properly – we still have to test C's use of A

super int A(int x) int B(int x) sub int B(int x) int C(int x)

slide-123
SLIDE 123
  • ✁✂
✄ ☎ ✆ ✆✝ ✞ ✟ ✠ ✝ ✡ ☛ ✆ ☞ ✟ ✡ ✌ ✍ ✎ ✏ ✑ ✒ ✏ ✂ ✁✂ ✓ ✌ ✌ ✔ ✕ ✖ ✖ ✗ ✗ ✗✙✘ ✚ ✟ ✘ ✛ ☎ ✆ ✆✝ ✟ ☎ ✘ ✚✜ ✖✣✢ ✚ ✡ ✟ ✚ ✂ ✁✂

Complications From Inheritance (2)

  • test class super first, including methods A and B
  • now test class sub
  • new version of B – need to test in sub
  • might assume no need to test A inside sub
  • but what if A calls B??
  • need to test A with the new B

super int A(int x) int B(int x) sub int B(int x)

slide-124
SLIDE 124
☎ ✆ ✆✝ ✞ ✟ ✠ ✝ ✡ ☛ ✆ ☞ ✟ ✡ ✌ ✍ ✎ ✏ ✑ ✒ ✏ ✂ ✁✂ ✓ ✌ ✌ ✔ ✕ ✖ ✖ ✗ ✗ ✗✙✘ ✚ ✟ ✘ ✛ ☎ ✆ ✆✝ ✟ ☎ ✘ ✚✜ ✖✣✢ ✚ ✡ ✟ ✚ ✂ ✁✂

Testing Objects

  • exercise methods provided by object with

goals of uncovering errors in results, state of

  • bject, or both
  • must test interaction between methods in
  • bject
  • must search for all patterns of method

invocation of object

– methods can be invoked in any random order leading to a large number of combinations

slide-125
SLIDE 125
☎ ✆ ✆✝ ✞ ✟ ✠ ✝ ✡ ☛ ✆ ☞ ✟ ✡ ✌ ✍ ✎ ✏ ✑ ✒ ✏ ✂ ✁✂ ✓ ✌ ✌ ✔ ✕ ✖ ✖ ✗ ✗ ✗✙✘ ✚ ✟ ✘ ✛ ☎ ✆ ✆✝ ✟ ☎ ✘ ✚✜ ✖✣✢ ✚ ✡ ✟ ✚ ✂ ✁✂
  • 3. Running and Evaluating

Test Scenarios (1)

  • manually executing test scenarios is labour-

intensive and error prone

– automate as appropriate

✁ ✂ ✄ ☎✆ ✝ ✞ ✄✟ ✠ ✝ ✄ ✡ ✝ ✄ ☛ ☞✍✌ ☎ ✄ ☞ ✆ ✎ ☞ ✆ ✝ ☞ ✝ ✌ ✏ ✑✒✡ ✓ ✔ ✏ ✎ ✕ ✖ ✗ ✌ ✓ ✆ ✘ ✘ ✌ ✘ ✝ ✙ ✚✛✜ ✢ ✛ ✣ ✤ ✥ ✦ ✤ ✦ ✧ ★ ✜ ✩✫✪ ✤ ✬ ✥ ✭ ✮ ✯ ✰ ✱ ✱

– often include extra code to provide information about variables, object properties, etc during test runs – write code for testability: controllability and

  • bservability
slide-126
SLIDE 126
  • ✁✂
✄ ☎ ✆ ✆✝ ✞ ✟ ✠ ✝ ✡ ☛ ✆ ☞ ✟ ✡ ✌ ✍ ✎ ✏ ✑ ✒ ✏✓ ✁ ✓ ✔ ✌ ✌ ✕ ✖ ✗ ✗ ✘ ✘ ✘✚✙ ✛ ✟ ✙ ✜ ☎ ✆ ✆✝ ✟ ☎ ✙ ✛✢ ✗✤✣ ✛ ✡ ✟ ✛ ✓ ✁ ✓
  • 3. Running and Evaluating

Test Scenarios (2)

  • evaluation of test results

– comparison of software’s actual output to its expected output – often difficult to do

✥ ✦✧ ★ ✩✤✪ ✫✬ ✭✮ ✯ ✬ ✰ ✱ ✦ ✲ ✳✵✴ ✪ ✬ ✱ ✱✷✶ ✫ ✮ ✭ ✳ ✸ ✮ ✯ ✳ ✭ ✧ ✴ ✰ ✯ ✦ ✦ ✭ ✮ ✪ ✸ ✹ ✪ ✸ ✬ ✭ ✺ ✹ ✬ ✳ ✭ ✴ ✸ ✬ ✻ ✳ ✭ ✧ ✱ ✶ ✬ ✭✬ ✱ ✶ ✼ ✳ ✭ ✧ ✺✽✬ ✸ ✬ ✾ ✿✤❀ ❁ ❂ ❃ ❂ ❄❆❅ ✿❈❇ ❉❊ ❋● ❊ ❋❍ ■ ❀ ❏ ❑ ▲ ▼ ❏
❂ ❍ ▼ ❋ ❏ ❂ ❍ ❏ ◆ ❊ ❏ ❊ ❅ ❏ ❂ ❍ ❏ ❄ ❂ ❍ ❇ ▲ ❏ ❍ ❅ ❍ ❇ ▼ ❏ ❂ ❀ ❖ ❏ ❂ ❍ ❏
❍ ❂ ❍ P ◗❘❚❙ ❯✤❱ ❲ ◗❳ ❨ ◗ ❩✽❬ ❭ ❨ ❲ ❭ ❨ ❩ ❪ ❫ ❫ ❪ ❳ ❭ ❴ ❨ ❨ ❬ ❵ ❳ ❳ ❭❛ ❵ ❨ ◗ ❴✷❜ ❲ ❛ ◗ ❩ ❪ ❳ ❨ ❬ ❛ ❘ ◗❝ ◗ ❛ ❵ ❨ ◗ ❞✽❡ ❭ ❳ ❢ ❵ ❡ ◗ ❱ ❲ ◗❳ ❨ ◗ ❩ ❬ ❭ ❨ ❲ ❭ ❨ ❫ ❬ ❛ ❡ ❪ ❣ ❭ ❴ ❵ ❨ ❪ ❬ ❝ ❲ ❛ ❬ ❘ ❛ ❵ ❣ ❡ ❫ ❬ ❛ ❲ ❛ ❬ ❳ ◗ ❡ ❡ ◗ ❡ ❵ ❨ ❵ ❝ ❭ ❳ ❴ ◗ ❵ ❛ ❘ ◗❝ ◗ ❛ ❵ ❨ ❪ ❝ ❘ ❡ ❨ ❵ ❨ ❪ ❬ ❝ ❤
slide-127
SLIDE 127
✂ ✄ ☎ ✆ ✆✝ ✞ ✟ ✠ ✝ ✡ ☛ ✆ ☞ ✟ ✡ ✌ ✍ ✎ ✏ ✑ ✒ ✏✓ ✁ ✓ ✔ ✌ ✌ ✕ ✖ ✗ ✗ ✘ ✘ ✘✚✙ ✛ ✟ ✙ ✜ ☎ ✆ ✆✝ ✟ ☎ ✙ ✛✢ ✗✤✣ ✛ ✡ ✟ ✛ ✓ ✁ ✓
  • 4. Measuring Testing

Progress

  • determining

– when to stop testing

✥ ✦ ✧ ✦ ★ ✩ ✩✫✪ ✬ ✭✯✮ ✰ ✪ ✱ ✦✲ ✦ ✰ ✱ ✦ ✳ ✱ ✴ ✳ ✵✷✶ ✮ ★ ✰ ✸✹ ✱ ✲ ✲ ✮ ✧ ✱ ✦ ✲ ✺ ✮ ✧

– when the product is ready to release

✥ ✻ ★ ✧ ✮ ✸ ✱ ✰ ✻ ✦ ✧ ✵ ✰ ✮ ✧ ✧ ✼ ✦ ✸✯✽ ✮ ✶ ✮ ✰ ✳
  • need quantitative measures

– estimation of number of bugs left in software

✥ ✻ ★ ✧ ✮ ✸ ✱ ✰ ✾ ✲ ★ ✳ ✮ ★ ✳ ✬ ✭ ✵ ✺ ✭ ✻ ✦ ✽ ✧ ★ ✲ ✮ ✧ ✳ ✵ ✩ ✩ ✻ ✮ ✵ ✰✽ ✴ ✱ ✦ ✰ ✸ ✾ ✬ ✭✯✮ ✲ ✮ ✵ ✰ ✧ ✱ ✴ ✳ ✬ ★ ✲ ✮ ✻ ✦ ✽ ✧ ★ ✲ ✮ ✻ ✮ ✵ ✰✽ ✴ ✱ ✦ ✰ ✸ ✾ ✲ ★ ✳ ✮ ✱ ✴ ✻ ✦ ✽ ✴ ✵✤✿ ✵ ✰✽