1 / 17

Software Testing

Software Testing. Necessary to measure and certify quality in software SOS 10.1-10.3 Pressman Chapter 13. Software Testing. Often a neglected activity May use 20% of total development effort Can not do exhaustive testing Hard for programmer to test own program

Download Presentation

Software Testing

An Image/Link below is provided (as is) to download presentation Download Policy: Content on the Website is provided to you AS IS for your information and personal use and may not be sold / licensed / shared on other websites without getting consent from its author. Content is provided to you AS IS for your information and personal use only. Download presentation by click this link. While downloading, if for some reason you are not able to download a presentation, the publisher may have deleted the file from their server. During download, if you can't get a presentation, the file might be deleted by the publisher.

E N D

Presentation Transcript


  1. Software Testing Necessary to measure and certify quality in software SOS 10.1-10.3 Pressman Chapter 13

  2. Software Testing • Often a neglected activity • May use 20% of total development effort • Can not do exhaustive testing • Hard for programmer to test own program • subconsciously we want testing to succeed

  3. Exhaustive Testing is impractical

  4. Exhaustive Testing (2)

  5. Historical Overview • 1960’s - very little testing • 1968 - Hoare’s paper on proving • 1970’s - “only good test is one that fails” • early 70’s - reliability • 1975 - Goodenough & Gerhart’s paper on finite test sets • mid 70’s - (industrial) separate test teams • late 70’s - test coverage measures • late 90’s – object oriented testing

  6. Typical Solutions • We can’t do exhaustive testing • We can’t test even a moderate percentage of the possibilities • We can try to choose good tests • Solution 1 : Independent Test Teams • Solution 2 : Coverage Measures

  7. Two common types of test coverage • functional testing (cs541) • black box • based on requirements • structural testing (cs540) • white box • based on code

  8. TTYP 1 • Assume that you are given a program to test. The program accepts three numbers, interprets those numbers as lengths of the sides of a triangle, and returns the type of the triangle (scalene, isosceles, or equilateral) • Write a good set of test cases for this program

  9. Triangle Example cin >> a >> b >> c ; type = “scalene”; if (a == b || a == c || b == c) type= “isoscoles”; if (a == b && a == c) type = “equilateral”; if (a >= b+c || b >= a+c || c >= a+b) type=“not a triangle”; if (a <= 0 || b <= 0 || c <= 0) type=“bad input”; cout<< type; TTYP 2 – what is a set of tests that execute all statements?

  10. Control Flow Graph TTYP3 – what are the paths through this code?

  11. A Model of Testing - Mappings • a program maps elements of the domain to elements of the range • the specification also specifies a mapping of the domain to the range • correctness is that the program is the same mapping as the specification

  12. Domains in testing

  13. Subdomain – typical definition • A subdomain is a set of input points (data points, tests, etc) that are treated identically by the program (or almost identically). That is, they usually take the same path through the program and the same operations are applied to the values. • Subdomains are normally mutually exclusive

  14. TTYP 4 • What is a set of subdomains for the triangle code?

  15. The specification

  16. Program vs Specification • Correctness is only in respect to a specification • a program without a specification is correct • Testing can not ignore the specification • Testing can not ignore the program

  17. Thursday, Oct 26 Structural Testing • SOS chapter 10.3.4 and 10.6 • PLQ on structural testing

More Related