| ID  | Test Case Name                                                                                 | Procedure                                                                                                                                                                                                                                                                                                                                                                                                     | Expected Output                                                                                                                                                                                                                                                                                                                                                                            | Screen Dump                                 | Result         |
| --- | ---------------------------------------------------------------------------------------------- | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | ------------------------------------------- | -------------- |
| 1   | Display all employees in the system                                                            | 1. Start program.<br />2. input 1 for display all employee                                                                                                                                                                                                                                                                                                                                                    | All employees' information including their employee ID, name, salary and department should be displayed                                                                                                                                                                                                                                                                                    | <br /> ![](./screenshots/test1.png) <br />  | Pass/ ~~Fail~~ |
| 2   | Add an employee with name "Pika Chiu, salary 15000 and wortks in IT department into the system | 1. In the employee management system menu, input '2' to add an employee<br />2. Input 'Pika Chiu' for employee's name Input "15000" for salary<br />3. Input "IT" for IT department                                                                                                                                                                                                                           | A success message "Employee Added Successfully" should be displayed                                                                                                                                                                                                                                                                                                                        | <br /> ![](./screenshots/test2.png) <br />  | Pass/ ~~Fail~~ |
| 3   | Remove an employee with valid employee id                                                      | 1. In the employee management system menu, input '3' to Remove an employee<br />2. Input 'IVE00006' for employee's id                                                                                                                                                                                                                                                                                         | A success message "Employee Removed Successfully" should be displayed                                                                                                                                                                                                                                                                                                                      | <br /> ![](./screenshots/test3.png) <br />  | Pass/ ~~Fail~~ |
| 4   | Update an employee with valid employee id                                                      | 1. In the employee management system menu, input '4' to Update an employee<br />2. Input 'IVE00005' for employee's id<br />3. Input '99999' for employee's salary                                                                                                                                                                                                                                             | A success message "Employee Updated Successfully" should be displayed                                                                                                                                                                                                                                                                                                                      | <br /> ![](./screenshots/test4.png) <br />  | Pass/ ~~Fail~~ |
| 5   | Display company statistics                                                                     | 1. In the employee management system menu, input '5' to Update an employee                                                                                                                                                                                                                                                                                                                                    | <br />1. a list of all employee information listed<br />2. total number of staff listed<br />3. staff with highest salary listed<br />4. staff with lowest salary listed<br />5. average salary listed<br />                                                                                                                                                                               | <br /> ![](./screenshots/test5.png) <br />  | Pass/ ~~Fail~~ |
| 6   | exiting system                                                                                 | 1. In the employee management system menu, input "ENTER"(enter key) to exit system                                                                                                                                                                                                                                                                                                                            | <br />1. system exit <br />                                                                                                                                                                                                                                                                                                                                                                | <br /> ![](./screenshots/test6.png) <br />  | Pass/ ~~Fail~~ |
| 7   | main menu invalid input handling                                                               | 1. In the employee management system menu, input "~" to main menu                                                                                                                                                                                                                                                                                                                                             | <br />1. screen showing "input digit contains non-int value, accepted values are 1,2,3,4,5" alert to user<br />                                                                                                                                                                                                                                                                            | <br /> ![](./screenshots/test7.png) <br />  | Pass/ ~~Fail~~ |
| 8   | main menu invalid input handling                                                               | 1. In the employee management system menu, input "a" to main menu                                                                                                                                                                                                                                                                                                                                             | <br />1. screen showing "input digit contains non-int value, accepted values are 1,2,3,4,5" alert to user<br />                                                                                                                                                                                                                                                                            | <br /> ![](./screenshots/test8.png) <br />  | Pass/ ~~Fail~~ |
| 9   | Add an employee (invalid employee name)                                                        | 1. In the employee management system menu, input '2' to add an employee<br />2. Input 'a1' for employee's name (this is invalid name)<br />3. Input '123' for employee's name (this is invalid name)<br />4. Input '4a' for employee's name (this is valid name)<br />5. Input 'apple' for employee's name (this is valid name)<br />6. Input "99999" for salary<br />7. Input "IT" for IT department         | <br />1. showing "ERROR: sorry but the employee name should not contain digit" alert to user<br />2. keep asking "Please input employee's name, Enter to return:" until valid name get<br />3. after getting apple as name, get back to normal employee adding flow<br />                                                                                                                  | <br /> ![](./screenshots/test9.png) <br />  | Pass/ ~~Fail~~ |
| 10  | Add an employee (invalid employee salary)                                                      | 1. In the employee management system menu, input '2' to add an employee<br />2. Input 'apple' for employee's name (this is valid name)<br />3. Input "aaaaa" for salary (invalid input as contains text)<br />4. Input "11111" for salary (valid input)<br />5. Input "IT" for IT department                                                                                                                  | <br />1. showing "ERROR: Employee's salary contains non digit value" alert to user<br />2. keep asking "Please input employee's salary, Enter to return:" until valid salary get<br />3. after getting valid salary, get back to normal employee adding flow<br />                                                                                                                         | <br /> ![](./screenshots/test10.png) <br /> | Pass/ ~~Fail~~ |
| 11  | Add an employee (invalid employee department)                                                  | 1. In the employee management system menu, input '2' to add an employee<br />2. Input 'apple' for employee's name (this is valid name)<br />3. Input "11111" for salary (valid input)<br />4. Input "Marketing" (invalid input)<br />5. Input "IT" (valid input)                                                                                                                                              | <br />1. showing "ERROR: Not a valid department, the valid options are HR, IT, Admin, Finance" alert to user<br />2. keep asking "Please input employee's department, Enter to return:" until valid department get<br />3. after getting valid department, show "**\*** Employee Added Successfully"<br />                                                                                 | <br /> ![](./screenshots/test11.png) <br /> | Pass/ ~~Fail~~ |
| 12  | Remove an employee (invalid employee id, not existing)                                         | 1. In the employee management system menu, input '3' to remove an employee<br />2. Input 'IVE00007' for employee's id (this is invalid id, not exist)<br />2. Input "IVE00006" for employee's id (valid input, existing id)                                                                                                                                                                                   | <br />1. showing "ERROR: sorry but the input id not found" alert to user<br />2. keep asking "Please input employee's id, Enter to return:" until valid id get<br />3. after getting valid id, show "**\*** Employee Removed Successfully"<br />                                                                                                                                           | <br /> ![](./screenshots/test12.png) <br /> | Pass/ ~~Fail~~ |
| 13  | Remove an employee (invalid employee id, invalid format)                                       | 1. In the employee management system menu, input '3' to remove an employee<br />2. Input 'III00007' for employee's id (this is invalid id, not exist)<br />2. Input "IVE00006" for employee's id (valid input, existing id)                                                                                                                                                                                   | <br />1. showing "ERROR: sorry but the input id not found" alert to user<br />2. keep asking "Please input employee's id, Enter to return:" until valid id get<br />3. after getting valid id, show "**\*** Employee Removed Successfully"<br />                                                                                                                                           | <br /> ![](./screenshots/test13.png) <br /> | Pass/ ~~Fail~~ |
| 14  | Remove an employee (invalid employee id, invalid format)                                       | 1. In the employee management system menu, input '3' to remove an employee<br />2. Input 'a' for employee's id (this is invalid id)<br />2. Input "IVE00006" for employee's id (valid input, existing id)                                                                                                                                                                                                     | <br />1. showing "ERROR: sorry but the input id not found" alert to user<br />2. keep asking "Please input employee's id, Enter to return:" until valid id get<br />3. after getting valid id, show "**\*** Employee Removed Successfully"<br />                                                                                                                                           | <br /> ![](./screenshots/test14.png) <br /> | Pass/ ~~Fail~~ |
| 15  | Remove an employee (invalid employee id, invalid format)                                       | 1. In the employee management system menu, input '3' to remove an employee<br />2. Input '11111111' for employee's id (this is invalid id)<br />3. Input "IVE00006" for employee's id (valid input, existing id)                                                                                                                                                                                              | <br />1. showing "ERROR: sorry but the input id not found" alert to user<br />2. keep asking "Please input employee's id, Enter to return:" until valid id get<br />3. after getting valid id, show "**\*** Employee Removed Successfully"<br />                                                                                                                                           | <br /> ![](./screenshots/test15.png) <br /> | Pass/ ~~Fail~~ |
| 16  | Update an employee (invalid employee id, invalid format)                                       | 1. In the employee management system menu, input '4' to update an employee<br />2. Input '1' for employee's id (this is invalid id)<br />3. Input "IVE00006" for employee's id (valid input, existing id)<br />4. Input "11111" for employee's id (valid input)                                                                                                                                               | <br />1. showing "ERROR: sorry but the input id not found" alert to user<br />2. keep asking "Please input employee's id, Enter to return:" until valid id get<br />3. after getting valid id, get back to normal update employee flow<br />                                                                                                                                               | <br /> ![](./screenshots/test16.png) <br /> | Pass/ ~~Fail~~ |
| 17  | Update an employee (invalid salary)                                                            | 1. In the employee management system menu, input '4' to update an employee<br />2. Input "IVE00006" for employee's id (valid employee id, existing id)<br />3. Input "a" for salary (invalid input, salary cannot be non integer value)<br />4. Input "$" for salary (invalid input, salary cannot be non integer value)<br />5. Input "111" for salary (value input, integer value only)                     | <br />1. showing "ERROR: Employee's salary contains non digit value" alert to user<br />2. keep asking "Please input employee's salary, Enter to return:" until valid salary get<br />3. after getting valid salary, show "**\*** Employee Updated Successfully" to user<br />                                                                                                             | <br /> ![](./screenshots/test17.png) <br /> | Pass/ ~~Fail~~ |
| 18  | display highest salary                                                                         | 1. In the employee management system menu, input '5' get current snap of employee table<br />2. In the employee management system menu, input '2' to add an employee<br />3. Input "highest_employee" for name (valid employee name)<br />4. Input "9999999" for salary (valid highest salary)<br />5. Input "IT" for department (valid department)<br />6. Input "5" to check the highest salary got updated | <br />1. showing "highest_employee" in staff name field with highest salary<br />                                                                                                                                                                                                                                                                                                          | <br /> ![](./screenshots/test18.png) <br /> | Pass/ ~~Fail~~ |
| 19  | display lowest salary                                                                          | 1. In the employee management system menu, input '5' get current snap of employee table<br />2. In the employee management system menu, input '2' to add an employee<br />3. Input "lowest_employee" for name (valid employee name)<br />4. Input "10" for salary (valid lowest salary)<br />5. Input "IT" for department (valid department)<br />6. Input "5" to check the lowest salary got updated         | <br />1. showing "lowest_employee" in staff name field with lowest salary<br />                                                                                                                                                                                                                                                                                                            | <br /> ![](./screenshots/test19.png) <br /> | Pass/ ~~Fail~~ |
| 20  | update statistics after adding user                                                            | 1. In the employee management system menu, input '5' get current snap of employee table<br />2. In the employee management system menu, input '2' to add an employee<br />3. Input "new_user" for name (valid employee name)<br />4. Input "10" for salary (valid high salary)<br />5. Input "IT" for department (valid department)<br />6. Input "5" to check the lowest salary got updated                  | <br />1. number of staff = "6" + "1" = "7"<br />                                                                                                                                                                                                                                                                                                                                           | <br /> ![](./screenshots/test20.png) <br /> | Pass/ ~~Fail~~ |
| 21  | update statistics after remove user                                                            | 1. In the employee management system menu, input '5' get current snap of employee table<br />2. In the employee management system menu, input '3' to remove an employee<br />3. Input "IVE00006" for id (valid employee id)                                                                                                                                                                                   | <br />1. number of staff = "6" - "1" = "5"<br />                                                                                                                                                                                                                                                                                                                                           | <br /> ![](./screenshots/test21.png) <br /> | Pass/ ~~Fail~~ |
| 22  | update average after adding user                                                               | 1. In the employee management system menu, input '5' get current snap of employee table<br />2. In the employee management system menu, input '2' to add an employee<br />3. Input "new_user" for name (valid employee name)<br />4. Input "10" for salary (valid high salary)<br />5. Input "IT" for department (valid department)<br />6. Input "5" to check the average salary got updated                 | <br />1. average salary changed from $19814.78 to $16,985.53 (average of "7" employee)<br />                                                                                                                                                                                                                                                                                               | <br /> ![](./screenshots/test22.png) <br /> | Pass/ ~~Fail~~ |
| 23  | update average after remove user                                                               | 1. In the employee management system menu, input '5' get current snap of employee table<br />2. In the employee management system menu, input '3' to add an employee<br />3. Input "IVE00001" for id (valid employee id)<br />4. Input "5" to check the average salary got updated                                                                                                                            | <br />1. average salary changed from $19814.78 to $15135.64 (average of "5" employee)<br />                                                                                                                                                                                                                                                                                                | <br /> ![](./screenshots/test23.png) <br /> | Pass/ ~~Fail~~ |
| 24  | add employee (cancelling)                                                                      | 1. In the employee management system menu, input '2' to add an employee<br />2. Input "ENTER"(one key) for name (cancelling the add flow)                                                                                                                                                                                                                                                                     | <br />1. showing "**\*** Employee Add cancelled"<br />2. back to the main menu<br />                                                                                                                                                                                                                                                                                                       | <br /> ![](./screenshots/test24.png) <br /> | Pass/ ~~Fail~~ |
| 25  | add employee (cancelling)                                                                      | 1. In the employee management system menu, input '2' to add an employee<br />2. Input "apple" for name (valid name)<br />3. Input "ENTER"(one key) for name (cancelling the add flow)                                                                                                                                                                                                                         | <br />1. showing "Please input employee's name, Enter to return:"<br />2. after receiving valid name, showing "Please input employee's salary, Enter to return:"<br />3. after pressing "ENTER"(one key), showing "**\*** Employee Add cancelled"<br />4. back to the main menu<br />                                                                                                      | <br /> ![](./screenshots/test25.png) <br /> | Pass/ ~~Fail~~ |
| 26  | add employee (cancelling)                                                                      | 1. In the employee management system menu, input '2' to add an employee<br />2. Input "apple" for name (valid name)<br />3. Input "100" for salary (valid salary)<br />4. Input "ENTER"(one key) for department (cancelling the add flow)                                                                                                                                                                     | <br />1. showing "Please input employee's name, Enter to return:"<br />2. after receiving valid name, showing "Please input employee's salary, Enter to return:"<br />3. after receiving valid salary, showing "Please input employee's department, Enter to return:"<br />4. after pressing "ENTER"(one key), showing "**\*** Employee Add cancelled"<br />5. back to the main menu<br /> | <br /> ![](./screenshots/test26.png) <br /> | Pass/ ~~Fail~~ |
| 27  | remove employee (cancelling)                                                                   | 1. In the employee management system menu, input '3' to remove an employee<br />2. Input "ENTER"(one key) for id (cancelling the remove flow)                                                                                                                                                                                                                                                                 | <br />1. showing "**\*** Employee remove cancelled"<br />                                                                                                                                                                                                                                                                                                                                  | <br /> ![](./screenshots/test27.png) <br /> | Pass/ ~~Fail~~ |
| 28  | update employee (cancelling)                                                                   | 1. In the employee management system menu, input '4' to update an employee<br />2. Input "ENTER"(one key) for id (cancelling the update flow)                                                                                                                                                                                                                                                                 | <br />1. showing "**\*** Employee update cancelled"<br />                                                                                                                                                                                                                                                                                                                                  | <br /> ![](./screenshots/test28.png) <br /> | Pass/ ~~Fail~~ |
| 29  | update employee (cancelling)                                                                   | 1. In the employee management system menu, input '4' to update an employee<br />2. Input "IVE00006" for name (valid name)<br />3. Input "ENTER"(one key) for salary (cancelling the update flow)                                                                                                                                                                                                              | <br />1. showing "Please input employee's id, Enter to return:"<br />1. showing "Please input employee's salary, Enter to return:"<br />1. after pressing "ENTER"(one key),<br />1. showing "**\*** Employee update cancelled"<br />                                                                                                                                                       | <br /> ![](./screenshots/test29.png) <br /> | Pass/ ~~Fail~~ |
