Question: 1 . Testing using whitebox techniques ( 3 0 marks ) Read the following scenario and then answer the questions given: A vending machine dispenses
Testing using whitebox techniques marks
Read the following scenario and then answer the questions given:
A vending machine dispenses either hot or cold drinks. If you choose a hot drink eg
tea or coffee it asks if you want milk and adds milk if desired then it asks if you
want sugar and adds sugar if required and finally, your drink is dispensed.
A flow graph for this vending machine might look something like this:
a Using this flow chart, draw a control flow diagram. Hint: the structure will be
much the same as the above
b Using the following tests, what is the statement coverage achieved for each of
the following tests and for both tests together?
Test : Dispense a cold drink
Test : Dispense a hot drink with milk and lots of sugar
c Using the same tests as in b what is the decision coverage achieved?
d What additional tests if any would be needed to achieve statement
coverage?
e What additional tests if any would be needed to achieve decision
coverage?
f How many tests are required to achieve path coverage? What are these tests
Step by Step Solution
There are 3 Steps involved in it
1 Expert Approved Answer
Step: 1 Unlock
Question Has Been Solved by an Expert!
Get step-by-step solutions from verified subject matter experts
Step: 2 Unlock
Step: 3 Unlock
