CIS 375 SOFTWARE ENGINEERING

University Of Michigan-Dearborn

Dr. Bruce Maxim, Instructor

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.

Reason for testing id to prove the existence of an error, and then deal with it.

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:

Functional specification based on pre/post.

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.
    2. E1 < E2, E1 = E2, E1 > E2, - if / case / etc.

    3. Data flow testing.
    4. Scope / visibility - conflicts

    5. Loop testing.

a) Equivalence partitioning.

    1. input ranges.
    2. (1 valid class & 2 invalid classes)

    3. input values.
    4. (1 valid class & 2 invalid classes)

    5. Set membership
    6. (1 valid class & 1 invalid class)

    7. Boolean

(1 valid class & 1 invalid class)

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:

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