Bài tập phân vùng tương đương nâng cao

Chuyên đề thảo luận về kiểm thử hộp đen (Black-box Testing)
Forum rules
Chuyên đề này chỉ thảo luận về Black-box Testing.
Để có kết quả nhanh, các bạn nên search trước khi tạo chủ đề mới.
Post Reply
tvn
Admin
Posts: 4900
Joined: Tue 10 Aug, 2010 10:11 am
Location: HCM
Contact:

Bài tập phân vùng tương đương nâng cao

Post by tvn »

A company has set up an employee wellness program and combined it with the premium for health insurance: The full standard premium for a health insurance policy is $400. The program have the following rules:

1) Employees who make a pledge — on the honor system — that they don't smoke, or that they take a stop-smoking class, and have a BMI below 30, get 10% off their contribution toward the full standard insurance premium.

2) Employees who fill in a "health risk assessment" with more health details will be rewarded with a $25 reduction in premium.

3) Employees who participate in a yearly health control at the company

a) receive a $50 reduction in their premium for having a BMI of 27.5 or less, and a $25 reduction for having a BMI below 30. And
b) if they are non-smokers, they receive an additional $50 reduction in their premium, and those that have joined a stop-smoking class receive a $25 reduction. Smokers pay an additional premium of $75.

How many test cases are needed to achieve 100% test coverage of equivalence partitions of the input parameters, when testing this specification by applying the equivalence partitioning test design technique and what will be the maximum and minimum resulting premium?

A. 3 test cases and a maximum premium of $475 and minimum premium of $235
B. 6 test cases and a maximum premium of $475 and minimum premium of $235
C. 3 test cases and a maximum premium of $400 and minimum premium of $275
D. 4 test cases and a maximum premium of $400 and minimum premium of $275



tvn
Admin
Posts: 4900
Joined: Tue 10 Aug, 2010 10:11 am
Location: HCM
Contact:

Re: Bài tập phân vùng tương đương nâng cao

Post by tvn »

Áp dụng kỹ thuật vùng tương đương theo các yêu cầu, ta được các vùng tương đương sau:
  • 1. Pledge (bảo đảm) don't smoke & BMI <30 (-10%) | take stop-smoking class & BMI <30 (-10%) | not (0%)
  • 2. Health R.A ($-25) | not ($0)
  • 3a. health club & BMI<=27.5 ($-50) | health club & BMI<30 ($25) | health club & BMI >=30 ($0)
  • 3b. non-smokers ($-50) | join stop-smoking ($-25) | smokers ($+75)
Vậy, đáp án:
> A. 3 test cases and a maximum premium of $475 and minimum premium of $235

Max là $475 khi users thỏa mãn
+ Smokers pay an additional premium of $75
=> (tiêu chuẩn là 400) + 75 = $475

và, Min là $235 khi users rơi vào trường hợp
+ pledge (bảo đảm) don't smoke & BMI <30 (-10%)
+ health club & BMI<=27.5 ($-50)
+ non-smokers ($-50)

=> tiêu chuẩn $400 - 10%*400 (=$40) - $50 - $50 = $235



leminh1997
Hoc Tester
Posts: 2
Joined: Fri 29 Mar, 2019 12:52 am
Contact:

Re: Bài tập phân vùng tương đương nâng cao

Post by leminh1997 »

Cảm ơn tvn ạ! Rất dễ hiểu.



Post Reply

Return to “Black box Testing - Kiểm thử hộp đen”