0% found this document useful (0 votes)
91 views19 pages

Software Engineering Testing: ASPI8-4 Anders P. Ravn, Feb 2004

This document discusses software engineering testing and outlines a V-model development process. It describes different types of testing like unit testing, integration testing, and acceptance testing. It also summarizes different test design techniques like white-box testing, black-box testing, equivalence partitioning, boundary value analysis, and data validation. Specific test cases are demonstrated for conditions, loops, and nested loops. The document also discusses test documentation, instrumentation, and verification.
Copyright
© Attribution Non-Commercial (BY-NC)
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PPT, PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
91 views19 pages

Software Engineering Testing: ASPI8-4 Anders P. Ravn, Feb 2004

This document discusses software engineering testing and outlines a V-model development process. It describes different types of testing like unit testing, integration testing, and acceptance testing. It also summarizes different test design techniques like white-box testing, black-box testing, equivalence partitioning, boundary value analysis, and data validation. Specific test cases are demonstrated for conditions, loops, and nested loops. The document also discusses test documentation, instrumentation, and verification.
Copyright
© Attribution Non-Commercial (BY-NC)
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PPT, PDF, TXT or read online on Scribd
You are on page 1/ 19

Software Engineering Testing

Lecture 4 ASPI8-4 Anders P. Ravn, Feb 2004

A Development Process (V-model)


Requirements Spec --------------------------- Accpt. Test Report Acceptance Test Spec Architectural Spec ------------------------ Integr. Test Report Integration Test Spec Module Interface Spec Module Spec ------------------- Module Test Report Module Test Spec Program Source text

Documentation
1. Requirements Specification
1.4 Acceptance Test Specification

2. Architecture
2.X Module Interfaces 2.T Integration Test Specification

3. Modules
3.X Module Test Specification

4. Implementation 5. Test
5.Y YYY Test Report

Testing - objective
1. Execute a program to find errors 2. A good test case has a high probability of finding errors 3. A successful test finds a new error Glen Myers Software specs.

Results
Testing Check

Test Reports

Test specs.

Test case design


White box - basic path testing - loop testing Black box - equivalence partitioning - boundary value analysis Data validation - protocols - databases

Flow graphs basic paths

. . .

Sequence Decision

Iteration

Test spec. for basic paths


true/false case void f() ... if (b) ... while (c) ... Cases: 1:

T
T

1 1 F 2 1 F 2

Composite conditions
true false case
... if (b && c) ... ... if(d || e) ... TT TF FT TF FT FF 1 2 3 1 2 3

Cases: 1:

Loop Testing
1. 2. 3. 4. 5. 6. Skip the loop entirely (basic path) One pass through loop (basic path) max > n>1 passes through the loop max-1 passes through the loop max passes through the loop (max+1 passes through the loop)

Nested loops

Test inside out inner loop first

Test instrumentation
Primitive debugging: printff(x: %f\n,x); or System.out.println(x: +x.toString()); Planned: - instrumentation and logging: class Log { public static boolean test; public static out(Object o, int line, int val); if(test) } Log.out(this,23,count);

Permanent Instrumentation
Planned: - instrumentation and logging: class Log { public static boolean test; public static out(Object o, int line, int val); if (test) else // cyclic log } Log.out(this,23,count);

Black box testing


Test functional requirements: In-out relation (function) Interface conventions Performance Initialization and termination

Equivalence partitioning
Domain a range: 3 classes (test values)
Domain a value: 3 classes Domain a full interval: 2 classes

Boundary value test


Domain a range:
Domain a value: Domain a half interval: 2 classes

Data validation
Use formal syntax (BNF) to check - all tokens are recognized - all syntax rules are recognized a ::= b c a ::= b | c - at least one syntax error

Invariant checking
Assertions about relations between data:

sin(x)**2 + sin(pi/2-x)**2 == 1
X == A-1 B implies A X == B

-1 <= maxindex < N

Verification
Model checking of finite state machines - State invariants always P - Reaching desirable states sometime P - Unreachability of bad states: always not P Verification of general properties

Literature
R. S. Pressman: Software Engineering a Practitioners Approach. B. Beizer: Software Testing Techniques.

You might also like