(1) jmeter recording a script (using a proxy way)

(1) jmeter recording a script (using a proxy way)

At 17:27:24 on July 9th, 2018

Many APP use badboy is not recorded, this case requires the use of chrome or Firefox, if networked chrome plugin BlazeMeter record export would be more convenient, but not in the case of networking, BlazeMeter script can not be exported. Here you can also choose to use the proxy record.

 

 

The use of chrome and Firefox recording mode is the same agent, but the agent interface configuration is different, the following presentations using Firefox, while giving chrome proxy configuration.

1. jmeter Configuration

  1. Adding a thread group (used here to save the recorded script): Test Plan -> right mouse button -> Threads -> Thread Group (tearUp, the difference tearDown thread group of self-inspection), here the name of the thread group changed starsTest, thread first use the default configuration

 

Adding a thread group
Adding a thread group

 

  1. Adding HTTP request: Thread Group (starsTest) -> right click -> Add -> sampler -> HTTP Request

 

Adding HTTP request
Adding HTTP request

 

  1. Configuring HTTP request
  • Configure the server name or IP: IP machines to be recorded
  • Port Number: The port number used by the recording interface
  • implementation of the agreement: the name of the version of the protocol agreement

 

Configuring HTTP request
Configuring HTTP request

 

  1. Original non-test> - - click on the table -> right mouse button> HTTP proxy server: Adding an HTTP proxy server

 

Adding HTTP proxy server
Adding HTTP proxy server

 

  1. HTTP Proxy Server Configuration
  • Proxy Port: The local port configuration to listen, here use 8088
  • Target controller: save thread group added earlier, to the code to this thread groups
  • Include Pattern and exclude patterns can be recorded during .css, .png files to exclude and so do contain custom, excluding the impact part of the code reader, and if stress tests, in order to fit the actual situation, generally do not exclude these files.
  • Start button: In all configuration is completed, the start time for recording the time needed to. Then start recording starts after configure the proxy, if only to configure the agent does not start here HTTP proxy browser is not Internet

 

HTTP Proxy Server Configuration
HTTP Proxy Server Configuration

 

 

Exclude files
Exclude files

 

2. Proxy Configuration

  1. Firefox proxy configuration: Options -> Network Agent -> Settings -> select manual proxy settings, IP address, fill in localhost or 127.0.0.1, port for the HTTP proxy server is configured in front of 8088.

 

Firefox browser proxy configuration
Firefox browser proxy configuration

 

  1. chrome proxy configuration: Settings -> Show Advanced Settings -> Change proxy server settings -> Internet Properties -> Connections -> LAN Settings -> Proxy -> Use a proxy server for the LAN, IP address fill in localhost or 127.0.0.1, port for the HTTP proxy server is configured in front of 8088.

 

chrome browser proxy configuration
chrome browser proxy configuration

 

3. Start recording

  1. Start agency services

 

Boot Agent
Boot Agent

 

  1. Firefox Web pages and open-record for operation

 

Record the code
Record the code

 

  1. Add the listener result tree: Run it again, you can see a successful visit

 

Playback results
Playback results

 

Note: After the recording is completed need to refer to the proxy configuration in your browser is set to not use a proxy, or in the case is not open proxy configuration of the browser is not Internet.

 

Do not use proxy
Do not use proxy

 

Guess you like

Origin www.cnblogs.com/h-zhang/p/11228112.html