[Jmeter learning diary 1] Jmeter recording web http interface requests

Individual learning background: two of its app into the maintenance phase, the future will not have too many changes to the new demands of the interface, so would like to automate regression testing interface by Jmeter, save the manpower, can also more comprehensive coverage.

Jmeter recording web http interface requests

First, the recording effect: more efficient import http requests, accurate populated url, parameters, http request class information to facilitate follow-up process, you can save a lot of time.

Second, the installation Jmeter, very simple, download the official package, bin directory to open jmeter.bat.

Third, before recording configurations:

  1, the new http proxy server under test plan (ie HTTP (S) Test Script Recorder)

  2, crawled to the http request to create a new thread in the test group plans to save the recorded

  3, configure the proxy server, documentation configuration items are explained as follows:

    Open Documentation: Open the next Jmeter directory printable_docs / index.html, find Component reference, that is, into the directory function,

  

    Find the corresponding function, such as this we need to find a method to configure a proxy server, then find HTTP (S) Test Script Recorder, click to enter  

    

    0), install the certificate

      Click Start, the bin directory will generate a certificate file: ApacheJMeterTemporaryRootCA.crt, double-click to install the certificate on your computer

    1), a port

      Fill port, close attention to other same proxy server port.

    2), the target controller

      That is to crawl http request storage location selected here in front of the thread group added

    3), grouping

      The default is not a packet, but the packet can request time to request physical partitions, more conducive to subsequent editing, so here select each group into a new controller (controller: It will be appreciated as folders, partitions effect)      

    

    4), filtered request

      Content-type filter and url filter, where I mainly need to configure url filtering, you need serious attention here after the domain name must be set when the url contains the domain name plus. *  No less than those who want to fetch requests, here stepped pit 2 times and record it.

    

    5) configured internet

      Setting the LAN address of http proxy 127.0.0.1 port to fill the port number in the previous jmeter

      

Fourth, the implementation record

  Click Start, pop pop certificate, the certificate is valid only seven days, after which need to be reinstalled. Confirm the validity of the certificate, click ok.

  

  Open the Google browser, go to the destination URL to see if Jmeter has crawled request

  

  I encountered two problems, check the configuration jmeter no problem, no problem LAN settings. But the browser page thread after visiting the group has not requested any, try the next controller into the goal in jmeter http proxy server, restart, access the web page will have the data again. Then back to the target controller thread group, the group is also on the thread. I do not understand.

  So far, jmeter recording web http interfaces success!

  Honor of my first blog, Sahua ~ ~ ~

  Learn, every day up ~ ~ ~

    

 

 

 

 

Guess you like

Origin www.cnblogs.com/inging44/p/11898032.html