+ All Categories
Home > Documents > Pert 11 Software Testing Techniques

Pert 11 Software Testing Techniques

Date post: 14-Apr-2018
Category:
Upload: lim-cia-chien
View: 225 times
Download: 0 times
Share this document with a friend

of 24

Transcript
  • 7/27/2019 Pert 11 Software Testing Techniques

    1/24

    These courseware materials are to be used in conjunction with Software Engineering: A Practitioners Approach, 5/e and areprovided with permission by R.S. Pressman & Associates, Inc., copyright 1996, 2001

    Chapter 17Software Testing Techniques

  • 7/27/2019 Pert 11 Software Testing Techniques

    2/24

    These courseware materials are to be used in conjunction with Software Engineering: A Practitioners Approach, 5/e and areprovided with permission by R.S. Pressman & Associates, Inc., copyright 1996, 2001

    Software Testing

    Testing is the process of exercising aprogram with the specific intent of finding

    errors prior to delivery to the end user.

  • 7/27/2019 Pert 11 Software Testing Techniques

    3/24

    These courseware materials are to be used in conjunction with Software Engineering: A Practitioners Approach, 5/e and areprovided with permission by R.S. Pressman & Associates, Inc., copyright 1996, 2001

    Testability

    Operabilityit operates cleanly

    Observability

    the results of each test case arereadily observed

    Controllabilitythe degree to which testing canbe automated and optimized

    Decomposabilitytesting can be targeted

    Simplicityreduce complex architecture andlogic to simplify tests

    Stability

    few changes are requested duringtesting

    Understandabilityof the design

  • 7/27/2019 Pert 11 Software Testing Techniques

    4/24

    These courseware materials are to be used in conjunction with Software Engineering: A Practitioners Approach, 5/e and areprovided with permission by R.S. Pressman & Associates, Inc., copyright 1996, 2001

    Operabilitas

    Semakin baik dia bekerja, semakin efisien dia

    dapat diujiSistem mpy bug menambah analisis dan

    biaya pelaporan ke proses pengujian

    Tidak ada bug yang memblok eksekusipengujian

    Produk berkembang di tahap fungsional(memungkinkan pengembangan dan

    pengujian secara simultan)

  • 7/27/2019 Pert 11 Software Testing Techniques

    5/24

    These courseware materials are to be used in conjunction with Software Engineering: A Practitioners Approach, 5/e and areprovided with permission by R.S. Pressman & Associates, Inc., copyright 1996, 2001

    Observabilitas

    Apa yang anda lihat adalah apa yang anda uji

    Output yang berbeda dikeluarkan olehmasing2 input

    Tahap dan variabel sistem dpat

    dilihat/diantrikan selama eksekusiOutput yang tidak benar dapat diidentifikasi

    dengan mudah

    Kesalahan internal dilaporkan scr otomatis

    Kode sumber dapat diakses

  • 7/27/2019 Pert 11 Software Testing Techniques

    6/24

    These courseware materials are to be used in conjunction with Software Engineering: A Practitioners Approach, 5/e and areprovided with permission by R.S. Pressman & Associates, Inc., copyright 1996, 2001

    What Testing Shows

    errors

    requirements conformance

    performance

    an indicationof quality

  • 7/27/2019 Pert 11 Software Testing Techniques

    7/24

    These courseware materials are to be used in conjunction with Software Engineering: A Practitioners Approach, 5/e and areprovided with permission by R.S. Pressman & Associates, Inc., copyright 1996, 2001

    Who Tests the Software?

    developer independent tester

    Understands the system

    but, will test "gently"

    and, is driven by "delivery"

    Must learn about the system,

    but, will attempt to break it

    and, is driven by quality

  • 7/27/2019 Pert 11 Software Testing Techniques

    8/24

    These courseware materials are to be used in conjunction with Software Engineering: A Practitioners Approach, 5/e and areprovided with permission by R.S. Pressman & Associates, Inc., copyright 1996, 2001

    Exhaustive Testing

    loop < 20 X

    There are 10 possible paths! If we execute onetest per millisecond, it would take 3,170 years totest this program!!

    14

  • 7/27/2019 Pert 11 Software Testing Techniques

    9/24

    These courseware materials are to be used in conjunction with Software Engineering: A Practitioners Approach, 5/e and areprovided with permission by R.S. Pressman & Associates, Inc., copyright 1996, 2001

    Selective Testing

    loop < 20 X

    Selected path

  • 7/27/2019 Pert 11 Software Testing Techniques

    10/24

    These courseware materials are to be used in conjunction with Software Engineering: A Practitioners Approach, 5/e and areprovided with permission by R.S. Pressman & Associates, Inc., copyright 1996, 2001

    Test Case Design

    "Bugs lurk in cornersand congregate atboundaries ..."

    Bo ris Beizer

    OBJECTIVE

    CRITERIA

    CONSTRAINT

    to uncover errors

    in a complete manner

    with a minimum of effort and time

  • 7/27/2019 Pert 11 Software Testing Techniques

    11/24

    These courseware materials are to be used in conjunction with Software Engineering: A Practitioners Approach, 5/e and areprovided with permission by R.S. Pressman & Associates, Inc., copyright 1996, 2001

    White-Box Testing

    ... our goal is to ensure that allstatements and conditions have

    been executed at least once ...

  • 7/27/2019 Pert 11 Software Testing Techniques

    12/24

    These courseware materials are to be used in conjunction with Software Engineering: A Practitioners Approach, 5/e and areprovided with permission by R.S. Pressman & Associates, Inc., copyright 1996, 2001

    Why Cover?

    logic errors and incorrect assumptionsare inversely proportional to a path'sexecution probability

    we often believe that a path is notlikely to be executed; in fact, reality isoften counter intuitive

    typographical errors are random; it'slikely that untested paths will containsome

  • 7/27/2019 Pert 11 Software Testing Techniques

    13/24

    These courseware materials are to be used in conjunction with Software Engineering: A Practitioners Approach, 5/e and areprovided with permission by R.S. Pressman & Associates, Inc., copyright 1996, 2001

    Basis Path Testing

    First, we compute the cyclomaticcomplexity:

    number of simple decisions + 1

    or

    number of enclosed areas + 1

    In this case, V(G) = 4

  • 7/27/2019 Pert 11 Software Testing Techniques

    14/24

    These courseware materials are to be used in conjunction with Software Engineering: A Practitioners Approach, 5/e and areprovided with permission by R.S. Pressman & Associates, Inc., copyright 1996, 2001

    Cyclomatic Complexity

    A number of industry studies have indicatedthat the higher V(G), the higher the probabilityor errors.

    V(G)

    modules

    modules in this range are

    more error prone

  • 7/27/2019 Pert 11 Software Testing Techniques

    15/24

    These courseware materials are to be used in conjunction with Software Engineering: A Practitioners Approach, 5/e and areprovided with permission by R.S. Pressman & Associates, Inc., copyright 1996, 2001

    Basis Path TestingNext, we derive theindependent paths:

    Since V(G) = 4,there are four paths

    Path 1: 1,2,3,6,7,8

    Path 2: 1,2,3,5,7,8Path 3: 1,2,4,7,8Path 4: 1,2,4,7,2,4,...7,8

    Finally, we derive testcases to exercise thesepaths.

    1

    2

    34

    5 6

    7

    8

  • 7/27/2019 Pert 11 Software Testing Techniques

    16/24

    These courseware materials are to be used in conjunction with Software Engineering: A Practitioners Approach, 5/e and areprovided with permission by R.S. Pressman & Associates, Inc., copyright 1996, 2001

    Basis Path Testing Notes

    you don't need a flow chart,but the picture will help whenyou trace program paths

    count each simple logical test,

    compound tests count as 2 ormore

    basis path testing should beapplied to critical modules

  • 7/27/2019 Pert 11 Software Testing Techniques

    17/24

    These courseware materials are to be used in conjunction with Software Engineering: A Practitioners Approach, 5/e and areprovided with permission by R.S. Pressman & Associates, Inc., copyright 1996, 2001

    Loop Testing

    NestedLoops

    ConcatenatedLoops UnstructuredLoops

    Simpleloop

  • 7/27/2019 Pert 11 Software Testing Techniques

    18/24

    These courseware materials are to be used in conjunction with Software Engineering: A Practitioners Approach, 5/e and areprovided with permission by R.S. Pressman & Associates, Inc., copyright 1996, 2001

    Loop Testing: Simple Loops

    Min imum cond i t ions

    Simple Loop s

    1. skip the loop entirely

    2. only one pass through the loop

    3. two passes through the loop

    4. m passes through the loop m < n5. (n-1), n, and (n+1) passes throughthe loop

    where n is the maximum number

    of allowable passes

  • 7/27/2019 Pert 11 Software Testing Techniques

    19/24

    These courseware materials are to be used in conjunction with Software Engineering: A Practitioners Approach, 5/e and areprovided with permission by R.S. Pressman & Associates, Inc., copyright 1996, 2001

    Loop Testing: Nested Loops

    Start at the innermost loop. Set all outer loops to theirminimum iteration parameter values.

    Test the min+1, typical, max-1 and max for theinnermost loop, while holding the outer loops at theirminimum values.

    Move out one loop and set it up as in step 2, holding all

    other loops at typical values. Continue this step untilthe outermost loop has been tested.

    If the loops are independent of one anotherthen treat each as a simple loopelse* treat as nested loops

    endif*for example, the f inal loop co un ter value of loop 1 isused to ini t ia l ize loop 2.

    Nested L oop s

    Concatenated Loops

  • 7/27/2019 Pert 11 Software Testing Techniques

    20/24

    These courseware materials are to be used in conjunction with Software Engineering: A Practitioners Approach, 5/e and areprovided with permission by R.S. Pressman & Associates, Inc., copyright 1996, 2001

    Black-Box Testing

    requirements

    eventsinput

    output

    Black Bo Testing

  • 7/27/2019 Pert 11 Software Testing Techniques

    21/24

    These courseware materials are to be used in conjunction with Software Engineering: A Practitioners Approach, 5/e and areprovided with permission by R.S. Pressman & Associates, Inc., copyright 1996, 2001

    Black Box Testing

    Menemukan kesalahan dalam kategori:Fungsi-fungsi yang tidak benar/hilang

    Kesalahan interface

    Kesalahan struktur data/akses databaseeksternal

    Kesalahan kinerja

    Inisialisasi dan kesalahan transmisi

    Black Box Testing

  • 7/27/2019 Pert 11 Software Testing Techniques

    22/24

    These courseware materials are to be used in conjunction with Software Engineering: A Practitioners Approach, 5/e and areprovided with permission by R.S. Pressman & Associates, Inc., copyright 1996, 2001

    Black Box Testing

    Pengujian didesain untuk menjawab pertanyan2

    berikut: Bagaimana validitas fungsional diuji?

    Kelas input apa yang akan membuat test casemenjadi baik?

    Apakah sistem sangat sensitif terhadap nilai inputtertentu?

    Bagaimana batasan dari suatu data diisolasi

    Kecepatan data apa dan volume data apa yangdapat ditolerir oleh sistem?

    Apa pengaruh kombinasi tertentu dari dataterhadap operasi sistem?

    Pengujian untuk Aplikasi

  • 7/27/2019 Pert 11 Software Testing Techniques

    23/24

    These courseware materials are to be used in conjunction with Software Engineering: A Practitioners Approach, 5/e and areprovided with permission by R.S. Pressman & Associates, Inc., copyright 1996, 2001

    Pengujian untuk Aplikasidan Lingkungan Khusus

    Pengujian GUI

    Pengujian Arsitektur Client/Server

    Pengujian Dokumentasi dan Fasilitas Help

    Pengujian Sistem Real Time

    Equivalence Partitioning:

  • 7/27/2019 Pert 11 Software Testing Techniques

    24/24

    These courseware materials are to be used in conjunction with Software Engineering: A Practitioners Approach, 5/e and areprovided with permission by R.S. Pressman & Associates, Inc., copyright 1996, 2001

    Equivalence Partitioning:Sample Equivalence

    Classes

    user supplied commands

    responses to system prompts

    file namescomputational data

    physical parameters

    bounding valuesinitiation valuesoutput data formattingresponses to error messagesgraphical data (e.g., mouse picks)

    data outside bounds of the programphysically impossible data

    proper value supplied in wrong place

    Valid d ata

    Inval id data


Recommended