Using JMeter to get the phone-side request interface information is similar to the Fiddler principle, which is to intercept the request information sent by the mobile phone by setting up an intermediary proxy server. The steps used are slightly simpler than fiddler, and getting the interface information is divided into the following steps:
1. Adding an HTTP proxy server to the JMeter
A) Add original step: Right-click Add-On, non-test original->http proxy Server
b) Set HTTP proxy server information
PORT: The default port number is 8080, no special cases need to be modified
Target controller: Select where to save the acquired interface information
Include mode: Gets only requests that contain styles added in the pattern
Exclusion mode: Do not get requests for this type of style, in order to exclude the acquisition of pictures
2. Mobile phone Set Network agent
A) View the intranet IP of the machine where the JMeter agent resides
b) Set up the phone HTTP proxy
Different brands of phone set the HTTP proxy way slightly, but the process is similar.
3. Turn on the JMeter Proxy server and start getting phone-side requests
A) When the HTTP proxy is turned on, the request information sent by the mobile phone is automatically recorded.
b) The Proxy service collects the corresponding request and needs to transform the request into an executable file
Create a thread group in the test plan, drag the interface request from the HTTP proxy server directly into the thread group, add the result collector, and execute the interface to see the interface information.
JMeter getting the phone-side interface