Bài tập phân vùng tương đương và phân tích giá trị biên

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.

lanhbt
Fresher Tester
Posts: 11
Joined: Fri 30 Nov, 2018 2:36 pm
Contact:

Re: Bài tập phân vùng tương đương và phân tích giá trị biên

Post by lanhbt »

Hi all,
Mình có 1 bài tập về EP như sau:

The bonus of employees is to be calculated, it can't become negative, but it can be calculated to zero. The calculation is based on the duration of the membership of the company. An employee can belong to the company for less than two years, more than two but less than five years, five to ten years or longer than ten years. Depending on this duration an employee will get either no gratification or a gratification of 10%, 25%. How many equivalence partitions are needed to test calculation of the gratification?
a) Two EP
b) Three EP
c) Four EP
d) Five EP

Mình chọn đáp án b) và có các phân vùng sau:
1. Less than 2 years
2. More than 2 years but less than 5 years
3. More than 5 years

Em xin nhờ admin và các bạn xem giúp em đáp án đúng của bài này ạ.
Thanks!



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 và phân tích giá trị biên

Post by tvn »

Câu hỏi của bạn bị thiếu thông tin nên nó không rõ ràng.
* Đoạn "five to ten years or longer than ten years"
=> Nó không có ý nghĩa gì hết nếu nói "từ 5 năm đến 10 năm hoặc hơn 10 năm"
=> vậy tại sao không nói 5 năm trở lên? số "10" trong trường hợp này có nghĩa gì???

Đây là một câu hỏi tương tự nhưng rõ ràng hơn.

A company is going to provide their employees with a bonus which will be based on the employee's length of service in the company. The bonus calculation will be zero if they have been with the company for less than two years, 10% of their salary for more than two but less than five years, and 25% for five to ten years, 35% for ten years or more. The interface will not allow a negative value to be input, but it will allow a zero to be input.

How many equivalence partitions are needed to test the calculation of the bonus?

A. Two equivalence partitions
B. Three equivalence partitions
C. Four equivalence partitions
D. Five equivalence partitions

Ghi chú:
* gratification: tiền thưởng



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 và phân tích giá trị biên

Post by tvn »

lanhbt wrote:
Sun 23 Dec, 2018 8:54 am
Hi all,
Mình có 1 bài tập về EP như sau:

The bonus of employees is to be calculated, it can't become negative, but it can be calculated to zero. The calculation is based on the duration of the membership of the company. An employee can belong to the company for less than two years, more than two but less than five years, five to ten years or longer than ten years. Depending on this duration an employee will get either no gratification or a gratification of 10%, 25%. How many equivalence partitions are needed to test calculation of the gratification?
a) Two EP
b) Three EP
c) Four EP
d) Five EP

Mình chọn đáp án b) và có các phân vùng sau:
1. Less than 2 years
2. More than 2 years but less than 5 years
3. More than 5 years

Em xin nhờ admin và các bạn xem giúp em đáp án đúng của bài này ạ.
Thanks!
Nếu dựa vào *output* của yêu cầu này, thì mình có "0%", "10%" và "25%" nên sẽ có 3 vùng tương đương.
Tương ứng:
0 ----- 2 ----- 5 -----
---0%----10%----25%



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 và phân tích giá trị biên

Post by tvn »

Nhưng, yêu cầu của cả hai câu hỏi trên đều có một lỗi sai, đố các bạn tìm ra.



vynguyen0880
Hoc Tester
Posts: 1
Joined: Thu 03 Jan, 2019 4:42 pm
Contact:

Re: Bài tập phân vùng tương đương và phân tích giá trị biên

Post by vynguyen0880 »

tvn wrote:
Sun 23 Dec, 2018 9:35 pm

Đây là một câu hỏi tương tự nhưng rõ ràng hơn.

A company is going to provide their employees with a bonus which will be based on the employee's length of service in the company. The bonus calculation will be zero if they have been with the company for less than two years, 10% of their salary for more than two but less than five years, and 25% for five to ten years, 35% for ten years or more. The interface will not allow a negative value to be input, but it will allow a zero to be input.

How many equivalence partitions are needed to test the calculation of the bonus?

A. Two equivalence partitions
B. Three equivalence partitions
C. Four equivalence partitions
D. Five equivalence partitions

Ghi chú:
* gratification: tiền thưởng
Em chọn đáp án C đúng không anh?
Vùng 1: < 2 năm => 0%
Vùng 2: 2<X<5 => 10%
Vùng 3: 5<=X<10 => 25%
Vùng 4: 10 <= X => 35%
Anh trả lời giúp em nhé, em cám ơn anh.



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 và phân tích giá trị biên

Post by tvn »

vynguyen0880 wrote:
Fri 11 Jan, 2019 6:20 pm

Em chọn đáp án C đúng không anh?
Vùng 1: < 2 năm => 0%
Vùng 2: 2<X<5 => 10%
Vùng 3: 5<=X<10 => 25%
Vùng 4: 10 <= X => 35%
Anh trả lời giúp em nhé, em cám ơn anh.
Hi vynguyen0880, bạn chọn đúng rồi á ^^
Good jobs!



Post Reply

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