Amazon Interview QuestionQuality Assurance Engineers
Country: United States
Clarification:
• Is this a normal vending machine/digital one (normal)
• How many products it can handle (3 rows, 5 columns)
• Does it contain cold/snack products (only cold assumed)
• Does it accept and return both coin and cash (both)
• Does it accept credit cards (no)
• Is this using normal keypad entry (yes)
Testing Scope:
• Do I have to do end to end testing or a single module (end to end)
Visualize:
• Simply try to draw or visualize a vending machine
Test Cases:
Functional Test Cases:
PO Cases:
• Insert money, select item, item to be delivered
Positive test cases:
• Will cash be accepted
• Will coins be accepted
• Is the keypad working
• Is the selection display visible
• Is the product dropped correctly
• Is the appropriate change delivered
Negative test cases:
• What if I insert other currencies?
• What if I entered invalid code
• What if I don’t receive a change
• What if keypad does not work
Edge cases:
• What if I inserted cash and keypad not working
• What if I shook the machine and the product dropped without inserting cash?
• What if the machine is broken into
• What if the coin/cash for change is empty in the machine
• What happens if there is moisture and the front glass becomes frosty and not visible
Boundary cases/ I/O cases:
• Cash and valid selection
• Cash and invalid selection
• Coin and valid selection/invalid selection
• Keys with all possible entries
• Wrong selection
• No selection
• Item not present
Usability test case:
• Am I able to reach the drop box/coin collection/type the keypad, is it too high or low for a short person/disabled person
Exception test cases:
• If power failure happens
• If item date expires
• System fails (internal, like wiring problems)
Error handling test cases:
• Temperature changes outside
• Machine was moved
Non Functional Test Cases:
Performance test cases:
• KPI (Key performance indicators)
• How long it takes from inserting cash to receiving product
• How long it takes to receive change
• How long it takes to drop the product
• How efficiently the keypad works
Load test:
• What happens if the machine is used by 1000 people or more in a span of 2 hours
• What happens if everyone inserts coins in a day, how much coins can be collected inside the machine
• What happens if I retype my selection multiple times
Security:
• What happens if the machine falls down/stolen/broken
• Is the machine locked
Globalization:
• Is other country currency accepted,
• Is the machine portable to various locations
1. Functional passitive scenarios
a. putting coin one at a time and see how it behaves
b. How the system behaves with the acceptable power supply (voltage)
c. How it is delivering food / drink if it is available
2. Funtional negative scenarios
a. Verifying the system behaviour when we put stone or anything else instead of coin. but it shoud same shape as coin
b. If coin stuckup some where in side before reaching coin box, it shoud deliver the food / drink.
c. What will happen if power shut down after putting a coin
d. what wil happen if food / drink is not available after putting coin
e. What will happen if any mal function failure occurs after putting coin
f. what will happen if excessive of food / drink put in beyond its capacity.
g. what will happen in case of high voltage passing in to the system.
3. Accessibility testing
a. Should it be able to handled by visually challenged
4. Security testing.
a. should not be broken.
b. Coins must be stored in safe place.
5. Performance testing:
a. Putting more no ofcoins continuously
6. Stress testing
a. Put more no coins continuosly beyond the capacity of coin box
Usability
- Chekc what age group would be able to use the app.
- check if person with disability would be able to use it.
- check with person with color blindness would be able to use it.
- Check the dimension of machine.
- check the dimensions of every other part of machine, button, coin inserstion part, good collection place etc.
- check if machine sounds for any kind of messages,,.?
- check the material used in machine
- check the color of machine and font and messages displayed in machine
- check if button are pressable.
- check if sound come while pressing any button.
Functional:
- check what kind of coins machine accepts.
- check machine accept paper ruppes as well.
- check max , min amount that machine accepts
- check if machine accepts coins when there is no item available.
- what if coin box is full and items available in machine...
- check if inserted more money then required for an item.
- what if inserted less money then required for item.
- what if user wants to have more then one item in one transaction
- what is user wants to cancel the transaction after inserting the coin.
- what if user inserted forge currency.
- what if user inserted currecncy of different conuntry.
- what if coin/ruppe inserted is in two pieces
- what if machine hanged in middle because of some techincal issue, is there any manual for user to reach out to claim back the money.
- If battery or electricity is out during transaction.
- What if there is no item, can user give some message to owner for fill up the machine.
- Is machine secure enough from theft.
- Is there any alrm if user want to give.
- Is there any other way of payment other then inserting the coins
- How machine works during night, day , mornig, rain etc.
- what temprature machine can bear
include <iostream>
using namespace std;
int main() {
int drink = 0;
string ifswitch;
string again = "y";
while( again == "y" || again == "Y")
{
cout << "Would you like to use if or switch statements?: ";
cin >> ifswitch;
cout << endl;
if(ifswitch == "switch" || ifswitch == "Switch")
{
cout << "Now using switch;
switch(drink)
{
case 1 :
cout << "You chose Coke." << endl;
break;
case 2 :
cout << "You chose Sprite." << endl;
break;
case 3 :
cout << "You chose Water." << endl;
break;
case 4 :
cout << "You chose Orange Juice." << endl;
break;
case 5 :
cout << "You chose Apple Juice." << endl;
break;
default :
cout << "Error. Choice was not valid, Here is your money back.";
}
}
else if(ifswitch == "if" || ifswitch == "If")
{
cout << "Now using if;
if(drink == 1)
cout << "You chose Coke." << endl;
else if(drink == 2)
cout << "You chose Sprite." << endl;
else if(drink == 3)
cout << "You chose Water." << endl;
else if(drink == 4)
cout << "You chose Orange Juice." << endl;
else if(drink == 5)
cout << "You chose Apple juice." << endl;
else
cout << "Error. Choice was not valid, Here is your money back.";
}
cout << "Would you like to go again? (Y/N)" << endl;
cin >> again;
cout << endl;
}
cout << "Ending...";
}
Test plan for Vending m/c: The test plan should include following :- Magnento April 30, 2014
Introduction : Vending machine is a unit which provides food/drink in exchange of coins.
Goal : Test the functionality of vending machine
Team involved :
Bugs Information
Spec Links
Known Issues:
Test Scope :
1) Functional test pass
What type of coins does the vending machine accept?
Verify what type power input does vending machine handle?(Voltage)
Verify what is the capacity of the vending machine
Verify what type of food does it contains?
2) Stress Testing:
Verify that at what level vending machine stops accepting orders?
3) Load testing
verify what is the threshold of the machine
4) Usability testing
verify who will use this machine i.e what is the age group
5) Security testing :
Verify what type of security concerns you want to capture?
6) Performance testing :
How many transacactions does this machine handles in a day?
7) Acceptance testing
how would user get money back if there is a problem in machine