Skip to main content
Bumped by Community user
Bumped by Community user
Bumped by Community user
edited title
Link
Mate Mrše
  • 4.1k
  • 4
  • 24
  • 51

White-box techniwuetechnique-Statement Coverage : ISTQB Foundation Level

Cleaned up list format and verbiage
Source Link
Kate Paulk
  • 31.5k
  • 8
  • 55
  • 109

I have found the following questions regarding statement coverage.

Minimum Test Required for Statement Coverage:

1.Disc = 0

2.Order-qty = 0

3.Read Order-qty

4.If Order-qty >=20 then

5.Disc = 0.05

6.If Order-qty >=100 then

7.Disc =0.1

8.End if

9End if

  1. Disc = 0
  2. Order-qty = 0
  3. Read Order-qty
  4. If Order-qty >=20 then
    1. Disc = 0.05
    2. If Order-qty >=100 then
      1. Disc =0.1
    3. End if
  5. End if

In my opinion, we need 2 statement coverage. But the correct answer is 1 statement based on many websites. Anyway, 

I hope anyone is able to explaindon't understand why only one statement coverage is needed?.

I have found the following questions regarding statement coverage.

Minimum Test Required for Statement Coverage:

1.Disc = 0

2.Order-qty = 0

3.Read Order-qty

4.If Order-qty >=20 then

5.Disc = 0.05

6.If Order-qty >=100 then

7.Disc =0.1

8.End if

9End if

In my opinion, we need 2 statement coverage. But the correct answer is 1 statement based on many websites. Anyway, I hope anyone is able to explain why only one statement coverage is needed?.

I have found the following questions regarding statement coverage.

Minimum Test Required for Statement Coverage:

  1. Disc = 0
  2. Order-qty = 0
  3. Read Order-qty
  4. If Order-qty >=20 then
    1. Disc = 0.05
    2. If Order-qty >=100 then
      1. Disc =0.1
    3. End if
  5. End if

In my opinion, we need 2 statement coverage. But the correct answer is 1 statement based on many websites. 

I don't understand why only one statement coverage is needed.

added 1 character in body
Source Link
Raki
  • 11
  • 1
Loading
Source Link
Raki
  • 11
  • 1
Loading