whitebox testing - condition coverage

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

whitebox testing - condition coverage

Post by tvn » Thu 20 Nov, 2014 2:50 pm

Tìm số test case bao phủ 100% condition cho đoạn code sau:

if(a>b>c)
a=a+b+c;
else if (a<b&&b>c)
a=a+b;
else
a=b+c;



kit
Fresher Tester
Posts: 48
Joined: Sun 16 Sep, 2012 4:05 pm
Contact:

Re: whitebox testing - condition coverage

Post by kit » Sat 22 Nov, 2014 12:23 am

Image

Condition coverage is seen for Boolean expression, condition coverage ensures whether all the Boolean expressions have been evaluated to both TRUE and FALSE. A sufficient number of test cases satisfying are:
Test case 1: ace
Test case 2: abd



alice106
Hoc Tester
Posts: 9
Joined: Fri 23 Aug, 2013 5:23 pm
Contact:

Re: whitebox testing - condition coverage

Post by alice106 » Tue 25 Nov, 2014 1:04 am

Các bạn ơi, có ai giải thích rõ hơn dùm mình về "condition coverage" dc không, m đã tìm đọc nhiều post tiếng anh có kèm ví dụ rồi mà vẫn ko hiểu :( :( :(



uttran
Hoc Tester
Posts: 1
Joined: Mon 22 Dec, 2014 1:50 pm
Contact:

Re: whitebox testing - condition coverage

Post by uttran » Thu 25 Dec, 2014 11:27 am

Re: whitebox testing - condition coverage
1.jpg
You do not have the required permissions to view the files attached to this post.



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

Re: whitebox testing - condition coverage

Post by tvn » Thu 25 Dec, 2014 4:20 pm

kit wrote:
condition-testing.png
Condition coverage is seen for Boolean expression, condition coverage ensures whether all the Boolean expressions have been evaluated to both TRUE and FALSE. A sufficient number of test cases satisfying are:
Test case 1: ace
Test case 2: abd
Sorry KIT, không biết sao mà mình bỏ sót bài trả lời của bạn.

Đây là decision coverage chứ không phải condition coverage.
You do not have the required permissions to view the files attached to this post.



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

Re: whitebox testing - condition coverage

Post by tvn » Thu 25 Dec, 2014 4:22 pm

uttran wrote:Re: whitebox testing - condition coverage

Image
Đây cũng là decision coverage, không phải condition coverage.



yeutuanhmatdauten1
Jr. Tester
Posts: 66
Joined: Tue 07 Jul, 2015 5:26 pm
Contact:

Re: whitebox testing - condition coverage

Post by yeutuanhmatdauten1 » Mon 10 Aug, 2015 8:13 am

kit wrote:Image

Condition coverage is seen for Boolean expression, condition coverage ensures whether all the Boolean expressions have been evaluated to both TRUE and FALSE. A sufficient number of test cases satisfying are:
Test case 1: ace
Test case 2: abd
bạn giải thik dùm mình cái test case ace cái?
tới thấy ở đây cần 3 test case mà:
a-c
a-b-d
a-b-e



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

Re: whitebox testing - condition coverage

Post by tvn » Mon 10 Aug, 2015 10:04 pm

Mình không cần test 3 case như trên. Từ a đến c rồi phải qua d hoăc e. Nên chỉ cần test 2 case là đủ.
  • Test case 1: ace
    Test case 2: abd



Post Reply

Return to “White box Testing - Kiểm thử hộp trắng”