Question { 16496 }
how to write testcase for toaster?
Answer
1. First get the specifications for toaster,
a. like is it for India or abroad.(Voltage is 240 V and 110 V).
b.HOw many bread must be toasted.Is it 2 or 3.And under what
stipulated timing
2. Define the major objective.Bread must be toasted and be
edible and taste good for eating
(IF in interview,the interviewer to assume generally).
Start writing the test conditions:
1.The slot given for inserting bread should provide enough
space for bread.
2.If test 1 passes.Insert bread and press toast button.the
toaster must toast the bread in the stipulated time and pop
the bread out.The bread toasted must be edible.
(We can derive so many test condition,such as We can have
options line ordinary bread,wheat bread,etc and also is the
bread toaster insulated.)
Now write testcases
Test Case id:1
Test Case description:
Should be able to insert the bread inside the toaster.
Preconditions:
None
Steps to execute:
1.Take a bread from the bread packet.
2.Insert the bread into the toaster's bread slot.
Expected result:
The bread should go inside the toaster smoothly.The bread
should be vertical and the vertical angle should not be more
than 5 degress and less than 0 degrees.
This is just an example and a very good one.It is really
interesting.I am happy that interviewers ask such question.