jmeter parameterization
If the input parameter changes frequently, it can be set as a variable to facilitate unified modification management; if the input parameter requires random or multiple choices, a variable can be formed through a function generator or reading a file. So there are three ways to parameterize: user-defined variables, function generators, and read files.
(1) User-defined variables
need to add configuration elements - user-defined variables.
(2) The function generator
needs to use the function helper function, which can call the function to generate some regular data. Several commonly used functions are _uuid, _random, and _time. _uuid will generate a random and unique id. For example, in order to avoid the situation where there is too much unprocessed data caused by the retransmission of java requests, the interface request can add a unique request id and a unique response id for one-to-one correspondence; the random number _random can be found in Take a random value in a range you specify; take the current time _time, some time class input parameters can be used, such as {__time(,)} is to generate a timestamp accurate to milliseconds, {__time(/1000,)} is Generates timestamps accurate to the second, ${__time(yyyy-MM-dd HH:mm:ss,)} is to generate the current time accurate to the second.
(3) To read from a file,
you need to add a configuration element in the thread group - CSV Data Set Config
where Recycle on EOF: After setting True, the cycle value is allowed
具体的例子如下所示: