Software Quality Testing Big Job Example
Quality Assurance and Testing of Takeaway Ordering Management System
student name:
student ID:
class:
Academic Year Semester:The second semester of the 2021-2022 school year
Course Title:Software Quality Assurance and Testing
Table of contents
1 Introduction………………………………………… ………… 1
1.1 Purpose…………………………………………… ……. 1
1.2 Background…………………………………………… ……. 1
2 Overview of system analysis…………………………….. …… 2
2.1 System Requirements Analysis…………………………………………… . 2
2.2 System function analysis…………………………………………… .3
2.3 System Structure Diagram…………………………….. … 5
2.4 Detailed design flow chart…………………………….. 5
3 Detailed design of the system…………………………….. …… 7
3.1 Test plan…………………………………………… …. 8
3.2 Test case design…………………………………………… 10
4 Test execution ………………………………………… …….. 17
5 Bug report…………………………………………… …20
- introduction
1.1 Purpose
Based on different standpoints, the purpose of software testing of the system is different. From the perspective of users, it is hoped that through software testing, hidden errors and defects in the software can be exposed, so as to avoid economic losses and life losses for consumers and businesses after online use. inconvenient. Triggered from the perspective of a software developer, it is hoped that the test can show that the product does not have system errors and defects, verify that the product has indeed fulfilled the user’s requirements, establish the user’s confidence in the software quality, and improve the user’s reputation.
1.2 background
With the popularization of e-commerce, more and more people accept the convenient and fast transaction form of e-commerce, and the online food ordering system came out quickly and was welcomed by everyone. The application of the Internet has spread to thousands of households, which provides a good development space for online ordering. At the same time, the intuitive, effective, and convenient advantages of online meal ordering services are incomparable to traditional telephone ordering services. The survey data shows that white-collar workers are more willing to choose online meal ordering services. Online ordering will be a development trend for white-collar workers to capture restaurant information and order meals. Buying off-campus food has also become a major trend. With the growth of the Internet, online food ordering will gradually be loved by people, just like mobile phone text messages a few years ago, bringing tens of billions of business income to enterprises. In the Internet world, whoever innovates in applications earlier will grasp the direction of the future.
2.1 System Requirements Analysis
There are two types of customers that this system mainly targets: consumers and merchants.
For consumers, consumers can use this system to order food online, inquire about ordering and delivery status, inquire about personal orders, and manage personal information such as phone numbers and delivery addresses.
For merchants, merchants can sell meals online, query historical orders, and count turnover through this system.
This system provides users with a takeaway ordering platform. The main target consumers are young people seeking convenience and busy workers. The main target businesses are various catering companies or self-employed.
2.2 System function analysis
Merchant function analysis:
login function
Input: account number, password
Output: account password verification result
Performance: High security and reliability, multiple judgments will be made on the login process.
add staff
Input: Basic employee information (name, phone number, ID number, etc.)
output: new result
Performance: High security, it will judge the inserted data to prevent vacant fields.
Edit employee information
Input: Employee New Information
Output: Modify employee information result
Performance: High security, new data will be judged to prevent vacant fields and illegal fields.
disabled employee
Input: employee id
output: modified result
Performance: Good reliability, it will judge the authority of the operator and the operated person.
Add dish type
Input: add category information (name, rating)
output: new result
Performance: good safety and reliability, prevent repeated types of insertion
Delete dish type
Input: category id
output: delete result
Performance: Good security and reliability, it will judge the deleted dishes, and prevent the deletion of dishes from the category.
Add dishes
Input: basic information of dishes (name, taste, type, price, etc.)
output: add result
Performance: Good safety and reliability, prevents adding duplicate dishes and checks whether the information of dishes is complete.
edit dishes
Input: new information about dishes
output: edit result
Performance: Good safety and reliability, check whether the dish information is complete.
Prohibited dishes
Input: dishId
output: modified result
Performance: Good safety and reliability, it will judge the authority of the operator.
delete menu
Input: dishId
output: delete result
Performance: Good safety and reliability, will judge the authority of the operator, and check whether there is a set meal that includes the dish.
New package
Input: package information (name, price, dishes included, etc.)
output: new result
Performance: Good security and reliability, it will check whether the package information is complete and meets the specifications.
edit package
Input: package new information
output: modified result
Performance: Good security and reliability, it will check whether the modified information complies with the specification.
Prohibition package
Input: package id
Output: modify package status result
Performance: Good safety and reliability, it will judge the authority of the operator.
delete plan
Input: package id
output: delete result
Performance: Good safety and reliability, it will judge the authority of the operator.
Order Details
Input: order id
Output: order information
Performance: The response speed is fast, and the response time will not exceed 2 seconds.
User Function Analysis:
Login registration function
Input: username, password
output: verification result
Performance: Good stability, high throughput, capable of supporting thousands of users to log in at the same time.
add cart function
Input: dish information, package information
output: add result
Performance: Good security and stability, can accurately record for selecting dishes or set meals.
Order payment function
Input: dish information, package information, user information, amount and time, etc.
Output: order payment result
Performance: High security and stability, can guarantee consistency for simultaneous operation of multiple tables, and can support concurrent orders placed by tens of thousands of users at the same time.
Personal information management function
Input: modify information
output: modified result
Performance: Good security and reliability, it will check whether the modified information complies with the specification.
Shipping address management function
Input: modify address information
output: modified result
Performance: Good security and reliability, it will check whether the modified information complies with the specification.
Personal Order Inquiry
input: userid
Output: user history order
Performance: The response speed is fast, no more than 2 seconds.
2.3 System Structure Diagram
2.4 Program Design Flowchart
Merchant login procedure flow chart
Flowchart of new employee procedures for merchants
Merchant delete category procedure flow chart
Merchant’s procedure flow chart for adding dishes
Flow chart of order inquiry program
User login program flow chart
Flowchart of user ordering program
3. System test design
3.1 Test plan
Test target:
(1) Make a realistic and comprehensive plan for each test activity, including the object, scope, method, progress and expected results of each test activity.
(2) Establish an organizational model for project implementation, and define the responsibilities and work content of each role in the test project.
(3) Develop an effective test model that can correctly verify the software system under development.
(4) Determine the time and resources required for testing to ensure its availability and effectiveness.
(5) Establish the test completion and test success criteria for each test phase, and the goals to be achieved.
(6) Identify various risks in testing activities, eliminate possible risks, and reduce losses caused by risks that cannot be eliminated.
Test content: test whether the functions of the software system are complete and effective, and whether the performance is up to standard. For merchants, there are 5 functional modules to be tested, 1: employee management module, to test whether the functions of administrators to add employees, edit employees and delete employees are effective; 2: category management module, to test whether the functions of store staff to add and delete Effective, for deleting a category, strictly pay attention to whether there is a dish under this category, if there is a dish, it should not be deleted; 3: the dish management module, to test whether the functions of the clerk to add dishes, edit dishes, prohibit the sale of dishes and delete dishes are effective; 4: Package management module, to test whether the functions of adding, editing, forbidding and deleting packages are effective; 5: Order details module, to test the function of merchants to view orders and query orders according to order number, start time and end time Is it accurate. For users, it is necessary to test whether the user login function, modify personal information, edit delivery address and place an order are valid. Among them, the order function must be strictly and thoroughly tested.
Test Plan:
1. Unit testing: To test each functional unit, adopt and white-box testing method, and the test cases should involve statement coverage, decision coverage, condition coverage and decision-condition coverage, which are completed by the coders themselves.
2. Integration test: test the integration of multiple functional units, using the black box test method, and the test case design adopts the equivalence partition method and the boundary value method.
3. System testing: Carry out functional, performance and security testing on the entire software system.
3.2 Test case design
User registration and login function unit test case design
white box testing
Draw a control flow graph based on the user login flow chart
Enter data (username, password) | expected output | actual output | Test path description |
user、123456 | wrong password format | login successful | 1 2 3 4 5 6 7 |
Null、123456 | Username can not be empty | Username can not be empty | 1 2 3 8 7 |
user、null | password can not be blank | password can not be blank | 1 2 3 4 9 7 |
user、111 | wrong user name or password | wrong user name or password | 1 2 3 4 5 10 7 |
- decision coverage
Enter data (username, password) | expected output | actual output | Test path description |
user、123456Aa | Landed successfully | login successful | 1 2 3 4 5 6 7 |
- condition coverage
Enter data (username, password) | expected output | actual output | Test path description |
user、123456Aa | Landed successfully | login successful | 1 2 3 4 5 6 7 |
Null、123456 | Username can not be empty | Username can not be empty | 1 2 3 8 7 |
null、null | Username can not be empty | Username can not be empty | 1 2 3 8 7 |
user、null | password can not be blank | password can not be blank | 1 2 3 4 9 7 |
user、111 | wrong user name or password | wrong user name or password | 1 2 3 4 5 10 7 |
- Decision-Condition Override
Enter data (username, password) | expected output | actual output | Test path description |
user、123456Aa | login successful | login successful | 1 2 3 4 5 6 7 |
Null、123456 | Username can not be empty | Username can not be empty | 1 2 3 8 7 |
null、null | Username can not be empty | Username can not be empty | 1 2 3 8 7 |
user、null | password can not be blank | password can not be blank | 1 2 3 4 9 7 |
user、111 | wrong user name or password | wrong user name or password | 1 2 3 4 5 10 7 |
Merchant launches dish function test case design
white box testing
Draw a control flow diagram based on the flow chart of new dishes added by the merchant
- statement coverage
Input data (dish name, dish price, dish type, dish taste selection) |
expected output |
actual output |
Test path description |
Braised pork, 99.00, Anhui cuisine, null | Added successfully | Added successfully | 1 2 3 4 5 6 7 8 9 |
null, 99.00, Anhui cuisine, null | Dish name cannot be empty | Dish name cannot be empty | 1 2 3 4 5 10 9 |
Braised pork, null, Anhui cuisine, null | Dishes price cannot be empty | Dishes price cannot be empty | 1 2 3 4 5 6 11 9 |
Pork meat, 99.00, Anhui cuisine, null | Duplicate dish name | Duplicate dish name | 1 2 3 4 5 6 7 12 9 |
- decision coverage
Input data (dish name, dish price, dish type, dish taste selection) |
expected output |
actual output |
Test path description |
Braised pork, 99.00, Anhui cuisine, null | Added successfully | Added successfully | 1 2 3 4 5 6 7 8 9 |
- condition coverage
Input data (dish name, dish price, dish type, dish taste selection) |
expected output |
actual output |
Test path description |
Braised pork, 99.00, Anhui cuisine, null | Added successfully | Added successfully | 1 2 3 4 5 6 7 8 9 |
Braised pork, 99.00, Anhui cuisine, (slightly spicy, medium spicy, heavy spicy) |
Added successfully |
Added successfully |
1 2 3 4 5 6 7 8 9 |
braised pork, 99.00, null, null | Added successfully | Added successfully | 1 2 3 4 5 6 7 8 9 |
null, 99.00, Anhui cuisine, null | Dish name cannot be empty | Dish name cannot be empty | 1 2 3 4 5 10 9 |
null、null、null、null | Dish name cannot be empty | Dish name cannot be empty | 1 2 3 4 5 10 9 |
null, 99.00, null, (slightly spicy, medium spicy, heavy spicy) |
Dish name cannot be empty |
Dish name cannot be empty |
1 2 3 4 5 10 9 |
Braised pork, null, Anhui cuisine, null | Dishes price cannot be empty | Dishes price cannot be empty | 1 2 3 4 5 6 11 9 |
braised pork, null, null, null | Dishes price cannot be empty | Dishes price cannot be empty | 1 2 3 4 5 6 11 9 |
Braised pork, null, Anhui cuisine, (slightly spicy, medium spicy, heavy spicy) |
Dishes price cannot be empty |
Dishes price cannot be empty |
1 2 3 4 5 6 11 9 |
Pork meat, 99.00, Anhui cuisine, null | Duplicate dish name | Duplicate dish name | 1 2 3 4 5 6 7 12 9 |
Pork Pork, 99.00, Anhui cuisine, (slightly spicy, medium spicy, heavy spicy) |
Duplicate dish name |
Duplicate dish name |
1 2 3 4 5 6 7 12 9 |
- Decision-Condition Override
Input data (dish name, dish price, dish type, dish taste selection) |
expected output |
actual output |
Test path description |
Braised pork, 99.00, Anhui cuisine, null | Added successfully | Added successfully | 1 2 3 4 5 6 7 8 9 |
null, 99.00, Anhui cuisine, null | Dish name cannot be empty | Dish name cannot be empty | 1 2 3 4 5 10 9 |
Braised pork, null, Anhui cuisine, null | Dishes price cannot be empty | Dishes price cannot be empty | 1 2 3 4 5 6 11 9 |
Pork meat, 99.00, Anhui cuisine, null | Duplicate dish name | Duplicate dish name | 1 2 3 4 5 6 7 12 9 |
User order function integration test case design
black box testing
- equivalence class division
Divide valid equivalence classes and invalid equivalence classes
input conditions | effective equivalence class | invalid equivalence class |
Whether the order information is complete (user name, user mobile phone number, address, dishes, remarks) | user != null(1) phone != null (2) address != null(3) dish != null (4) mark != null(5) | user = null(6) phone = null(7) address = null(8) dish = null (9) mark = null(10) |
- Design test cases for valid equivalence classes
use case input | expected output | actual output | override equivalence class |
user, 13845678956, 301, Building 4, Xincheng Garden, Jianghan District, single set meal*1, slightly spicy |
successfully ordered |
successfully ordered |
1、2、3、4、5 |
- Designing Test Cases for Invalid Equivalence Classes
use case input | expected output | actual output | override equivalence class |
user, 13845678956, null, single set meal*1, slightly spicy |
Delivery address cannot be empty |
Delivery address cannot be empty |
8 |
user、13845678956、null、null、null |
Delivery address cannot be empty |
Delivery address cannot be empty |
8、9、10 |
user, 13845678956, null, null, spicy |
Delivery address cannot be empty |
Delivery address cannot be empty |
8、9 |
user, 13845678956, null, single package*1, null |
Delivery address cannot be empty |
Delivery address cannot be empty |
8、10 |
user, 13845678956, 301, Building 4, Xincheng Garden, Jianghan District, null, spicy |
Dishes cannot be empty |
Dishes cannot be empty |
9 |
user, 13845678956, 301, Building 4, Xincheng Garden, Jianghan District, null, null |
Dishes cannot be empty |
Dishes cannot be empty |
9、10 |
- boundary value analysis
use case input | expected output | actual output | override equivalence class |
user, 13845678956, Room 301, Building 4, Xincheng Garden, Jianghan District, single package*1, null |
successfully ordered |
successfully ordered |
1、2、3、4、5 |
user, 13845678956, null, single set meal*1, slightly spicy |
Delivery address cannot be empty |
Delivery address cannot be empty |
8 |
user、13845678956、null、null、null |
Delivery address cannot be empty |
Delivery address cannot be empty |
8、9、10 |
user, 13845678956, null, null, spicy |
Delivery address cannot be empty |
Delivery address cannot be empty |
8、9 |
user, 13845678956, null, single package*1, null |
Delivery address cannot be empty |
Delivery address cannot be empty |
8、10 |
user, 13845678956, 301, Building 4, Xincheng Garden, Jianghan District, null, spicy |
Dishes cannot be empty |
Dishes cannot be empty |
9 |
user, 13845678956, 301, Building 4, Xincheng Garden, Jianghan District, null, null |
Dishes cannot be empty |
Dishes cannot be empty |
9、10 |
4. Test Execution
- User login process test case execution
- Test Results
- Statement Coverage Test Case Test Results
- Decision Coverage Test Case Test Results
- Condition coverage test case test results
- Decision-Condition Coverage Test Case Test Results
- test code
private String username;
private String password;
private String expected;
private static UserService userService = new UserService();
@Parameterized.Parameters
public static Collection<?> prepareData(){
Object [][] object = {
{“user”,”123456″,”wrong password format”},
{“null”,”123456″,”Username cannot be empty”},
{“user”,”null”,”password cannot be empty”},
{“user”,”111″,”Wrong username or password”}
};
return Arrays.asList(object);
}
public ceshi(String username, String password, String expected){
this.username = username;
this.password = password;
this.expected = expected;
}
@Test
public void testDate(){
userService.login(username,password);
Assert.assertEquals(expected, username.getReuslt());
}
- Merchants launch dish test case execution
- Test Results
- Statement Coverage Test Case Test Results
- Decision Coverage Test Case Test Results
- Condition coverage test case test results
- Decision-Condition Coverage Test Case Test Results
- test code
private String dishName;
private double price;
private String category;
private List<String> flavors;
private String expected;
private static DishService dishService = new DishService();
@Parameterized.Parameters
public static Collection<?> prepareData(){
Object [][] object = {
{“Braised pork”,99.00,”Hui Cuisine”,null,”Added successfully”},
{“Braised Pork”,99.00,”Hui Cuisine”,{“Slightly Spicy”,”Medium Spicy”,”Heavy Spicy”},”Added successfully”},
{“Braised pork”,99.00,null,null,”Added successfully”},
{null,99.00,”Hui Cuisine”,null,”The dish name cannot be empty”},
{null,null,null,null,”The dish name cannot be empty”},
{null,99.00,null,{“slightly spicy”,”medium spicy”,”heavy spicy”},”dish name cannot be empty”},
{“Braised Pork”, null,”Hui Cuisine”, null,”The price of the dish cannot be empty”},
{“Braised Pork”,null,null,null,”The price of the dish cannot be empty”},
{“Braised Pork”, null,”Hui Cuisine”,{“Slightly Spicy”, “Medium Spicy”, “Heavy Spicy”},”The price of the dish cannot be empty”},
{“Guobaorou”,99.00,”Hui Cuisine”,null,”The name of the dish is repeated”},
{“Guobaorou”,99.00,”Hui Cuisine”,{“Slightly Spicy”, “Medium Spicy”, “Heavy Spicy”},”Dish name repeated”}
};
return Arrays.asList(object);
}
public ceshi(String dishName, double price, String category, List<String> flavors, String expected){
this.dishName = dishName;
this.price = price;
this.category = category;
this.flavors = flavors;
this.expected = expected;
}
@Test
public void testDate(){
dishService.addDish(dishName,price,category,flavors);
Assert.assertEquals(expected, dishService.getReuslt());
}
- User order process test case execution
- Test Results
- Effective Equivalence Class Test Results
- invalid equivalence class test result
- Boundary value analysis test case test results
- test code
private String username;
private String userphone;
private String address;
private String dishes;
private String mark;
private String expected;
private static OrderService orderService = new OrderService();
@Parameterized.Parameters
public static Collection<?> prepareData(){
Object [][] object = {
{“user”,”13845678956″,”Room 301, Building 4, Xincheng Garden, Jianghan District”, “Single Package*1″, null,”The order was placed successfully”},
{“user”,”13845678956″,null,”Single set meal*1″,”Spicy”,”Address cannot be empty”},
{“user”,”13845678956″,null,null,null,”The address cannot be empty”},
{“user”,”13845678956″,null,null,”Spicy”,”Address cannot be empty”},
{“user”,”13845678956″,null,”Single Package*1″,null,”Address cannot be empty”},
{“user”,”13845678956″,”Room 301, Building 4, Xincheng Garden, Jianghan District”, null,”Spicy”, “Dishes cannot be empty”},
{“user”,”13845678956″,”Room 301, Building 4, Xincheng Garden, Jianghan District”,null,null,”Dishes cannot be empty”}
};
return Arrays.asList(object);
}
public ceshi(String username, String userphone, String address,String dishes, String mark, String expected){
this.username = username;
this.userphone = userphone;
this.address = address;
this.dishes = dishes;
this.mark = mark;
this.expected = expected;
}
@Test
public void testDate(){
orderService.makeOrder(username,userphone,address,dishes,mark);
Assert.assertEquals(expected, orderService.getReuslt());
}
5. Defect Report
module name | User login page | ||
version number | V1.1 | tester | Wang Wei |
defect type | function error | severity level | B |
repeatability | yes | defect state | New |
testing platform | Win10 | browser | Chrome |
brief description | The system stipulates that the password must be greater than 8 and contain characters | ||
Steps | 1. Enter the front-end login page of the takeaway system user 2. Enter username and password 3. Click the Agree Agreement button 4. Click Login 5. Log in successfully | ||
actual results | login successful | ||
expected outcome | wrong password format | ||
note | It is recommended to modify the code, check the advanced format after receiving the password, and then query whether the user exists from the database. |
module name | User order page | ||
version number | V1.1 | tester | Wang Wei |
defect type | function error | severity level | A |
repeatability | yes | defect state | New |
testing platform | Win10 | browser | Chrome |
brief description | From a practical point of view, it is not necessary for the user to fill in the remarks when placing an order, and the system cannot place an order without filling in the remarks. | ||
Steps | 1. Enter the front-end login page of the takeaway system user 2. Enter username and password 3. Click the Agree Agreement button 4. Click Login 5. Select the dish and add it to the shopping cart 6. Click to place an order 7. Select delivery address 8. Click to place an order | ||
actual results | show server error | ||
expected outcome | successfully ordered | ||
note | It is recommended to modify the code of the back-end to determine whether the information is complete, and at the same time check the database table design, whether the remark item is set to non-empty, if it is non-empty, it is recommended to modify it. |