Levels of Testing Chapter 12 Beyond unit testing Life cycle models - - PowerPoint PPT Presentation

levels of testing
SMART_READER_LITE
LIVE PREVIEW

Levels of Testing Chapter 12 Beyond unit testing Life cycle models - - PowerPoint PPT Presentation

Levels of Testing Chapter 12 Beyond unit testing Life cycle models What is a life cycle model of software development? What is the traditional life cycle model? LOT2 V-Model development & testing


slide-1
SLIDE 1

Levels of Testing

Chapter 12 Beyond unit testing

slide-2
SLIDE 2

LOT–2

Life cycle models

 What is a life cycle model of software development?  What is the traditional life cycle model?

slide-3
SLIDE 3

LOT–3

V-Model – development & testing

Requirements Detailed Design Module implementation Unit test Integration test System test Acceptance test Customer Developer Functional Structural Architectural Design

slide-4
SLIDE 4

LOT–4

Traditional model

 Waterfall

 Levels correlate with levels of testing  Functional testing is implied  Bottom up testing is implied

slide-5
SLIDE 5

LOT–5

Testing of individual components

Unit is best understood

Have both functional and structural testing

Developer – unit testing stage

slide-6
SLIDE 6

LOT–6

Testing to expose problems arising from the combination of components


Bottom up

Combine smaller units into larger ones, until system level is reached Developer – integration testing stage

slide-7
SLIDE 7

LOT–7

Testing the complete system prior to delivery

Functional testing

No good structural notation for descriptions

Developer – system testing stage

slide-8
SLIDE 8

LOT–8

Acceptance testing

Testing by users to check that the system satisfies 


  • requirements. Sometimes called alpha testing

Customer testing stage

slide-9
SLIDE 9

Basic development methods

 What are the three basic methods that can be used to

develop a system?

LOT–9

slide-10
SLIDE 10

LOT–10

Top down

Bottom up

Big Bang

Basic development methods – 2

slide-11
SLIDE 11

LOT–11

Top-down development

 How does it work?

slide-12
SLIDE 12

LOT–12

Top-down development – 2

 Build upper level  Test using stubs

 Throw away

slide-13
SLIDE 13

LOT–13

Bottom-up development

 How does it work?

slide-14
SLIDE 14

LOT–14

Bottom-up development – 2

 Build lower levels  Test with drivers

 Throw away

slide-15
SLIDE 15

LOT–15

Big bang development

 How does it work?

slide-16
SLIDE 16

LOT–16

Big bang development

 Build everything  No stubs or drivers  Then test

slide-17
SLIDE 17

LOT–17

Problems with waterfall model

 What are they?

slide-18
SLIDE 18

LOT–18

Problems with waterfall model – 2

 Too slow  Too rigid  Too focused on top-down functional development and

bottom-up testing

 Not the way people work  Staffing levels of different types batched at different times with

the levels requiring large resource shifts from low to high and back.

slide-19
SLIDE 19

LOT–19

Waterfall spin-off models

 Development in stages

 Level use of staff  Testing now entails both

 Regression  Progression

slide-20
SLIDE 20

LOT–20

Waterfall spin-off models – 2

 Main variations involve constructing a sequence of systems

 Incremental  Evolutionary  Spiral


  •  Waterfall model is applied to each build

 Smaller problem than original  System functionality does not change during a build

slide-21
SLIDE 21

LOT–21

Incremental model

 Have high-level design at the beginning  Low-level design results in a series of builds

 Incremental testing is useful  System testing is not affected

 Level off staffing problems

slide-22
SLIDE 22

LOT–22

Evolutionary model

 First build is defined  Priorities and customer define next build  Difficult to have initial high-level design

 Incremental testing is difficult  System testing is not affected

slide-23
SLIDE 23

LOT–23

Spiral model

 Combination of incremental and evolutionary  After each build assess benefits and risks

 Use to decide go/no-go and direction

 Difficult to have initial high-level design

 Incremental testing is difficult  System testing is not affected

slide-24
SLIDE 24

LOT–24

Spiral model – advantage

 Earlier synthesis and deliverables  More customer feedback  Risk/benefit analysis is rigorous

slide-25
SLIDE 25

LOT–25

Rapid prototyping

 Specification based life cycle model  Build quick and dirty system

 Good for risk analysis  Customer feedback

 System testing is difficult

 Where is the specification?

 Good for acceptance testing

 Emphasis is behaviour, not structure

slide-26
SLIDE 26

LOT–26

Executable specifications

 Specification based life cycle model  Extension of rapid prototyping  Specific behavioural models are built and executed

 Statecharts  Finite state machines  Petri nets  Z specification language

 Customer feedback as for rapid prototyping

slide-27
SLIDE 27

LOT–27

Integration & system testing

 Need to know difference between integration and system

testing

 Avoid testing gaps and redundancies across levels  Set testing goals appropriate for each level

 Structural & behavioural views separate integration and

system testing goals

slide-28
SLIDE 28

LOT–28

Threads

 What are they?

slide-29
SLIDE 29

LOT–29

Threads – 2

 Use cases  Describe behaviour  Have threads at different levels

 What are the levels?

slide-30
SLIDE 30

LOT–30

Threads – 3

 Use cases  Describe behaviour

  •  Have threads at different levels

 What are the levels?

 System  Integration  Unit

slide-31
SLIDE 31

LOT–31

Thread levels

 What are the threads at each level?

 System

 ???

 Integration

 ???

 Unit

 ???

slide-32
SLIDE 32

LOT–32

Thread levels

 System level

 Data context and sequence of port events


  •  Integration

 Path in a finite state machine


  •  Unit

 Path in a program graph

slide-33
SLIDE 33

LOT–33

Structural insights – integration testing

 Assumes unit level testing completed  Can be seen as interface testing

 What about algorithms at higher levels?

 Uses preliminary design

slide-34
SLIDE 34

LOT–34

Structural insights – system testing

 Requirements level  What is the difference between the following?

 requirements  preliminary design

 What-how and other definitions too vague

 Inevitability of intertwining specification and design

slide-35
SLIDE 35

LOT–35

Behavioural insights

 System level

 Deals with port boundaries

 What the user sees and does

 Sequences of integration-level threads

 Integration level

 Deals with boundaries between port and unit

 Within the system

 Sequences of unit-level threads