当前位置:网站首页>Interface test
Interface test
2022-07-07 10:06:00 【Splendid Qianyang 813】
1. What is an interface
Generally speaking, there are two kinds of interfaces : The internal interface of the program and the external interface of the system
External interface of the system : For example, you need to get resources or information from other websites or servers , No one else will share the database with you , He can only give you a way they've written to get the data , You can use the method he wrote by referring to the interface provided by him , In order to achieve the purpose of data sharing , For example, we use app、 These URLs are called through the interface during data processing .
Program internal interface : Between methods , Interaction between modules , The interface thrown inside the program , such as bbs System , There are login modules 、 Post module and so on , If you want to post, you have to log in first , To post, you have to log in , Then the two modules have to interact , It will throw out an interface , For internal system call .
1.1 Common interface types
1、webService Interface : It's going soap Agreement passed http transmission , Both request message and return message are xml Format , We use the tools to call when testing , test . The tools available are SoapUI、jmeter、loadrunner etc. ;
2、http api Interface : It's going http agreement , Differentiate called methods by path , The request message is key-value Formal , The return message is usually json strand , Yes get and post Other methods , This is also the two most commonly used request methods . The tools available are postman、RESTClient、jmeter、loadrunner etc. ;
1.2 Components of the interface
The interface shall have at least the request address 、 Request method 、 Request parameters ( In and out ) form , Some interfaces have request headers header.
URL Include :schema( agreement )、host( domain name )、path( route )、query string( Parameters )、anchor( anchor );
2. How to measure the interface
The most commonly used interface types include get and post Two kinds of ;
GET Request and POST Differences in requests :
1、GET Use URL or Cookie The ginseng . and POST Put the data in BODY in .
2、GET Of URL There will be a length limit , be POST The data can be very large .
3、POST Than GET Security , Because the data is not visible on the address bar .
4、 commonly get Request to get data ,post Requests are used to send data .
session and cookie The difference between :
1.cookie The data is stored on the client's browser ,session Data on the server ;
2.cookie Not very safe , Others can analyze those stored locally cookie And carry on cookie cheating , Should be used in consideration of safety session;
3.session It will be saved on the server for a certain time . When visits increase , We will compare the performance of your server to reduce the performance of your server , Should be used cookie.
4. Single cookie The saved data cannot exceed 4K, Many browsers limit a site to save at most 20 individual cookie.
5. Therefore, it is recommended to store important information such as login as session, If other information is retained , Can be placed in cookie;
Common return status codes :
1xx - message
2xx - success
3xx - Redirect
4xx - Client error
5xx - Server error
(200.201.204.304.400.401.403.404.410.500.503)
边栏推荐
- Why does the starting service report an error when installing MySQL? (operating system Windows)
- Before joining the chain home, I made a competitive product analysis for myself
- request对象对请求体,请求头参数的解析
- Main (argc, *argv[]) details
- CodeForces - 1324D Pair of Topics(二分或双指针)
- Basic use of JMeter to proficiency (I) creation and testing of the first task thread from installation
- EXT2 file system
- Agile course training
- [4g/5g/6g topic foundation -147]: Interpretation of the white paper on 6G's overall vision and potential key technologies -2-6g's macro driving force for development
- Deep understanding of UDP, TCP
猜你喜欢
喜马拉雅网页版每次暂停后弹窗推荐下载客户端解决办法
能源路由器入门必读:面向能源互联网的架构和功能
中国首款电音音频类“山野电音”数藏发售来了!
web3.0系列之分布式存储IPFS
Enterprise practice | construction of banking operation and maintenance index system under complex business relations
Wallys/IPQ6010 (IPQ6018 FAMILY) EMBEDDED BOARD WITH ON-BOARD WIFI DUAL BAND DUAL CONCURRENT
[untitled]
Flex flexible layout
AI从感知走向智能认知
Memory ==c language 1
随机推荐
How to become a senior digital IC Design Engineer (5-3) theory: ULP low power design technology (Part 2)
Delete a record in the table in pl/sql by mistake, and the recovery method
[original] what is the core of programmer team management?
First issue of JS reverse tutorial
Google Colab装载Google Drive(Google Colab中使用Google Drive)
The Himalaya web version will pop up after each pause. It is recommended to download the client solution
农牧业未来发展蓝图--垂直农业+人造肉
ES6中的函数进阶学习
Writing file types generated by C language
Introduction to energy Router: Architecture and functions for energy Internet
A wave of open source notebooks is coming
AI从感知走向智能认知
Detailed explanation of diffusion model
Three years after graduation
小程序滑动、点击切换简洁UI
Database multi table Association query problem
flinkcdc采集oracle在snapshot阶段一直失败,这个得怎么调整啊?
Hcip first day notes sorting
大佬们,请问 MySQL-CDC 有什么办法将 upsert 消息转换为 append only 消
flink. CDC sqlserver. 可以再次写入sqlserver中么 有连接器的 dem