1 / 38 CS 425/625 Software Engineering Software Testing Based on Chapter 20 of the textbook [Somm00] Ian Sommerville, Software Engineering, 6 th Ed., Addison-Wesley,

  • Published on
    21-Dec-2015

  • View
    212

  • Download
    0

Embed Size (px)

Transcript

  • Slide 1
  • 1 / 38 CS 425/625 Software Engineering Software Testing Based on Chapter 20 of the textbook [Somm00] Ian Sommerville, Software Engineering, 6 th Ed., Addison-Wesley, 2000 and on the Ch20 PowerPoint presentation available at the books web-site: www.comp.lancs.ac.uk/computing/resources/IanS/SE6/Slides/index.html November 12, 2002
  • Slide 2
  • 2 / 38 Outline n Introduction n Defect Testing u Black Box Testing Equivalence Partitioning u Structural (White Box) Testing Path Testing n Integration Testing u Top-Down u Bottom-Up u Interface Testing u Stress Testing n Object Oriented Testing
  • Slide 3
  • 3 / 38 Introduction.. n n A very high level view of testing phases [Fig. 20.1, Somm00]
  • Slide 4
  • 4 / 38.Introduction. n n Component testing is concerned with checking the functionality of methods, classes, and modules n n Integration testing focuses on sub-systems and their interaction as well as on the operation of the system as a whole n n Component testing is individual programmers task while integration testing is assigned to an integration team n n For critical systems independent testing teams are used during all testing n n Integration testing is based on written requirements specifications
  • Slide 5
  • 5 / 38..Introduction n n In object-oriented testing the boundaries between component and integration testing are blurred because u u Object-oriented systems do not have the clear distinction between program units and program modules characteristic to structured (function- oriented) systems u u The hierarchy of objects is not necessarily nested
  • Slide 6
  • 6 / 38 Defect Testing n n Defect testing is aimed at discovering errors in code n n A successful defect test causes the system to perform incorrectly n n During the testing process the following are created: u u Test cases u u Test data u u Test reports
  • Slide 7
  • 7 / 38 Defect Testing n n Comprehensive testing is not possible. Subsets of tests cases are designed based on criteria such as: u u All code statements should be executed at least once u u All functions accessed through menus should be tested u u All combinations of functions accessed through the same menu should be checked u u All user input situations should be checked with both correct and incorrect data
  • Slide 8
  • 8 / 38 Defect Testing: The Process n n The defect testing process [Fig. 20.2, Somm00]
  • Slide 9
  • 9 / 38 Defect Testing: Black Box Testing. n n In black box testing (or functional testing) the system is viewed from outside, only in terms of its functionality u u The software is tested against its specification u u Internal (implementation) details are ignored u u The behavior of the system is evaluated in terms of inputs received, outputs expected, and outputs actually produced u u A defect is discovered if the actual system output differs from the expected output u u Applicable to both function-oriented and object- oriented systems
  • Slide 10
  • 10 / 38 Defect Testing:.Black Box Testing n n The black-box testing model [Fig. 20.3, Somm00]
  • Slide 11
  • 11 / 38 Defect Testing: Equivalence Partitioning . n n Equivalence partitioning makes use of classes of input test data (e.g., positive numbers, negative numbers, strings, etc.) u u Generally, systems tend to behave in a comparable way for all members of a class u u Classes of input test data are called equivalence partitions or domains u u Equivalence partitions are determined based on program specification and user documentation; u u Test cases are derived for each equivalence partition u u Partition mid-point and boundary values provide useful test data
  • Slide 12
  • 12 / 38.Defect Testing:.Equivalence Partitioning n n Equivalence partitioning [Fig. 20.4, Somm00]
  • Slide 13
  • 13 / 38..Defect Testing: Equivalence Partitioning.. n n Equivalence partitions [Fig. 20.5, Somm00]
  • Slide 14
  • 14 / 38 Defect Testing: Equivalence Partitioning. n n Example: A search routine [Fig. 20.6, Somm00] procedure Search (Key : ELEM ; T: ELEM_ARRAY; Found : in out BOOLEAN; L: in out ELEM_INDEX) ; Pre-condition -- the array has at least one element TFIRST

Recommended

View more >