Top Banner

of 32

10 Test Planning

Apr 10, 2018

Download

Documents

Vijay Kumar
Welcome message from author
This document is posted to help you gain knowledge. Please leave a comment to let me know what you think about it! Share it to your friends and learn new things together.
Transcript
  • 8/8/2019 10 Test Planning

    1/32

    Ian Sommerville 1995 Software Engineering, 5th edition. Chapter 22 Slide 1

    Verification and Validation

    Assuring that a software

    system meets a user's needs

  • 8/8/2019 10 Test Planning

    2/32

    Ian Sommerville 1995 Software Engineering, 5th edition. Chapter 22 Slide 2

    Objectives

    To introduce software verification and validation

    To describe the stages of the testing process

    To explain the importance of test planning To describe various complementary testing

    strategies

  • 8/8/2019 10 Test Planning

    3/32

    Ian Sommerville 1995 Software Engineering, 5th edition. Chapter 22 Slide 3

    Topics covered

    The testing process

    Test planning

    Testing strategies

  • 8/8/2019 10 Test Planning

    4/32

    Ian Sommerville 1995 Software Engineering, 5th edition. Chapter 22 Slide 4

    Verification:

    "Are we building the product right"

    The software should conform to its specification

    Validation:

    "Are we building the right product"

    The software should do what the user really

    requires

    Verification vs validation

  • 8/8/2019 10 Test Planning

    5/32

    Ian Sommerville 1995 Software Engineering, 5th edition. Chapter 22 Slide 5

    Is a whole life-cycle process - V & V must be

    applied at each stage in the software process.

    Has two principal objectives The discovery of defects in a system

    The assessment of whether or not the system is usable in

    an operational situation.

    The V & V process

  • 8/8/2019 10 Test Planning

    6/32

    Ian Sommerville 1995 Software Engineering, 5th edition. Chapter 22 Slide 6

    Dynamic V & V Concerned with exercising and

    observing product behaviour (testing)

    Static verification Concerned with analysis of

    the static system representation to discover

    problems

    Dynamic and static verification

  • 8/8/2019 10 Test Planning

    7/32

    Ian Sommerville 1995 Software Engineering, 5th edition. Chapter 22 Slide 7

    Static and dynamic V&V

    Formalspecification

    High-leveldesign

    Requirementsspecification

    Detaileddesign

    Program

    Prototype Dynamicvalidation

    Staticverification

  • 8/8/2019 10 Test Planning

    8/32

    Ian Sommerville 1995 Software Engineering, 5th edition. Chapter 22 Slide 8

    Can reveal the presence of errors NOT their

    absence

    A successful test is a test which discovers one

    or more errors

    Only validation technique for non-functional

    requirements

    Should be used in conjunction with staticverification

    Program testing

  • 8/8/2019 10 Test Planning

    9/32

    Ian Sommerville 1995 Software Engineering, 5th edition. Chapter 22 Slide 9

    Statistical testing tests designed to reflect the frequence of user inputs. Used

    for reliability estimation.

    Covered in Chapter 18 - Software reliability.

    Defect testing Tests designed to discover system defects.

    A successful defect test is one which reveals the presence

    of defects in a system.

    Covered in Chapter 23 - Defect testing

    Types of testing

  • 8/8/2019 10 Test Planning

    10/32

    Ian Sommerville 1995 Software Engineering, 5th edition. Chapter 22 Slide 10

    Defect testing and debugging are distinct

    processes

    Defect testing is concerned with confirming the

    presence of errors

    Debugging is concerned with locating and

    repairing these errors

    Debugging involves formulating a hypothesisabout program behaviour then testing these

    hypotheses to find the system error

    Testing and debugging

  • 8/8/2019 10 Test Planning

    11/32

    Ian Sommerville 1995 Software Engineering, 5th edition. Chapter 22 Slide 11

    The debugging process

    Locateerror

    Designerror repair

    Repairerror

    Re-testprogram

  • 8/8/2019 10 Test Planning

    12/32

    Ian Sommerville 1995 Software Engineering, 5th edition. Chapter 22 Slide 12

    Unit testing testing of individual components

    Module testing testing of collections of dependent components

    Sub-system testing testing collections of modules integrated into sub-systems

    System testing testing the complete system prior to delivery

    Acceptance testing testing by users to check that the system satisfies

    requirements. Sometimes called alpha testing

    Testing stages

  • 8/8/2019 10 Test Planning

    13/32

    Ian Sommerville 1995 Software Engineering, 5th edition. Chapter 22 Slide 13

    The testing process

    Sub-systemtesting

    Module

    testing

    Unittesting

    Systemtesting

    Acceptance

    testing

    Componenttesting

    Integration testing Usertesting

  • 8/8/2019 10 Test Planning

    14/32

    Ian Sommerville 1995 Software Engineering, 5th edition. Chapter 22 Slide 14

    Object-oriented system testing

    Less closely coupled systems. Objects are not

    necessarily integrated into sub-systems

    Cluster testing. Test a group of cooperating

    objects

    Thread testing. Test a processing thread as it

    weaves from object to object. Discussed later in

    real-time system testing

  • 8/8/2019 10 Test Planning

    15/32

    Ian Sommerville 1995 Software Engineering, 5th edition. Chapter 22 Slide 15

    Describe major phases of the testing process

    Describe tracability of tests to requirements

    Estimate overall schedule and resourceallocation

    Describe relationship with other project plans

    Describe recording method for test results

    Test planning and scheduling

  • 8/8/2019 10 Test Planning

    16/32

    Ian Sommerville 1995 Software Engineering, 5th edition. Chapter 22 Slide 16

    The test plan

    The testing process

    Requirements traceability

    Tested items Testing schedule

    Test recording procedures

    Hardware and software requirements

    Constraints

  • 8/8/2019 10 Test Planning

    17/32

    Ian Sommerville 1995 Software Engineering, 5th edition. Chapter 22 Slide 17

    The V-model of development

    Requirementsspecification

    Systemspecification

    Systemdesign

    Detaileddesign

    Module andunit codeand tess

    Sub-systemintegrationtest plan

    Systemintegrationtest plan

    Acceptancetest plan

    Service Acceptancetest

    Systemintegration test

    Sub-systemintegration test

  • 8/8/2019 10 Test Planning

    18/32

    Ian Sommerville 1995 Software Engineering, 5th edition. Chapter 22 Slide 18

    Testing strategies

    Tetsing strategies are ways of approaching the

    testing process

    Different strategies may be applied at different

    stages of the testing process

    Strategies covered Top-down testing

    Bottom-up testing

    Thread testing

    Stress testing

    Back-to-back testing

  • 8/8/2019 10 Test Planning

    19/32

    Ian Sommerville 1995 Software Engineering, 5th edition. Chapter 22 Slide 19

    Incremental testing

    T3

    T2

    T1

    T4

    T5

    A

    B

    C

    D

    T2

    T1

    T3

    T4

    A

    B

    C

    T1

    T2

    T3

    A

    B

    Test sequence1

    Test sequence2

    Test sequence3

  • 8/8/2019 10 Test Planning

    20/32

    Ian Sommerville 1995 Software Engineering, 5th edition. Chapter 22 Slide 20

    Top-down testing

    Level 2Level 2Level 2Level 2

    Level 1 Level 1Testing

    sequence

    Level 2stubs

    Level 3stubs

    . . .

  • 8/8/2019 10 Test Planning

    21/32

    Ian Sommerville 1995 Software Engineering, 5th edition. Chapter 22 Slide 21

    Top-down testing

    Start with the high-levels of a system and work

    your way downwards

    Testing strategy which is used in conjunction

    with top-down development

    Finds architectural errors

    May need system infrastructure before any testing

    is possible May be difficult to develop program stubs

  • 8/8/2019 10 Test Planning

    22/32

    Ian Sommerville 1995 Software Engineering, 5th edition. Chapter 22 Slide 22

    Bottom-up testing

    Level NLevel NLevel NLevel NLevel N

    Level N1 Level N1Level N1

    Testing

    sequence

    Testdrivers

    Test

    drivers

  • 8/8/2019 10 Test Planning

    23/32

    Ian Sommerville 1995 Software Engineering, 5th edition. Chapter 22 Slide 23

    Bottom-up testing

    Necessary for critical infrastructure components

    Start with the lower levels of the system and

    work upward

    Needs test drivers to be implemented

    Does not find major design problems until late in

    the process

    Appropriate for object-oriented systems

  • 8/8/2019 10 Test Planning

    24/32

    Ian Sommerville 1995 Software Engineering, 5th edition. Chapter 22 Slide 24

    Thread testing

    Suitable for real-time and object-oriented systems

    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

    Complete thread testing is impossible because ofthe large number of event combinations

  • 8/8/2019 10 Test Planning

    25/32

    Ian Sommerville 1995 Software Engineering, 5th edition. Chapter 22 Slide 25

    Process interactions

    P2

    P1

    P5

    P4

    I1 (P2)

    O2 (P4)

    O1(P5)

    I2 (P1)

    I1 (P1)

    I3 (P1)

    P3I1 (P3) O1 (P4)

  • 8/8/2019 10 Test Planning

    26/32

    Ian Sommerville 1995 Software Engineering, 5th edition. Chapter 22 Slide 26

    Thread testing

    P2P3 P4 O1(P4)

    I1(P3)

    P2P1 P5 O1

    (P5)

    I2

    (P1)

    I1

    (P1)

    I3

    (P1)

  • 8/8/2019 10 Test Planning

    27/32

    Ian Sommerville 1995 Software Engineering, 5th edition. Chapter 22 Slide 27

    Multiple-thread testing

    P2P1 P5

    P4

    I1 (P2)

    O2 (P4)

    O1 (P5)I2 (P1)

    I1 (P1)

    I3 (P1)

  • 8/8/2019 10 Test Planning

    28/32

    Ian Sommerville 1995 Software Engineering, 5th edition. Chapter 22 Slide 28

    Exercises the system beyond its maximum design

    load. Stressing the system often causes defects to

    come to light

    Stressing the system test faulure behaviour..

    Systems should not fail catastrophically. Stress

    testing checks for unacceptable loss of service or

    data

    Particularly relevant to distributed systems

    which can exhibit severe degradation as a

    network becomes overloaded

    Stress testing

  • 8/8/2019 10 Test Planning

    29/32

    Ian Sommerville 1995 Software Engineering, 5th edition. Chapter 22 Slide 29

    Back-to-back testing

    Present the same tests to different versions of the

    system and compare outputs. Differing outputs

    imply potential problems

    Reduces the costs of examining test results.

    Automatic comparison of outputs.

    Possible twhen a prototype is available or with

    regression testing of a new system version

  • 8/8/2019 10 Test Planning

    30/32

    Ian Sommerville 1995 Software Engineering, 5th edition. Chapter 22 Slide 30

    Back-to-back testing

    Test data

    Programversion A

    Programversion B

    Resultscomparator

    Difference report

  • 8/8/2019 10 Test Planning

    31/32

    Ian Sommerville 1995 Software Engineering, 5th edition. Chapter 22 Slide 31

    Key points

    Verification and validation are not the same thing

    Testing is used to establish the rpesence of

    defects and to show fitness for purpose

    Testing activities include unit testing, module

    testing, sub-system testing, integration testing and

    acceptance testing

    Object classes should be testing in O-O systems

  • 8/8/2019 10 Test Planning

    32/32

    Ian Sommerville 1995 Software Engineering, 5th edition. Chapter 22 Slide 32

    Key points

    Testing should be scheduled as part of the

    planning process. Adequate resources must be

    made available

    Test plans should be drawn up to guide the

    testing process

    Testing strategies include top-down testing,

    bottom-up testing, stress testing, thread testingand back-to-back testing