LoadRunner参数化功能详解

 

更新方式

.      Each Occurrence

每次遇到参数就进行更新。

多次使用同一参数,而且没有什么关联,例如随机数。

Each Iteration

每次迭代时发生更新。 如果参数出现几次,虚拟用户用同一个数值。

适用同一个关联的参数。

Once

所有的地方都用同一个数值,包括所以的迭代。

文件类型参数分派方法

Sequential

按照顺序访问。

 

 

更新方式

Sequential

例子

1.  

Each Iteration

所有用户每次迭代同时取下一个数值。

All the Vusers use Kim in the first iteration, David in the second iteration, Michael inthe third iteration, etc.

2.  

Each Occurrence

所有用户每次遇到同时取下一个数值,即使在同一个迭代。

All the Vusers use Kim in the first occurrence, David in the second occurrence,Michael in the third occurrence, etc.

3.  

Once

所有用户第一次迭代时同时取第一个值,该用户所有的子迭代值不变。

If you specified Once, all Vusers take Kim for all iterations.

 

 

例子:

First Name

Kim

David

Michael

Jane

Ron

Alice

Ken

Julie

 

没有足够的值,从第一行开始重新取值。

 

 

 

 

 

Random:每个虚拟用户开始运行时安排随机的数值。

 

 

更新方式

Random

1.   

Each Iteration

每次迭代时,随机从数据表中取数。

2.   

Each Occurrence

每次遇到随机取一个数值,即使在同一个迭代。

3.   

Once

第一次迭代时随机取值,改用户所有的子迭代值不变。

Unique

The Unique method assigns a unique sequential value to the parameter for

each Vuser.

 

更新方式

Unique

例子

1.         

Each Iteration

每个用户每次迭代时,虚拟用户取下一个不同的数值。

If you specified Each Iteration, for a test run of 3 iterations, the first Vuser takes Kim in the first iteration,David in the second, and Michael in the third. The second Vuser takes Jane, Ron, and Alice. The third Vuser,Ken, Julie, and Fred.

 

2.         

Each Occurrence

每个虚拟用户每次遇到取一个新的不同的数值,即使在同一个迭代。

lr自己决定。

3.         

Once

每个第一次迭代时取不同值,该用户所有的子迭代值不变。

If you specified Once, the first Vuser takes Kim for all iterations

the second Vuser takes David for all iterations, etc.

数据必须足够,例如20个虚拟用户,5次迭代,至少要有100个数据。

 

First Name

Kim

David

Michael

Jane

Ron

Alice

Ken

Julie

Fred

原文地址:https://www.cnblogs.com/godwar/p/1181380.html