Preparation conditions: JMeter, mobile app
The previous article introduced the recording of Web test scripts in two ways, using proxies and using third-party tools. This recording app test script only discusses how to use proxies, and other ways to add them later. In fact, the way the Web and app use agents to record test scripts is very similar.
basic steps for using the JMeter agent
(1) Start JMeter, use Jmeter.bat in Windows, use Jmeter.sh in Linux.
(2) Check the test plan for the tested tree species.
(3) Right-click on the test plan to add a new thread group: Add->threads (Users), thread Group
(4) Select Workbench, right-click Workbench and Add HTTP Proxy: Add-on non-test component->http Proxy Server
(5) Port: 8888, this step indicates the port number used by the agent
HTTPS domains:192.168.0.102
Target controller: The thread Group, test plan, which indicates where the agent-recorded script hangs under the branch of the test tree.
Grouping: Not grouping samples
(6) Mobile WiFi proxy settings: Open the Phone WLAN page, long press the current access to WiFi, click Modify Network
(7) Check "Show advanced Options", Agent Select "Manual", this time you can enter the proxy server hostname and port. Note that the host name and port number are the same as the proxy settings on JMeter.
Host Name: 192.168.0.102
PORT: 8888
then click Save.
(8) Return to JMeter, click Start on the HTTP proxy server
(9) The App,jmeter on the phone that needs to be tested will automatically record the requests made by these operations. Then stop recording, the result is as follows, JMeter should be able to record to the script normally
Recording an app test script using the JMeter agent