Tài liệu hạn chế xem trước, để xem đầy đủ mời bạn chọn Tải xuống
1
/ 40 trang
THÔNG TIN TÀI LIỆU
Thông tin cơ bản
Định dạng
Số trang
40
Dung lượng
557,5 KB
Nội dung
ソフトウェアテスト [4] ブラックボックステス ト Software Testing [4] Black Box Testing Techniques あまん ひろひさ ひろひさ 阿萬 裕久 裕久( AMAN Hirohisa ) aman@ehime-u.ac.jp (C) 2007-2022 Hirohisa AMAN Test purpose and content Purpose Find errors, bugs that may exist in the soft ware Content Run the software and make sure it works co rrectly as specified Make sure the failures not occur even for situations that not in specifications (C) 2007-2022 Hirohisa AMAN Difficulty of the test Originally, designers and developers t ried to make something according to specifications If it is outside the specifications diffic ult to check it’s unexpected or unnotic ed in the first place (C) 2007-2022 Hirohisa AMAN Terms: Test case, Test suite, Test domain Test case case Specific input data conditions & expected o utput Test case suit casee A set of test cases that runs a set of tests Test caseing Domain Domain Ensuring that the program is no error Complete collection of test cases (C) 2007-2022 Hirohisa AMAN Test example (1): Length conversion *1 kilomet caseer = 0.621371 miles Kilometers Miles Converter 【 Input 】 A real number from to 10000 Up to two decimal places are allowed 【 Output 】 Value converted to miles, round ed down to three decimal places input expected output input expected output 0.000 9.99 6.207 9999.99 6213.703 10 6.213 0.621 -1 error 1.001 0.621 10000 error (C) 2007-2022 Hirohisa AMAN Other exceptions Test example (2): Triangle prob lem Consider a triangle with three integers a s input, each of which is the length of a side Isosceles triangle Equilateral triangle Scalene triangle Consider a test case for a program that determines which of (C) 2007-2022 Hirohisa AMAN Example test case for triangle p roblem input expected output (2, 5, 5) isosceles triangle (5, 5, 5) equilateral triangle (3, 4, 5) scalene triangle (0, 0, 0) error *become a point (3, 4, 7) error *become a line segment (2, 5, 8) error sides *longest side length > sum of the lengths of other (1.3, 4, 5) error *there are real numbers (-2, 4, 5) error *have a negative number *Triangle Inequality: Length of longest side < sum of the lengths of other sides (C) 2007-2022 Hirohisa AMAN [Exercise 1] Test case an int caseeg Domainer sort caseing Domain prog Domainram Now, We are given a program to sort s N integers ≤ N ≤ 10000 N ≤ N ≤ 10000 10000 The input case is from a file Consider a test case for this program (C) 2007-2022 Hirohisa AMAN Important in testing Record the result What case kind of problem of problem was found of problem in which t caseest case ca se, who found of problem it case and of problem when Import caseant case informat caseion aft caseer mod of problemificat case Just reporting ion Communicat casee properly Ambig Domainuous informat caseion is useless that it doesn‘t work is Meaning Domainless How you communicat casee is import caseant case t casehan report case bug Domains Should of problemn't case be proud of problemly show d of problemevelopers t casehat case you’ve found of problem a bu g Domain There are d of problemifficult caseies t casehat case only t casehe person who mad of probleme it case can un d of problemerst caseand of problem, so human relat caseionships are also import case ant case (C) 2007-2022 Hirohisa AMAN Testability Ease of testing Reduction in costs (man-hours) spent on te sting Shorter period of testing Leads to improved quality (C) 2007-2022 Hirohisa AMAN 10