Home >Backend Development >PHP Tutorial >JMeter learning (2) recording script, jmeter learning recording script_PHP tutorial

JMeter learning (2) recording script, jmeter learning recording script_PHP tutorial

WBOY
WBOYOriginal
2016-07-12 08:58:55950browse

JMeter learning (2) recording script, jmeter learning recording script

Environment

Badboy version 2.1.1

JDK: 1.7.0_67

Apache JMeter-2.11

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

There are many ways to record scripts in JMeter. The most common method is to use the third-party tool badboy to record. There are also JMeter's own settings (Http proxy server IE browser settings) to record scripts, but this method There are many and messy recorded scripts, which I personally don’t like. Generally, Badboy is used for recording. Here’s an introduction to 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.

Introduction to badboy:

  • Badboy is a free WEB automated testing tool.
  • Official download address: http://www.badboy.com.au
  • The installation of badboy is the same as that of a general application. Badboy is a goodweb automation testing tool. Use it to record scripts, and the recorded scripts can be directly saved as JMeter files 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 column

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

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

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

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

Be sure to add HTTP Cookie Manager to the recorded script, 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.

www.bkjia.comtruehttp: //www.bkjia.com/PHPjc/1100396.htmlTechArticleJMeter learning (2) recording script, jmeter learning recording script environment Badboyversion 2.1.1 JDK: 1.7.0_67 ApacheJMeter- 2.11 -------------------------------------------------- ----------...
Statement:
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