Jemeter--badboy imported JMX file self-component parsing

Source: Internet
Author: User
Tags http cookie

Thread Group setup and parsing

Meaning: 1 seconds to start 100 threads, each thread loops through 20 requests (including FTP requests, Java requests, HTTP requests, depending on the request you submit)

After you import badboy exported files, the thread group contains the following:

One

1. Cookie definition:

Cookie:cookie is a piece of information that the server holds on your computer so that the server can use it to identify your computer. When you are browsing the website, the Web server will send a small piece of information on your computer, and the Cookie will help you record the text or choices you make on the site. The next time you visit the same website, the Web server will first see if it has the last cookie information, and if so, it will be based on the contents of the cookie to determine the user, send a specific page content to you

2. HTTP Cookie Manager:

If there is more than one cookie Manager within a test plan, JMeter currently cannot specify which is used. Therefore, it is best to have only one cookie manager in a test plan. Also, a cookie in a manager cannot be referenced by another manager. So be cautious when using multiple cookies Managers.

Two

1 ddfined Variables (user-defined variable)

How to add:

Thread Group--add--user-defined variables

How to use: Use ${host} instead of the corresponding location where the parameter needs to be used.

Application scenario: When the test environment changes, we only need to modify one IP to allow the script to be applied to another environment test immediately, without the need for a script to modify.

2 , User Parameters (user parameters)

How to add:

Thread Group----add front processor--User parameters

Updates per iteration (update Once per iteration): Controls the change rule for parameter values, and if this option is selected, the value of the parameter remains constant in each iteration and a usable value is removed at the beginning of the new iteration; If this option is deselected, the value of the parameter is removed when a request is made to the sampler within each of its scopes.

How to use: Use ${userid} instead of the corresponding location where the parameter needs to be used.

3, using Jemeter HTTP request, login operation as an example, user name and password parameterization, the user name and password to iterate through the text, you can add the CSV Data Set config this component to control.

Parametric use of components and summary:

A,the value of all parameters defined in User Defined variables cannot be changed during the execution of test plan, because some parameters that do not need to be changed with the iteration in test plan (parameters that take only one value) are typically set here. For example, the host and port values of the application being tested.

b, if the parameters range is very small, using the user Parameters is more appropriate.

c, if the parameters range is large, it is recommended to use the CSV Data Set Config method, the method has greater flexibility.

Three

1. HTTP Header Manager (HTTP header manager)

This property manager is used to customize the request header content of HTTP requests issued by sampler, different browsers make HTTP requests with different agents, and access certain pages with anti-theft chain needs the correct refer ... In these cases, the HTTP Header manager is required to ensure that the HTTP request sent is correct.

Jemeter--badboy imported JMX file self-component parsing

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.