Homework 7 Validation & Verification - Hilari/Tarkvaratehnika-projekt GitHub Wiki

Task 1 - Test Plan

Test Plan

Task 2 - Test Cases

Pass a bill to another waiter

Test case ID: 1
Related requirements:
It is possible for one waiter to pass a bill to another (via user accounts).
It is possible for one waiter to add items to another waiter bill.
Input: Empty bill; a bill that contains products
Steps performed:
Log in to the system.
Choose a bill you want to give to another waiter.
Press the button "Change bill" and change the waiter row input to the one you want.
Log out the system so the other waiter can log in.
Expected results:
The other waiter can see the new bill under his bill list.

Adding a product to database

Test case ID: 2
Related requirements:
The system automatically adds new items to the storage if they are delivered and scanned.
The system calculates the sold items off from the storage.
Input: (1)Parameters of new product (name, price, quantity, description), (2)parameters of product which already exists(name, price, quantity, description), (3)product which has wrong data(for example: you put 'abc' as price).
Steps performed:
Log in to the system.
Press "Add" button at the warehouse tab.
Insert information.
Press "ok" button.
Expected results:
(1)If the input is right, it adds the item to the database or (2)increases quantity if the item is already in the database. (3)If the input is false, the system throws an error message and doesn't add the item.

Adding a product to cart multiple times increases the quantity.

Test case ID: 3
Related requirements:
The product count must increase in the cart if it's added multiple times
Input: A product that is already added to the cart (parameters of product(name, amount))
Steps performed:
Choose an item from the product list which is already in the cart.
Insert the amount ((1)a correct amount that is positive and <= with the warehouse quantity OR (2)an incorrect amount).
Press the "Add to cart" button.
Expected results:
(1) If the input is right, the system increases quantity if the item is already in the cart. (2) If the input is false, the system throws an error message and doesn't add the item.

The system has to calculate the change money.

Test case ID: 4
Related requirements:
The system must show the change money.
Input: (1) Smaller number than the sum of the bill, (2) Bigger number than the sum, (3) Negative number
Steps performed:
Log in to the system.
Add some products to the cart.
Press the "confirm" button.
Insert a number (Smaller, bigger than the sum or a negative number)
Expected results: (1) If the input is a smaller number than the sum or (3) a negative number, the system throws an error. (2) If the input is a bigger number than the sum, the system calculates the difference and displays the amount of change money.

Merge/divide bills

Test case ID: 5
Related requirements:
It is possible for one waiter to pass a bill to another (via user accounts).
It is possible for one waiter to add items to another waiter bill.
Bill can be divided into several bills if the clients choose to pay everyone for himself.
Input: Empty bill; a bill that contains products
Steps performed:
Log in to the system.
Choose a bill you want (1)merge with another or (1)divide to multiple bills.
Press the button "Change bill".
(1)Press the button "Merge"
(1)Choose the other bill you want it to merge with and click on it
(1)Press "ok"
(2)Press the button "Divide bill"
(2)Choose the products you want to move to the divided bill.
(2)Press "ok"
Expected results: (1)The system merges two bills into one. (2)After dividing bills there will be a new bill with the products that were chosen while dividing bills and the other bill with the remaining products.

Task 3 - Non-functional requirements

Usability testing

The system should be easily understandable and viewable, so it can be learned quickly(within an hour).

For testing this usability, we will let 10 random persons(preferably ones that don't know much about cash register systems) use the system. We will let them use the basic functions(for example entering an order, deleting a product etc) that are used daily by the waiters and measure how much time it takes to learn them. We calculate the average time and see if its an hour or less. If the average time is more than an hour, the test is failed.

If waiter uses log in card then he/she will be logged in even if there is somebody already logged in before.

First we try to log in if there is nobody logged in before us. We pull the log in card through the cash register and we can see that we are logged in with specific waiter ID(the log in card owner). Now we take second log in card and try to log in again. The system asks, if we want to log in with another account and we press "yes". Now we are logged in with second account and we can see the other waiter ID.

Performance testing

The database and system have to work correctly with at least 50 open bills.

For testing this, we have to make 50 open bills. We have to check if the database info is synced with all the orders.
After every command, data has to be exchanged. Now we add all the same products(for example: "Saku" beer) from stock to one bill.
Then we open another bill and try to add the same thing, it should throw an error that the product is out of stock. We try it with different products and bills.
If we get errors every time then the test is passed.

A new product which is added to database should be usable in next "add to cart" command(ie adding a new product to stock should take ~0,1 seconds).

For testing this performance, we have to make a new product and see if it is in the item list when we make the next order.
We make a new bill and leave it open, so we can try to add the new product there later.
So now we go to the stock tab and add a new product(enter all the necessary details). The new product is added to stock list and now we switch back to the open bill.
We open the product list and if we can see the new item there, then the test is passed. Switching between the stock list and the bill shouldn't take too long. If you switch to the open bill and the item is not in the product list, then the test is failed.
We also have to test it with making a new item and then making a new order. If the new item is in the product list, then the test is passed.