jmeter--Recording scripts with Badboy

Source: Internet
Author: User
Tags http cookie

JMeter recording scripts There are several ways, the most common method is to use third-party tools Badboy recording, and JMeter own settings (HTTP proxy server +ie browser settings) to record scripts, but this method of recording the script is more and more chaotic, the individual does not like, Generally common badboy for recording, below to describe the next badbody recording.

Note: When using JMeter agent or Badboy for recording, especially when the jmeter agent, the operation can not be too fast, otherwise it is easy to cause recording failure.

Badboy Introduction:

Badboy is a free web automation testing tool. Official: http://www.badboy.com.au Badboy installation As with the general application, the Badboy is a good web automation test tool that uses it to record scripts, and the recorded scripts can be saved directly to the JMeter file. I undoubtedly brought us a lot of convenience.

1. Open the Badboy tool, enter the address of the project to be tested in the Address field and start recording, then manually execute the item under test. When the recording is complete, click the Black button next to the toolbar to end the recording.

Note: The Badboy is recorded by default after startup, the red button,

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

3. Open the JMeter tool and select File--open to select the file (. JMX type) You just saved and import the file in.

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

    • If there are two cookies in a domain (scope) Manager,jmeter said, I can not tell, you do it yourself, so don't worry about it, a cookie manager in a domain enough
    • The mechanism of user-defined cookies is not the same as that of JMeter, the user-defined cookie is shared by all threads, and JMeter comes with a separate cookie for each thread, without interfering

For example, from the JMeter help documentation, unless you know what you're going to do, don't use a custom cookie

User-defined section I didn't, because I didn't use it either.

Clear cookies each iteration will erase cookies every time the thread finishes executing

Cookie policy, strategies for managing cookies, general selection compatibility

Implementation, default Hc3cookiehandler, if the test address is IPV6, select Hc4cookiehandler

As an example,

Do not add Cookie Manager

Note that the header file contains Set-cookie and has a value

When the next request is made, [no cookie] is lost, resulting in execution failure

If you add a cookie manager, you don't have to worry about it.

jmeter--Recording scripts with Badboy

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.