ExamGecko
Question list
Search
Search

Related questions











Question 271 - CTFL-2018 discussion

Report
Export

You need to test a vending machine for light drinks The machine has a button for each of the drinks it contains

Pressing a button before inserting coins, will display the cost of the drink

Pressing the same button after inserting enough coins will dispense the drink and provide change if needed)

If the machine is out of the specific drink, and the button for this drink is pressed, the machine displays 'Sold Out' (regardless if coins were inserted or not).

Which test technique is most suitable for this situation?

A.
State transition testing
Answers
A.
State transition testing
B.
Equivalence class testing
Answers
B.
Equivalence class testing
C.
Boundary value testing
Answers
C.
Boundary value testing
D.
Use-case testing
Answers
D.
Use-case testing
Suggested answer: A

Explanation:

State transition testing is the most suitable test technique for this situation. State transition testing is a technique that uses scenarios based on state diagrams to test the behavior of a system or component that can change its state in response to events or inputs. A state diagram is a graphical representation of the states that a system or component can be in, the events or inputs that can trigger a change of state (transitions), and the actions or outputs that can occur as a result of a change of state. In this case, the vending machine for light drinks can be modeled as a state diagram with states such as ''idle'', ''coins inserted'', ''drink selected'', ''drink dispensed'', ''change returned'', ''sold out'', etc., and transitions triggered by events such as ''button pressed'', ''coins inserted'', ''drink dispensed'', ''change returned'', etc. State transition testing can help design test cases that cover all the possible states and transitions of the vending machine and verify its functionality and usability.

asked 18/09/2024
Rui Carrapico
33 questions
User
Your answer:
0 comments
Sorted by

Leave a comment first