jmeter association rendezvous + + + parametric Custom Variables

Rendezvous

Before connecting the rendezvous, we first look at the concept of concurrency.

  • Concurrent requests end: while the number of requests sent out
  • Concurrent server: the server at the same time the number of requests received
  • ≠ concurrent server requester concurrent

After understanding concurrency, we look at the collection point, the set point is to control the concurrency, set up a collection point at some point in time, to allow simultaneous users concurrent access

Rendezvous is a timer

 

Synchronization Timer

Before doing rendezvous, we do a synchronized timer, Add -> Timer -> Sync Timer. Why do we want to add a timer, because we do not add a timer, so not all users access at the same time, then we do a timer that allows users to race like that with gunfire unified access. Here the number of simulated users group can not exceed the number of threads demo03

First, let us look inside the grouping options mean

  • The number of simulated users group: I chose 10
  • Timeout: This is in milliseconds, 3000 milliseconds is 3 seconds
  • It is meant herein that the number 01 or 01 to collect 3 seconds interface user access. If more than 3 seconds to stop if it reaches the set 10 also stops.

 Then we look at the results, here outset 10 users to access the 01, and the remaining 02 batches visit, look out, here set up a rendezvous timer access useful order. Colleagues are logged in to start

 Then we look at the results of the timer is disabled, obviously did not start at the same time, there is a big difference

 

Related

When the result we want to use on a request as the next request input, then we have to use the association, the association generally have the following operations

  • The return value is extracted
  • The return value reference
  • The cookie to the server

 The first step, we first login, the interface written collections, add post-processor, the first processor information, the result tree. (This step is not added it as a cookie)

 The second step, then we will pass to the collection with a token value Once logged in, the user indicates that a collection of a commodity, where we have to add a regular expression extractor. Addition -> postprocessor -> regular expression inside the extractor. The meaning here is the token value stored in token1 inside after login. Others are fixed wording

 The third step is the application token value, as collectors to identify the user's input. Then here you can see the results token and token collection of login request is consistent with the

 

 The fourth step, the associated cookie, we look at the results of the last step of the collection: Permissions error, please login. Here we token is associated correctly, or why not request it normal, because in fact, at the time the request has been said very clearly, no cookie values, then we just add cookie is, and very simple, is to add a cookie manager ( Add the bin, what they do not control). In the Add -> Configure Original -> cookie manager. Then you can normally shows

 

 

 

to parameterize

Parametric parameters we usually use is to be represented by a variable, so get data directly from the outside run. This is also commonly used means of work, such as we have to deal with multi-user login, or concurrent shopping, then we have to set the account password to log in to obtain a sufficient number of the account password to log in from external documents. Such scenarios can be simulated users

  • Prepare a data file, and reference data file
  • Ready reference variable name

A step, csv reference data file, add -> configuration elements -> scv the data file set. Then I add the selected three red box. Relative path name of the file I used. Separated variable format name is the text inside the middle of a comma. Then prepared in reference variable, then run, we found that concurrent data have become a different user name.

 

 

 

 

Custom Variables

Add custom variables, then, it is in the thread group, or a test plan can be a common variable, is to repeat things to a particular variable, which can more efficiently manage use cases, somewhat similar to the C language macro definition. To facilitate the preparation of our scripts

The first step, add custom variables, adding -> Original Configuration -> User-defined variables. Then you think things are repeated, variables are used to represent

 A second step of repeating the replacement data into variables in a thread group, when the only thread groups active in the outer thread group that are valid for all thread groups

 

 

Guess you like

Origin www.cnblogs.com/cheneyboon/p/11879638.html