software engineering testing n.
Download
Skip this Video
Loading SlideShow in 5 Seconds..
Software Engineering Testing PowerPoint Presentation
Download Presentation
Software Engineering Testing

Loading in 2 Seconds...

play fullscreen
1 / 19

Software Engineering Testing - PowerPoint PPT Presentation


  • 138 Views
  • Uploaded on

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

loader
I am the owner, or an agent authorized to act on behalf of the owner, of the copyrighted work described.
capcha
Download Presentation

PowerPoint Slideshow about 'Software Engineering Testing' - rhonda


Download Now An Image/Link below is provided (as is) to download presentation

Download Policy: Content on the Website is provided to you AS IS for your information and personal use and may not be sold / licensed / shared on other websites without getting consent from its author.While downloading, if for some reason you are not able to download a presentation, the publisher may have deleted the file from their server.


- - - - - - - - - - - - - - - - - - - - - - - - - - E N D - - - - - - - - - - - - - - - - - - - - - - - - - -
Presentation Transcript
software engineering testing

Software EngineeringTesting

Lecture 4

ASPI8-4

Anders P. Ravn, Feb 2004

a development process v model
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
Documentation
  • Requirements Specification
  • 1.4 Acceptance Test Specification
  • Architecture
  • 2.X Module Interfaces
  • 2.T Integration Test Specification
  • Modules
  • 3.X Module Test Specification
  • Implementation
  • Test
  • 5.Y YYY Test Report
testing objective

Check

Testing

Testing - objective
  • Execute a program to find errors
  • A good test case has a high probability of finding errors
  • A successful test finds a new error
  • Glen Myers

Software specs.

Test Reports

Results

Test specs.

test case design
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
Flow graphs – basic paths

.

.

.

Sequence Decision Iteration

test spec for basic paths
Test spec. for basic paths

true/false case

void f()

... 1

if (b) T 1

... F 2

while (c) T 1

... F 2

Cases:

1: …

composite conditions
Composite conditions

true false case

...

if (b && c) TT 1

... TF 2

... FT 3

if(d || e) TF 1

... FT 2

FF 3

Cases:

1: …

loop testing
Loop Testing
  • 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
Nested loops

Test inside out – inner loop first

test instrumentation
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
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
Black box testing

Test functional requirements:

  • In-out relation (function)
  • Interface conventions
  • Performance
  • Initialization and termination
equivalence partitioning
Equivalence partitioning
  • Domain – a range: 3 classes (test values)
  • Domain – a value: 3 classes
  • Domain – a full interval: 2 classes
boundary value test
Boundary value test
  • Domain – a range:
  • Domain – a value:
  • Domain – a half interval: 2 classes
data validation
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
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
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
Literature
  • R. S. Pressman: Software Engineering – a Practitioner’s Approach.
  • B. Beizer: Software Testing Techniques.