Jmeter Web Performance Test Introduction (V): Jmeter parametric Request

Source: Internet
Author: User
Tags vars

Common methods used for parameterization:
    • Adding configuration symbols: User-defined variables
    • Using the function Helper
    • Adding configuration components: CSV Data Set Config
    • Add Front Processor: BeanShell preprocessor
Adding configuration symbols: User-defined variables


Use in Request:
Replace the original parameter value with ${userid} where it needs to be parameterized

Using the function Helper


Example:
Generates a 5-bit character string that is randomly taken from 1234567890QAZWSXEDCRFVTG, and the resulting random string is assigned to the variable ID.
The first occurrence of the parameterized position replaces the original parameter value with ${__randomstring (5,1234567890qazwsxedcrftg,id)}, and the original parameter value is replaced elsewhere with ${id}.

Import from the CSV file:

Adding configuration components: CSV Data Set Config

Add Front Processor: BeanShell preprocessor

Read and change the value of the variable
Vars.get (String key): Gets the value of the variable from the JMeter
Vars.put (String key,string value): Data is stored in the JMeter variable

Jmeter Web Performance Test Introduction (V): Jmeter parametric Request

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.