CIS 375 SOFTWARE ENGINEERING

UNIVERSITY OF MICHIGAN-DEARBORN

DR. BRUCE MAXIM, INSTRUCTOR

Date: 11/10/97

Week 10

REAL TIME DESIGN:

Date: 11/12/97

Week 10

TESTING:

DEFECTIVE SOFTWARE:

CAUSES OF ERRORS:

  1. Specification may be wrong.
  2. Specification may be a physical impossibility.
  3. Faulty program design.
  4. Program incorrect.

TYPES OF ERRORS:

  1. Algorithmic error.
  2. Computation & precision error.
  3. Documentation error.
  4. Capacity error or boundary error.
  5. Timing and coordination error.
  6. Throughput or performance error.
  7. Recovery error.
  8. Hardware & system software error.
  9. Standards & procedure errors.
  1. Reason for testing id to prove the existence of an error, and then deal with it.
  2. Has to be an egoless process - if programmers were evaluated by errors, each program would not have errors.

STAGES OF TESTING:

  1. Module or unit testing.
  2. Integration testing,
  3. Function testing.
  4. Performance testing.
  5. Acceptance testing.
  6. Installation testing.

TYPES OF TESTING:

  • Closed/blackbox testing.
  • Functional specification based on pre/post.
  • Open / whitebox / glassbox testing.
  • Implementation visible - logic paths.
  • WHICH TO USE:

    1. Maximum # of logic paths - determine if open testing is possible.
    2. Nature of input data.
    3. Amount of computation involved.
    4. Complexity of algorithms.

    UNIT TESTING:

    1. Program reviews.
    2. Formal verification.
    3. Testing the program itself.

    TESTING PROGRAM LOGIC:

    1. Statement testing.
    2. Branch testing (decision points tested).
    3. Path testing (every path at least once).

    STRATEGIES TO GENERATE TEST DATA:

    BLACK BOX:

  • Every possible combination or permutation of inputs.
  • WHITE BOX:

  • Partition input data into classes:
    1. Every possible input belongs to one of the classes.
    2. No input belongs to more than one class.
    3. Any point is representative.

    BASIS PATH TESTING:

    1. Draw flow graph for program code.
    2. Determine cyclametric complexity of graph.
    3. Determine the basis set for linearly independent path.
    4. Prepare test data to force the execution of linearly independent path.

    CONTROL STRUCTURE TESTING:

    1. Condition testing.
    1. E1 < E2, E1 = E2, E1 > E2, - if / case / etc.
      1. Data flow testing.
    2. Scope / visibility - conflicts
      1. Loop testing.
    3. a) Equivalence partitioning.
      1. input ranges.
      1. (1 valid class & 2 invalid classes)
        1. input values.
      2. (1 valid class & 2 invalid classes)
        1. Set membership
      3. (1 valid class & 1 invalid class)
        1. Boolean
      4. (1 valid class & 1 invalid class)
    4. b) Boundary testing.

    FUNCTION TESTING:

  • Thread testing (set of actions associated with particular module functions)

  • if A then B if A then not B
  • COMPARISON TESTING:

  • Several independent versions of the same software is developed.
  • Then use black box techniques.
  • input -> output - means correct
  • INTEGRATION TESTING:

    1. Bottom - up testing (test harness).
    2. Top - down testing (stubs).
    3. Modified top - down testing - test levels independently.
    4. Big Bang.
    5. Sandwich testing.
  • Bottom - Up
  • Top - Down
  • Big Bang
  • Sandwich
  • Integration
  • Early
  • Early
  • Early
  • Time to get working program

  • Late

  • Early

  • Late

  • Early
  • Drivers
  • Yes
  • No
  • Yes
  • Yes
  • Stub
  • No
  • Yes
  • Yes
  • Yes
  • Parallelism
  • Medium
  • Low
  • High
  • Medium
  • Test specification
  • Easy
  • Hard
  • Easy
  • Medium
  • Product control seq.

  • Easy

  • Hard

  • Easy

  • Hard