JMeter learning (2) recording script

WBOY
Release: 2016-07-29 09:03:24
Original
1353 people have browsed it

Environment

Badboy version 2.1.1

JDK: 1.7.0_67

Apache JMeter-2.11

-------------------------------- -------------------------------------------------- ----------------------------------

There are many ways to record scripts in JMeter, among which The most common method is to use the third-party tool badboy to record, and there is also JMeter's own settings (Http proxy server + IE browser settings) to record scripts. However, the scripts recorded by this method are more numerous and messy, and I personally don't like it. , Badboy is generally used for recording. Let’s introduce Badbody recording.

Note: When using JMeter proxy or BadBoy for recording, especially when using JMeter proxy, the operation should not be too fast, otherwise the recording may fail.

badboy introduction:

  • Badboy is a free WEB automation testing tool.
  • Official download address: http://www.badboy.com.au
  • The installation of badboy is the same as any other application. Badboy is a good web automation testing tool. Use it to record scripts. And the recorded script can be directly saved as a JMeter file for use. It has undoubtedly brought us great convenience.

1. Open the badboy tool and enter the address of the tested project in the address bar

Note: badboy is in the recording state in normal state and is red button, as shown in the picture

JMeter learning (2) recording script

After the recording is completed, click the black button next to the toolbar to end the recording.

2. Select "File"--Export to Jmeter...

JMeter learning (2) recording script

3.OpenJMeter tool , select "File" --> "Open" to select the file you just saved (.jmx type) and import the file.

JMeter learning (2) recording script

The recorded script must add HTTP Cookie Manager, otherwise the script will fail to run, remember.

Now for JMeter, a test plan can only have one Cookie Manager . Because when multiple Managers exist, JMeter currently has no way to specify which Manager to use. At the same time, cookies stored in a Cookie Manager cannot be referenced by other Cookie Managers, so it is not recommended to use multiple Cookies in the same test plan. Manager.

Adding cookies will ensure that each user uses a different cookie, but sharing an Http element, almost all web tests require cookie support.

The above introduces the JMeter learning (2) recording script, including the relevant content. I hope it will be helpful to friends who are interested in PHP tutorials.

Related labels:
source:php.cn
Statement of this Website
The content of this article is voluntarily contributed by netizens, and the copyright belongs to the original author. This site does not assume corresponding legal responsibility. If you find any content suspected of plagiarism or infringement, please contact admin@php.cn
Popular Tutorials
More>
Latest Downloads
More>
Web Effects
Website Source Code
Website Materials
Front End Template