1. Trang chủ
  2. » Công Nghệ Thông Tin

Ex 01 week 5 (answer)

17 0 0

Đang tải... (xem toàn văn)

Tài liệu hạn chế xem trước, để xem đầy đủ mời bạn chọn Tải xuống

THÔNG TIN TÀI LIỆU

Thông tin cơ bản

Định dạng
Số trang 17
Dung lượng 340,33 KB

Nội dung

Software Testing – Practice (Answer) [1] Black Box Testing Techniques (C) 2023 – Pham Nhat Duy – Nguyen Ngoc Qui [Exercise 1] Boundary value analysis technique (1/ value analy value analysis technique (1/sis technique (1/ 2)  Suppose y value analysis technique (1/ou are testing a program that a prog a program that ram that that calculates the cost of a hotel stay a hotel stay value analysis technique (1/ The co The co st is calculated based on the num that ber of a hotel stay d ay value analysis technique (1/s stay value analysis technique (1/ed and the room that rate The co The room that rate is determ that ined by value analysis technique (1/ the ty value analysis technique (1/pe of a hotel stay room that (s ing a program that le or double) and the season (hig a program that h or l ow) The co The cost is calculated using a program that the f a hotel stayollo wing a program that f a hotel stayorm that ula:  cost = number of days * room rate num that ber of a hotel stay day value analysis technique (1/s * room rate room that rate (C) 2023 – Pham Nhat Duy – Nguyen Ngoc Qui [Exercise 1] Boundary value analysis technique (1/ value analy value analysis technique (1/sis technique (2/ 2)  The room that rates are as f a hotel stayollows:  Sing a program that le room that : $50 per night per nig a program that ht in the low seaso n, and and $10 per night per night per nig a program that ht in the hig a program that h season The co  Double room that : $75 per nig a program that ht in the low seaso n, and and $150 per night per nig a program that ht in the hig a program that h season The co  Using a program that the boundary value analysis technique (1/ value analy value analysis technique (1/sis techni que, and identif a hotel stayy value analysis technique (1/ the test cases that would b e the m that ost effective in testing a program that this prog a program that r am that The co (C) 2023 – Pham Nhat Duy – Nguyen Ngoc Qui Exercise – Answer (1/3)  First, and we need to identif a hotel stayy value analysis technique (1/ the boundaries of a hotel stay the input rang a program that es  Num that ber of a hotel stay day value analysis technique (1/s stay value analysis technique (1/ed: Min: 1, and Max: Non e The co  Room that ty value analysis technique (1/pe: Sing a program that le, and Double The co  Season: Low, and Hig a program that h The co  Because the rang a program that e ty value analysis technique (1/pes of a hotel stay the inputs ar e not the sam that e, and so we can have several a ccepted answers The co (C) 2023 – Pham Nhat Duy – Nguyen Ngoc Qui Exercise – Answer (2/3)  Answer 1: (C) 2023 – Pham Nhat Duy – Nguyen Ngoc Qui Exercise – Answer (3/3)  Answer (And other answers: see excel file) (C) 2023 – Pham Nhat Duy – Nguyen Ngoc Qui Note: n is the number of variables BUT WHY? (1/4)  In f a hotel stayact, and we have m that any value analysis technique (1/ ty value analysis technique (1/pes of a hotel stay Boundary value analysis technique (1/ v alue analy value analysis technique (1/sis techniques:  Standard BVA: Maxim that um that num that ber of a hotel stay test cases: 4n+1  Robustness: Maxim that um that num that ber of a hotel stay test cases: n+1  Worst-case: Maxim that um that num that ber test cases: 5n  Robust worst-case: Maxim that um that num that ber of a hotel stay test c ases: 7n  … (C) 2023 – Pham Nhat Duy – Nguyen Ngoc Qui  In standard BVA, and the test cases will be base BUT WHY? (2/4)  Why value analysis technique (1/ is 4n + 1?  As we know, and the test cases will be based on VALID values: [m that in, and m that in+, and nom that inal, and m that ax-, and m that ax]  Total test cases = number of days * room rate (Num that ber of a hotel stay variables * room rate Num that ber of a hotel stay testing a program that p oints without nom that inal ) + (f a hotel stayor Nom that inal) = number of days * room rate 4n + (C) 2023 – Pham Nhat Duy – Nguyen Ngoc Qui Ex1: In theory, 4n+1 = 4*3+1 = 13 BUT WHY? (3/4)  However, and in exercise 1, and the rang a program that e ty value analysis technique (1/pes o f a hotel stay the inputs are not the sam that e: • •  Num that ber of a hotel stay day value analysis technique (1/s stay value analysis technique (1/ed: Min: 1, and Max: None  Room that ty value analysis technique (1/pe: Sing a program that le, and Double (No m that in/m that ax/nom that inal) Number of daysLow, and stayed:  Season: Hig a program that h (No m that in/m that ax/nom that inal) Boundary value analysis technique (1//Max values according a program that to real-lif a hotel staye Room type/season: Loop throug a program that h all or select several values as long a program that as the num that ber of a hotel stay test cases

Ngày đăng: 26/07/2023, 21:58

w