Design Validation and Integration Testing | CS 3300, Study notes of Software Engineering

Material Type: Notes; Class: Intro to Software Engr; Subject: Computer Science; University: Georgia Institute of Technology-Main Campus; Term: Fall 2002;

Typology: Study notes

Pre 2010

Uploaded on 08/05/2009

koofers-user-24i-2
koofers-user-24i-2 🇺🇸

10 documents

1 / 5

Toggle sidebar

This page cannot be seen from the preview

Don't miss anything!

bg1
Design Validation & Integration
Testing
CS 3300
Colin Potts
V-model again
Q: How & when can you
assess a design?
Designs don’t run
•LHS -> RHS
LHS = synthesis (1st)
RHS = testing (last)
LHS->RHS is test planning
(as early as possible)
Design (modules and
interfaces) -> Integration
test plan
Detailed design / module
spec. -> Unit test plan &
cases
Acceptance/
reqts validn.
Acceptance/
reqts validn.
Requirements
analysis
Requirements
analysis
System test/
design review
System test/
design review
Design
Design
Coding
Coding Unit testing/
review
Unit testing/
review
Terminology
Integration Testing
Testing of subsystems as a whole
Units assumed to have been tested and passed
•Review
Systematic examination of a design, usually by
a team
Inspection
Special kind of review
Integration testing
_Principle
Individual program units may
work in isolation
But may not work correctly
when integrated
_Localization of defects
Defect may be manifested not
at source, but in a different
program unit
Ctrl
I' P' O'
JQR
M
defect here
failure
here
Interface errors
Interface misuse
A calling component calls another component and
makes an error in its use of its interface e.g. parameters
in the wrong order
Interface misunderstanding
A calling component embeds assumptions about the
behaviour of the called component which are incorrect
Timing errors
The called and the calling component operate at
different speeds and out-of-date information is accessed
Testing strategies
Testing strategies are ways of approaching the
testing process
Incremental testing of builds
Usually combined in different parts of the system
Examples (illustrations from Sommerville, 1995)
Top-down testing
Bottom-up testing
Thread testing
Stress testing
pf3
pf4
pf5

Partial preview of the text

Download Design Validation and Integration Testing | CS 3300 and more Study notes Software Engineering in PDF only on Docsity!

Design Validation & Integration

Testing

CS 3300

Colin Potts

V-model again

  • Q: How & when can you

assess a design?

  • Designs don’t run
  • LHS -> RHS
  • LHS = synthesis (1st)
  • RHS = testing (last)
  • LHS->RHS is test planning
(as early as possible)
  • Design (modules and
interfaces) -> Integration
test plan
  • Detailed design / module
spec. -> Unit test plan &
cases
Acceptance/
reqts validn.
Acceptance/
reqts validn.
Requirements
analysis
Requirements
analysis
System test/
design review
System test/
design review
DesignDesign
CodingCoding
Unit testing/
review
Unit testing/
review

Terminology

  • Integration Testing
    • Testing of subsystems as a whole
    • Units assumed to have been tested and passed
  • Review
    • Systematic examination of a design, usually by

a team

  • Inspection
    • Special kind of review

Integration testing

_ Principle

  • Individual program units may
work in isolation
  • But may not work correctly
when integrated

_ Localization of defects

  • Defect may be manifested not
at source, but in a different
program unit

Ctrl

I' P' O'

J Q R

M

defect here

failure

here

Interface errors

  • Interface misuse
    • A calling component calls another component and

makes an error in its use of its interface e.g. parameters

in the wrong order

  • Interface misunderstanding
    • A calling component embeds assumptions about the

behaviour of the called component which are incorrect

  • Timing errors
    • The called and the calling component operate at

different speeds and out-of-date information is accessed

Testing strategies

  • Testing strategies are ways of approaching the

testing process

  • Incremental testing of builds
  • Usually combined in different parts of the system
  • Examples (illustrations from Sommerville, 1995)
  • Top-down testing
  • Bottom-up testing
  • Thread testing
  • Stress testing

"Big bang" testing

Errors are difficult to locate

Ctrl

I' P' O'

J Q^ R

M

All

I'

P'

O'

J

Q

R

M Ctrl

Test

sequence

Design

Unit-Oriented Build 1

Module

Adapted from Software Engineering: An Object-Oriented Perspective by Eric J. Braude (Wiley 2001), with permission.

Unit-Oriented Build 2

Module

Adapted from Software Engineering: An Object-Oriented Perspective by Eric J. Braude (Wiley 2001), with permission.

Unit-Oriented Build 3

Module

Adapted from Software Engineering: An Object-Oriented Perspective by Eric J. Braude (Wiley 2001), with permission.

Last Build

Module

Adapted from Software Engineering: An Object-Oriented Perspective by Eric J. Braude (Wiley 2001), with permission.

1. Understand the architecture decomposition.

  • try to make architecture simple to integrate

2. Identify the parts of the architecture that each

iteration will implement.

  • build framework classes first, or in parallel
  • if possible, integrate “continually”
  • build enough UI to anchor testing
  • document requirements for each iteration
  • try to build bottom-up
    • so the parts are available when required
  • try to plan iterations so as to retire risks
    • biggest risks first
  • specify iterations and builds so that each use case is

handled completely by one

3. Decompose each iteration into builds if necessary.

4. Plan the testing, review and inspection process.

  • see section tbd.

5. Refine the schedule to reflect the results.

Plan

Integration

& Builds

Adapted from Software Engineering: An Object-Oriented Perspective by Eric J. Braude (Wiley 2001), with permission.

Top-down testing

  • Start with the high-levels of a system and work

your way downwards

  • Advantages
    • Works well with top-down development
    • Finds architectural errors early
  • Disadvantage
    • System relies on what’s underneath
      • May need too much infrastructure before testing is possible
(tends toward big-bang integration)
  • May be difficult to develop program stubs that you’re
confident simulate the infrastructure

Bottom-up testing

Level N Level N Level N Level N Level N
Level N–1 Level N–1 Level N–
Testing
sequence
Test
drivers
Test
drivers

Meeting scheduler example

Dialog Mgr

Calendar Mgr

Locate Person

System Services

Time Notifier Chooser

Dialog Mgr

Calendar Mgr

Locate Person

System Services

Notifier

Time Chooser

Dialog Mgr

Calendar Mgr

Locate Person

System Services

Notifier

Time Chooser

Dialog Mgr

Calendar Mgr

Locate Person

System Services

Notifier

Time Chooser

Bottom-up testing

  • Start with the lower levels of the system and work

upward

  • Advantages
    • Appropriate for object-oriented systems
    • Or where infrastructure components are critical
  • Disadvantages
    • Needs test drivers to be implemented
      • May not simulate eventual calling envt.
    • Does not find major design problems until late in the

process

Thread Testing

  • Testing tests behavior , so why base it on

structure?

  • In top-down & bottom-up integration, boxes =

modules; arrows = interfaces

  • A thread is an execution trace that defines a set

of interrelated modules

  • boxes = modules; arrows = interaction instances
  • Build systems around major use cases

Relationship Between Use Cases, Iterations

and Builds

Iteration 5

build 5.

Use case 14

Relationship between Use Cases, Iterations and

Builds

… 4 Iteration 5 … 6

5.2 build 5.3 5.

Use case 23

Use case 14

Use case 9

Use case 7

* «extends»

or «includes»

Adapted from Software Engineering: An Object-Oriented Perspective by Eric J. Braude (Wiley 2001), with permission.

Meeting scheduler example

Dialog Mgr

Calendar Mgr

Locate Person

System Services

Notifier

Time Chooser

Dialog Mgr

Calendar Mgr

Locate Person

System Services

Time Notifier Chooser

Dialog Mgr

Calendar Mgr

Locate Person

System Services

Notifier

Time Chooser

Dialog Mgr

Calendar Mgr

Locate Person

System Services

Time Notifier Chooser

Thread testing

• Based on testing an operation which involves a

sequence of processing steps which thread their

way through the system

  • Start with single event threads then go on to multiple

event threads

• Advantages

  • Suitable for real-time and object-oriented systems

• Disadvantage

  • Difficult to assess test adequacy, because of large

number of event combinations

Module

Typical Build 1

Adapted from Software Engineering: An Object-Oriented Perspective by Eric J. Braude (Wiley 2001), with permission.

Typical Build 2

Module

Adapted from Software Engineering: An Object-Oriented Perspective by Eric J. Braude (Wiley 2001), with permission.