Jmeteris generally
pressure testThe sharp weapon that recently wanted to try JMeter and BeanShell to carry
Interface Test。 Because login is required during the cloud reading interface test, the login request is the HTTPS protocol. This will require the jmeter to be set.
(i) setting up HTTP requestsWe first right-click the Add thread group and then continue to right-click to add the controller, since the login operation is only requested once, so select only once controller. Next, right-click to add the Sampler->http request and set the HTTP request. The place to note here is the port number first, if it is just the normal HTTP protocol, the default is not filled, and here is the HTTPS protocol, thus filling the port number 443. In addition "The agreement" here fills "https". The request body data, because the cloud reading log in the post data is the JSON structure, therefore fills in body data here, uses the curly brace to organize the data. PS: Actually should be POST request, too quickly forgot to change ~ <!--more-->
(ii) Setting up JMeter agentThe previous blog just talked about the HTTPS protocol and the agent control to send HTTPS request principle, we know that to successfully send HTTPS request, the key is the proxy settings. First we need to add a recording controller to the thread group, or we cannot generate the JMeter CA certificate file. And then in
workRight-click Add-〉 non-test element-〉http proxy server. Select the default port of 8080. Click Start directly.
Click on the pop-up page after launch to prompt the CA certificate has been generated in the bin directory. Click OK.
(c) Opening JMeter agentLocate the Toolbar "options"-〉ssl manager. Open the APACHEJMETERTEMPORARYROOTCA.CRT in the bin directory.
(iv) modifying HTTP requestsNow that the proxy is set up, re-modify the HTTP request that was created. Then the bottom proxy
ServerAdd a proxy server: localhost (the jmeter agent built on this machine), the port number is 8080. Save the whole plan and you can.
(v) Add an HTTP request headerSince my request body data is of type JSON, the default HTTP request header Content-type is application/x-www-form-urlencoded. So we're going to add an HTTP request header based on the HTTP request, set Content-type to Application/json type.
(vi) Add result view treeAdd the-〉 listener after the HTTP proxy-〉 View the result tree.
(vii) Execute HTTPS requests and view the resultsClick on the toolbar to save, then click the Run button, then you can see the results in the results tree. We see that the operation was successful and that the HTTPS request was successful!
JMeter Learning (36) Send HTTPS request (reprint)