1.0 Non-functional testing
1.1 Compatibility Tests
1.1.1 definition
In different platforms, the system can work normally
1.1.2 Test Concerns
- Browsers: Internet Explorer, Google Firefox, etc
- Operating system: Different operating systems: Win, Linux, MAC, Redhat, Windows 7, XP, and 10
- The resolution of the
- network
1.2 Performance Test
- Large user volume, concurrent testing, stress testing, load testing
- There are performance requirements
1.3 Security Test
N/A Concerns SQL injection n/A Penetration test: Security test engineers input data at the service level Important information cannot be copied Sensitive information Desensitization Output data Encryption of sensitive information in the database Transmitted data: Encryption algorithms are required for data encryptionCopy the code
1.4 Usability Tests
User groups
Project complexity
shortcuts
Pursuit: easy to use, easy to understand, easy to learn
1.5 Interface Test
UI
Rule of reference: UI design is required
layout
style
Button style
2.0 Network knowledge
2.1 case:
Enter www.baidu.com/ in the browser, press enter, you will see the wangdu home page, in this network communication process, what happened?
1. The browser searches for the IP address corresponding to the domain name on the DNS server
2. Send a request to the web server corresponding to the IP address
3. The Web server returns the required data
4. Render and display in the browser
2.2 HTTP and HTTPS (Important)
HTTP: Hypertext Transfer protocol, a method of publishing and receiving HTML pages, port number 80
HTTPS: indicates the secure version of HTTP, which adds SSL to HTTP and uses port 443
S: SSL: encrypts network connections at the transport layer to ensure data transmission security
2.3 the URL
2.3.1 the URL definition
Uniform resource locator
<https://tieba.baidu.com/f?kw=%C3%C0%CA%B3&fr=ala0&tpl=5>
Copy the code
2.3.2 URL parsing
Schema ://host[:port]/path? Query_string # Anchor Schema: protocol (HTTP, HTTPS/FTP) Host [:port]: domain name or IP address of the server Port :port number Path: path for accessing resources query_string: Query parameter, sent to the server, expression: Parameter name = corresponding value anchor: anchor, location? The following query string does not participate in path matching & : After multiple query parameters are present, join,Copy the code
2.4 What is the difference between a GET request and a POST request? (important)
get | post |
---|---|
Get concatenates the request parameters in the FORM of key names = values in the URL address | A POST request passes the request parameters as a request body |
Get requests are directly exposed to the URL and are not secure | Post is secure, and sensitive information is transferred in POST |
Get requests back harmless in the browser | Post submits the request again |
Get requests can only be URL encoded | Post supports multiple encodings |
The parameters of the GET request remain intact in the browser’s history | The POST parameter is not reserved |
Get requests pass parameters in the URL with a length limit | Post has no length limit |
The received parameter data type of GET, ASCLL characters | Post has no restrictions |
Get requests resources from the server | Post submits resources to the server |
2.5 Common Request headers
First row data: Request mode Request path protocol
type | describe | instructions |
---|---|---|
host | Host and port number | |
Connection | Connection type | Keep-alive HTTP1.1 default, supports long links |
User-Agent | Browser name | Marking browser identity |
Accept | Transfer file type | Marks the type of file that the browser or other client can receive |
Referer | Marks the URL from which the current requested page came | |
Accept-Encoding | Codec format of the file | Marks the encoding method received by the browser. Encoding is used to compress files and improve file transfer speed. After the browser receives the response, it decodes the file first |
Accept-Language | Types of language | |
cookie | Save the state |
2.6 the response
2.6.1 response
1. Status line expression: Protocol version response status code Response information 2. The response header ignores the basic server information or data description, which prompts the client how to process response data 3. The body of the response is the data, which can be images, text, JSON, HTML, or XMLCopy the code
2.6.2 Response Headers
type | describe |
---|---|
Connection | Responds to the client connection, telling the server that long links are also supported |
Content-Type | Tell the client the type of resource file that the client is happy to encode in UTF-8 |
Date | The server time when the server sends resources |
Server | The server |
2.6.3 Response Status (Major)
Status code | describe |
---|---|
100-199. | The server successfully accepts some requests and continues to submit others before completing the process |
200-299. | Indicates that the server has successfully received the request and completed the entire processing process, usually 200 OK |
300-399. | Redirect, indicating that the customer needs to refine the request more |
400-499. | 404 not found 403 was rejected |
500-599. | Server error, usually 500 |
The famous state
Status code | According to | Request type | describe |
---|---|---|---|
200 | OK | get | The server successfully returned the requested data |
201 | created | post/put | The user is created or modified successfully |
202 | accepted | Asynchronous task, request queuing in background | |
204 | no content | delete | The user succeeded in deleting data. Procedure |
401 | unauthorized | User has no permissions | |
400 | bad request | post/put | The front end request has a syntax error that the back end cannot understand |
403 | forbidden | Access denied | |
404 | not found | The wrong URL | |
406 | not acceptable | get | The format of the user request does not exist, for example the response exists JSON and the user wants XML |
500 | server unavailable | Server error |
- Request summary:
1. Request line: Location information: In the first line presentation format: Request mode Request address protocol versionCopy the code
Common request methods
type | describe |
---|---|
get | Request resources from the server |
post | Create a resource on the server |
put | Update resources on the server |
delete | Delete resources on the server |
head | Gets the response header |
options | Request queries about server performance or resource-related options and requirements |
2. Request header: Position information: after the first line, before the blank line Expression format: key value structure, describes the client message, for example user_Agent describes the browser type important parameter: Content-type marks the request body data typeCopy the code
type | describe |
---|---|
application/x-www-from-urlencoded form | The form data is encoded as a key-value structure and sent to the server |
application/json | Json data format |
text/html | HTML format |
text/plain | Plain text |
image/jepg | Ipg image format |
multipart/form-date | Upload files in the form |
3. Request body: used in POST and PUT methods, but not in GET request body data: form data, text, HTML, JSONCopy the code
2.6.4 Network Communication
2.6.4.1 IP address
IP address = Network address + host address
In a network, to mark a computer with a unique address
2.6.4.2 CLASSIFICATION of IP Addresses (Major)
The highest bit of the network address is 0. The highest bit of the network address is 10. The highest bit of the network address is 10. The highest bit of the network address is 10. The highest bit of a network address is 110. The first byte of a Class D address is 1110, reserved for multicast. The first byte of a Class E address is 11110, reserved for future use, for experimentation or developmentCopy the code
Private IP addresses are not used on the public network
10.0.0.0 | those |
along | 172.31.255.255 |
192.168.0.0 | 192.168.255.255 |
Note:
127.0.0.1 is the local address
2.6.5 Ports (Key)
2.6.5.1 Famous ports 0-1023
Port 80 is allocated to the HTTP service
The Linux port 2 ^ 16 = 65536
2.6.5.2 Dynamic Port
1024-65535.
When the program is closed, the port is released
IP is a marked network address
A port is a channel through which a program sends and receives network data
2.7 Network Protocols
2.7.1 OSI Model (key)
2.7.1.1 model
OpenSystemInterconnect Open system interconnection
2.7.1.2 the physical
Function: Creates, maintains, and disconnects physical links required for data transmission.
Common physical layer devices are Repeaters and hubs. At this layer, data units are called bits.
2.7.1.3 link layer
It serves the network layer, providing reliable transport over unreliable physical media. Functions include: physical address addressing, data framing, flow control, data error detection, retransmission and so on. Common link layer devices are layer 2 switches and Bridges. At this level, the units of data are called frames.
2.7.1.4 network layer
Routing data across a large network.
At this layer, the unit of data is called packet
2.7.1.5 transport layer
Provides reliable end-to-end connections.
At this level, the units of data are called segments.
2.7.1.6 session layer
Session layer: Manages session processes between hosts, that is, establishes, manages, and terminates sessions between processes.
2.7.1.7 presentation layer
Presentation layer: encoding, encryption and decryption, compression
2.7.1.8 application layer
Application layer: DNS, HTTP, mail service, file transfer service, etc
2.7.1.9 Summary of seven-layer model
layer | describe | case |
---|---|---|
The application layer | The layer closest to the user in the OSI reference model is the application interface for the computer user, as well as the direct provision of various network services to the user. Our common application layer network service protocols are: HTTP, HTTPS, FTP, POP3, SMTP and so on. | The boss of company A is the user we mentioned, and the commercial quotation he wants to send is A network service provided by the application layer. Of course, the boss can also choose other services, such as sending A commercial contract, sending an inquiry, and so on. |
The presentation layer | The presentation layer provides various encoding and conversion functions for application layer data, ensuring that data sent by the application layer of one system can be identified by the application layer of another system. If necessary, this layer can provide a standard representation for converting multiple data formats within a computer into a standard representation for communication. Data compression and encryption are also among the transformation capabilities that the presentation layer can provide. | Since Company A and COMPANY B are from different countries, English is used as the communication language by agreement between them. Therefore, the presentation layer (the secretary of the company) is to translate the information transmitted by the application layer into English. At the same time, in order to prevent other companies from seeing it, the people of Company A will also do some encryption processing on this quotation. That’s what presentation is for, translating data at the application layer and so on. |
The session layer | The session layer is responsible for establishing, managing, and terminating communication sessions between presentation layer entities. Communication at this layer consists of service requests and responses between applications in different devices. | Colleagues at the conversation level get the converted data of colleagues at the presentation level (the colleagues at the conversation level are similar to the communications department of the company), and the colleagues at the conversation level may have the contact information of their company with many other companies, where the company is the entity in the actual transmission process. They manage their company’s communications with many outside companies. After receiving the data from the presentation layer, the session layer establishes and records the session. It first finds the address information of Company B and then puts the whole document in an envelope with the address and contact information. Prepare to send the information. When it is confirmed that company B has received this quotation, the conversation is over and the colleagues in the public relations department will terminate the conversation. |
The transport layer | The transport layer establishes end-to-end links between hosts. The transport layer provides end-to-end reliable and transparent data transmission services for upper-layer protocols, including error control and flow control. This layer hides the details of the lower level data communication from the upper level, so that the upper level user sees only a reliable host-to-host data path that can be controlled and set by the user between the two transport entities. We usually talk about TCP UDP at this layer. The port number is the “port” here. | The transport layer is the equivalent of the company’s deliverers, the company’s own deliverers, who deliver the material to the company or post office from the next level. |
The network layer | This layer establishes the connection between the two nodes through IP addressing, selects appropriate routing and switching nodes for packets sent by the transport layer at the source end, and correctly transmits them to the transport layer at the destination end according to the address. It is usually called the IP layer. This layer is known as the IP protocol layer. The IP protocol is the foundation of the Internet. | Network layer is equivalent to express company huge network of express different distribution centers nationwide, for example, from shenzhen to Beijing along abundant express (land transportation as an example, the air seemed to fly directly to Beijing), first of all, to the motion of the distribution center in shenzhen, from shenzhen hub to hub to wuhan again, from wuhan hub to send to Beijing shunyi hub. Each of these hubs is like an IP node in the network. |
Data link layer | Bits are combined into bytes, and bytes into frames, using link layer addresses (Ethernet uses MAC addresses) to access the media, and error detection. The data link layer is divided into two sub-layers: logical link control layer (LLC) and media access control layer (MAC). MAC sub-layer processing CSMA/CD algorithm, data error check, frame, etc. The LLC sublayer defines fields that enable the last protocol to share the data link layer. In practical use, the LLC sublayer is not required. | |
The physical layer | The actual transmission of the final signal is through the physical layer. Transmit bitstreams over physical media. Level, speed and cable pins are specified. Common devices include hubs, Repeaters, modems, network cables, twisted-pair cables, and coaxial cables. These are transport media for the physical layer. | The means of transportation in the process of express delivery are equivalent to our physical layer, such as cars, trains, planes and ships. |
2.7.2 TCP/IP protocol
2.7.2.1 Model (key)
2.7.2.2 Comparison between OSI and TCP/IP
2.7.2.3 SCHEMATIC diagram of TCP/IP Transmission
2.7.2.4 IP
An IP packet consists of a header and data. The first 20 bytes of the header are mandatory for all IP packets, also known as fixed headers. After the header fixed section are optional fields of variable length
2.7.2.5 TCP protocol
The head
--Source Port Indicates the Source Port. It is 16 bits. -Destination Port Indicates the Destination Port. It is a 16-bit Port. --Sequence Number Specifies the Sequence Number of the first byte in the sent packet. -- This is the Acknowledgment serial Number, 32 bits. Data Offset: Data Offset. The value of this field is the length of the TCP header (including options) divided by 4. -- Flag bit: 6 bits, URG indicates that the Urgent Pointer field is meaningful: ACK means this Acknowledgment Number field is meaningful PSH means the Push function, FIN Indicates that no data needs to be sent. FIN indicates that no data needs to be sent. Window Indicates the free space of the receive buffer, which is 16 bits. --Checksum indicates the 16-bit Checksum. --Urgent Pointers are 16 bits. This field is meaningful only if the URG flag bit is set, indicating the offset of Urgent data relative to the Sequence Number field.Copy the code
2.7.2.6 TCP Three-way Handshake (Key)
2.7.2.7 Wave four times
2.7.2.8 Long links
2.7.2.8.1 TCP Short Connection
1. The client sends a connection request to the server
2. The server receives the request and establishes a connection
3. The client sends data to the server
4. The server sends data to the client
5. When the read/write operation is complete, the client initiates the disconnection
2.7.2.8.2 long links
1. The client sends a connection request to the server
2. The server receives the request and establishes a connection
3. The client sends data to the server
4. The server sends data to the client
5. Do not close a read/write operation and proceed with data interaction
6. After all operations are complete, the client sends a request for disconnection
2.7.2.8.3 Long links
Long links | Short connection |
---|---|
The operation of establishing and closing TCP multiple times is eliminated, which saves time | |
Suitable for customers who request frequently |
2.7.3 udp
radio
2.7.4 Similarities and Differences between UDP and TCP (key points)
tcp | udp |
---|---|
1 | TCP connection Oriented |
2 | To ensure the validity and order of data |
3 | TCP timeout retransmission |
4 | After receiving a certain amount of data, TCP does not receive any more data |
5 | There is no |
2.7.5 fiddler
- The principle of
The agent
- caught
- Session area
parameter | describe |
---|---|
# | Sequence number, packet capture sequence |
result | The HTTP status code |
protocol | The protocol used in the request |
host | The host name or domain name of the requested address |
url | The path |
body | The request size |
caching | The requested cache expiration time or cache control value |
content-type | The type of the request response |
process | The process that sends the request |
comments | note |
custom | The custom value |
http request
type | describe |
---|---|
headers | Information first |
textview | Display request or response information as text |
syntaxview | The effect is the same as the TextView, but the syntax is displayed in different colors |
webform | Display all parameters in a form |
hexview | hexadecimal |
auth | Display Authentication Information |
cookie | Save the cookie |
raw | Displays the request header and request body data for the request |
json | Display request or response content in JSON format |
xml | Display request or response content as XML |
Decoding:
Click on the contents of the pink box
type | describe |
---|---|
transformer | Displays the encoding information for the response |
imageview | Request is a picture resource, display the corresponding picture information |
webview | The preview of the response in the browser |
caching | Cache information |
- post
- get
2.8 Deleting Filtering
2.9 Weak network Test
2.9.1 Weak Network Test
2.9.2 Scenarios needing Attention
Focus on the scene |
---|
Broken network |
Network fault |
Minimum rate of each type of network |
Lower than 2G |
3G can also be classified as weak networks |
Weak WiFi |
Combining business Scenarios |
The application type |
Objective: To ensure the normal operation of APP on weak network or even without network
2.9.3 Setting a User-defined Network Speed
Find the modified location Ctrl+F
modified
Note: After the modification is complete, you must enable the performance function because the configuration file modification function is disabled by default
2.9.4 Questions About 2G 3G Settings
2.9.5 breakpoint
2.9.5.1 principle
2.9.5.2 Directly Change the Response
2.9.5.3 Modifying a Response
Direct modify response
run to comlietion
2.9.6 Automatic Response
1. Open the AutoResponder menu
2. Click Add Rule
3. Select the response result
Note: You can select find a file instead of the built-in response to customize the response
4. Save the Settings
5. Select options
Enable rules Select enable rules
Unmatched check box does not affect the requests that do not meet the rules
Select latency for time response Settings
2.9.7 composer
interface