In addition to Weibo, there is also WeChat
Please pay attention
WeChat public account
Shulou
2025-01-17 Update From: SLTechnology News&Howtos shulou NAV: SLTechnology News&Howtos > Servers >
Share
Shulou(Shulou.com)06/02 Report--
Architecture
Browser: bUnix s architecture
Client-server interaction: cUnix architecture
Interface testing: by calling the interface to simulate legitimate, illegal, invalid requests to check whether the server's output, performance, and exception handling results are consistent with the requirements document.
Knowledge points that must be mastered in interface testing:
URL:http [s]: / / host [[: port] [abs_path] [parameter]]
Header: header information, including the description of the message
Method: request method
Request Parameters: request parameter
Respouse Status: response status code
The significance of interface testing:
1. Ensure major processes and system stability
two。 Control the bug in the early stage of the project (interface testing first)
3. Shorten the product R & D cycle
4. Check the exception handling capacity of the server
Interface testing method:
1. Test by writing scripting code
two。 Test through the tool
3. Test by hand on the browser access interface
Usage scenarios of API:
1. Call between system and system
two。 The invocation of the service at the lower level of the upper service team
3. Calls between services within the system
Interface testing process:
Participate in requirements discussion and review > > Interface design and interface definition (development, input parameters, number of parameters, returned parameter types) > > Design and review test cases (normal test points, exception test points, review use cases involved in which requirements and which function points, developers and product personnel to supplement) > perform testing (first understand in which environment each interface should be tested)
Interface test case formation:
Requirements documents, their own understanding of business processes + interface design, wiki documents
The wiki document contains the API request method, the number of input parameters, the type of input parameters, the return format, the number of returned parameters, the type of returned parameters, and the specific meaning of returned parameters.
Interface test case design:
1. Required and optional for request parameters
two。 Legal input, invalid input, illegal input of request parameters
3. Boundary value of the request parameter
4. Exception handling of request parameters, such as no required parameters (check the error code returned)
5. Considerations based on business scenarios, such as login status, permissions, dependencies, etc.
6. Design the call to the DAO layer, considering the correctness of data addition, deletion, modification and query (the correctness of foreground and background data)
Important exception concerns for interface testing:
1. There is a test for the outliers between the page number and the number of pages in the interface (whether the content after page turning is repeated, whether there is an error during page turning, and whether the maximum number of page numbers is exceeded)
two。 Add, delete, modify and check the database, for example, after the operation of a post interface is completed, check whether the new data is consistent with the previous post (the correctness of the front and background data) through the list and API.
3. The default value, exception type and non-null check of each API input parameter (no default value, what to do if it is empty? )
4. Whether the image address returned by the API can be opened, and whether the image size meets the requirements.
5. When the output parameters are linked, it is necessary to verify whether the actual results returned by the two parameters meet the requirements.
6. All list page interfaces must consider the sort order
7. All features should be compatible with older versions.
8. When the input parameter supports passing multiple values, you should consider whether the API will report an error if the number of values passed is large (enter more than the specified number of parameters).
9. Output parameter type
Common tools for interface testing:
Manual aids: fiddler, postman, httpwath
Automation third party tools: soapui, robotframework+httplibrary
Performance third-party tools: jmeter, gatling, loadrunner
A useful tool for grabbing bags: Burpsuite (http://drops.wooyun.org/tools/1548))
Welcome to subscribe "Shulou Technology Information " to get latest news, interesting things and hot topics in the IT industry, and controls the hottest and latest Internet news, technology news and IT industry trends.
Views: 0
*The comments in the above article only represent the author's personal views and do not represent the views and positions of this website. If you have more insights, please feel free to contribute and share.
Continue with the installation of the previous hadoop.First, install zookooper1. Decompress zookoope
"Every 5-10 years, there's a rare product, a really special, very unusual product that's the most un
© 2024 shulou.com SLNews company. All rights reserved.