Interface Test Report

大智若渔_Smart_Fishpond 团队 2024-12-06 02:27:51
Which course does this assignment belong to2401_Mu_SE_FZU
Where is the requirement for this assignmentFifth Assignment——Alpha Sprint
Team nameSmart Fishpond Access
The goal of this assignment

1. Claim Stress Test Method

2. Conduct API Test

3. Claim API test Results

Other referencesOpenAPI Specification (Swagger)

Content

Interface Test Report

1. API Testing

2. Test items

2.1 Test method

2.2 Test steps

2.3 Sample test results


Interface Test Report

Interface Testing is a broader term that includes testing any communication between different software modules, systems, or applications, such as UI-to-backend interactions. In this report, our focus is solely on API testing. This means our testing approach is dedicated to verifying the proper operation and integration of APIs, ensuring that the data flow, response times, and security measures meet the required standards.

1. API Testing

API testing is a critical process for testing application programming interfaces (APIs), aimed at validating the functionality, performance, security, and stability of the API. By simulating client requests to the API and checking if the responses meet the expected outcomes, API testing ensures that the API can correctly handle various types of data, maintain response times within acceptable limits*, and *manage exceptional cases effectively. API testing not only helps identify functional issues at the interface level but also verifies that the interaction between different modules within the system is functioning as expected. It is a key aspect of ensuring the stable operation of software systems. API testing guarantees smooth communication and collaboration across different layers and modules of the software system, assisting developers and testers in ensuring that the API meets the expected reliability, performance, and security standards.

2. Test items

Test interfaceMethodologiesTesting timeTest contentTester
LoginPOSTNovember 28, 2024 23:01:32Log in832201306
ChangePOSTNovember 28, 2024 23:01:34Forgotten password832201306
RegisterPOSTNovember 28, 2024 23:03:33Enrollment832201306
VerifyPOSTNovember 28, 2024 23:03:37Verification code832201306
getDeviceLocationGETNovember 28, 2024 23:03:39Get device location832201306
getWordGETNovember 28, 2024 23:04:07Speech recognition832201306
getAnswerGETNovember 28, 2024 23:04:10Get a reply832201306
newDevicePOSTNovember 28, 2024 23:04:13Add new device832201306
dataGETNovember 28, 2024 23:04:15Get data832201306
warnLogGETNovember 28, 2024 23:04:20Warning history832201306
pushPOSTNovember 28, 2024 23:04:21Upload data832201306

2.1 Test method

Black box testing is used for this test. Black-box testing can ensure that the interface function meets the requirements and the response time is reasonable and stable by verifying the input and output of the interface. The advantage of black-box testing is that it simplifies the testing process, improves test coverage, and ensures that the interface operates normally in the actual environment while providing a basis for optimization of the interface. Because the interface to be tested for this test is known, and the code logic has been checked and optimized, this paper adopts the black-box test which mainly verifies the function.

Since the number of interfaces is small, this test uses Postman to manually test each interface and check its return value.

2.2 Test steps

Caution

The newDevice and data interfaces are shown here as an example.

Step 1 Creating a new request

  1. Open Postman and click “+” to create a new Request Tab.

  2. Enter the URL of the interface in the Request Address field, for example: http://json.moyu-home.cn/newdevice

  3. Select the request method (e.g. GET, POST) from the drop-down list on the left.

Step 2 Setting request parameters

  1. Headers Settings

    Click on the Headers tab. Add the necessary request header parameters: Content-Type: application/json

  2. Body Settings

    Click on the Body tab.

    Add the request body:

    {
      "device": DZRY,
      "id": number
    }

Step 3 Send a request and validate the response

  1. Click the "Send ” button to send the request.

  2. Check return values and response times

2.3 Sample test results

Test result of data is shown below.

img

Fig. 1 "data" API test result

As shown in the Fig. 1 , the response time is 88ms, and the interface is able to respond and return data quickly, indicating that the interface is designed to have good performance and meet the expected functional requirements. In addition, the response time of 88ms adapts to common business requirements, and the system performance is good under the current load. Status code 200 indicates that the request was successfully processed and the interface returned the correct response without any errors.

This indicates that the interface is working properly and returns the correct data or response message as expected. The interface was able to respond quickly and returned status code 200, indicating that the interface functioned correctly and met the requirements specification. The request was successfully processed and no errors occurred in the returned data or execution results.

Test result of newDevice is shown below. img

​Fig. 2 "newDevice" API test result

As shown in the Fig. 2 , the response time is 159ms, the newDevice API works fine with a response time of 159ms and is able to process and return data within an acceptable time frame. The functional implementation of the interface has no exceptions and meets the design requirements. The response time of 159ms indicates that the interface has good processing power and can quickly complete the device registration task under normal load conditions.

The interface returns a status code of 200 OK, which indicates that the interface is not only working properly but also has good performance. The interface is able to complete the data processing and return the result in a very short time, which is suitable for efficient data interaction scenarios.

 

 

...全文
35 回复 打赏 收藏 转发到动态 举报
AI 作业
写回复
用AI写文章
回复
切换为时间正序
请发表友善的回复…
发表回复

170

社区成员

发帖
与我相关
我的任务
社区描述
2401_MU_SE_FZU
软件工程 高校
社区管理员
  • FZU_SE_TeacherL
  • 助教-吴可仪
  • 助教-孔志豪
加入社区
  • 近7日
  • 近30日
  • 至今
社区公告
暂无公告

试试用AI创作助手写篇文章吧