Article From:https://www.cnblogs.com/jinzhng/p/9073400.html

Day 1

Outline:

  1. Interface test (API) is function testing (adding or deletions to databases).

Category: to the outside, to the inside

Tools: Postman JMeter

Interface test necessity: early detection and early solution, low time cost.

Test concerns: business logic

  1. The general return of the interface is the JSON string

Json It’s a generic data type

Key-value

  1. Front end (client) back end (server)

 

If it is a get request, it does not need any tools. If it is for convenience, use Postman.

 

http://118.24.3.40/api/user/stu_info?stu_name=Small black

The following is not a random code, but a URL code

http://118.24.3.40/api/user/stu_info?stu_name=%E5%B0%8F%E9%BB%91

 

 

Get Difference from post request: there is no big difference.

Get The request data is placed in the URL

Post The requested data is placed in the body

 

By comparing cookie and session, we can know whether we can login successfully.

Cookie

There is a local key value pair

Session

Key value pairs stored on the server side

 

Add cookie

 

 

 

Performance testing:

Tool: JMeter

Script, press, parameterize

 

 

 

Jmeter Search sampleresult.default.encoding inside

 

.properties

 

jsyntaxtextarea.font.family

properties

 

 

 

Jmeter Parameterization

Delimiter What is the separation

 

 

 

 

 

 

 

JmeterPress polymerization report:

Concurrent user number

tps The higher the number of requests the server handles every second, the better the better

The faster the response, the better

 

 

 

 

 

 

 

Reference test for two associated interfaces

 

Link of this Article: Day1 notes

Leave a Reply

Your email address will not be published. Required fields are marked *