Working with VuGen Parameters

Parameterization involves the following two tasks:
Replacing the constant values in the Vuser script with parameters
Setting the properties and data source for the parameters.
  1. You can use parameterization only for the arguments within a function. You cannot parameterize text strings that are not function arguments.
  2. You can use the lr_eval_string function to “parameterize” a functionargument that you cannot parameterize by using standard parameterization.In addition, you can use the lr_eval_string function to “parameterize” any string in a Vuser script.For VB, COM, and Microsoft .NET protocols, you must use the lr.eval string function to define a parameter. For example, lr.eval_string( "{Custom_param}").
  3. There is no limit to the number of parameters you can create in a Vuser script.
  4. When creating XML parameters in script view, you must select only the inner xml, without the bounding tags. For example, to parameterize the complex data structure <A><B>Belement</B><C>Celement</C></A>, select the whole string, <B>Belement</B><C>Celement</C>, and replace it with a parameter.
  5. When parameterizing CORBA or General-Java Vuser scripts, you must parameterize complete strings, not parts of a string.
  6. Do not name a parameter unique, since this name is used by VuGen.
  7. The default parameter braces are either curly or angle brackets, depending on the protocol type. You can change the parameter braces from the Parameterization tab in the General Options dialog box (select Tools > General Options).
  8. When working with languages other than English, save the parameterfile as a UTF-8 file. In the Parameter Properties window, click Edit with Notepad. In Notepad, save the file as a text file with UTF-8 type encoding.
  9. You can use an XML type parameter to replace the entire structure with a single parameter. For example, an XML parameter called Address can replace a contact name, an address, city, and postal code.
  10. It is recommended to use XML parameters with Web Service scripts or for SOA services.
  11. Internal data is generated automatically while a Vuser runs, such as Date/Time, Group Name, Iteration Number, Load Generator Name, Random Number, Unique Number, and Vuser ID.
  12. A user-defined function replaces the parameter with a value returned from a function located in an external DLL.
  13. Before you assign a user-defined function as a parameter, you create the external library (DLL) with the function. The function should have the following format:. __declspec(dllexport) char *<functionName>(char *, char *). The arguments sent to this function are both NULL.
  14. The default parameter braces are angle or curly brackets, depending on the protocol type.You can also set the properties for a parameter from the Parameter List dialog box. In the left pane, select the parameter and then specify its properties in the right pane.
  15. Specify a row delimiter for your data presentation in the Rows delimiter for log display box. This delimiter is used to differentiate between rows in the output logs. If you enable parameter substitution logging, VuGen sends the substituted values to the Replay log. The row delimiter character in the Replay log indicates a new row.
  16. If a script uses Unique file parameterization, running more than one Vuser group with that script in the same scenario may cause unexpected scenario results.
  17. When you create a Unique Number type parameter, you specify a start number and a block size. The block size indicates the size of the block of numbers assigned to each Vuser. Each Vuser begins at the bottom of its range and increments the parameter value for each iteration. For example, if you set the Start number at 1 with a block of 500, the first Vuser uses the value 1 and the next Vuser uses the value 501, in their first iterations.
  18. The number of digits in the unique number string together with the block size determine the number of iterations and Vusers. For example, if you are limited to five digits using a block size of 500, only 100,000 numbers (0-99,999) are available. It is therefore possible to run only 200 Vusers, with each Vuser running 500 iterations.
  19. VuGen creates only one instance of Unique Number type parameters. If you define multiple parameters and assign them the Unique Number Parameter type, the values will not overlap. For example, if you define two parameters with blocks of 100 for 5 iterations, the Vusers in the first group will use 1, 101, 201, 301, and 401. The Vusers in the next group, using the second parameter will use 501, 601, 701, 801, and 901.
  20. When scheduling a scenario in the Controller, the When out of valuesoption only applies to the Run for HH:MM:SS option in the Schedule Builder’s Duration tab. It is ignored for the Run until completion option.
  21. The parameter format should match the recorded values. If the format of the parameter differs from the format of the original recorded value, the script may not run correctly.
  22. You can add and delete formats for the following parameter types: Date/Time; Group Name; Iteration Number; Load Generator Name; Vuser ID.
  23. Update Method: The Each occurrence method instructs the Vuser to use a new value for each occurrence of the parameter. This is useful when the statements using a parameter are unrelated. For example, for random data, it may be useful to use a new value for each occurrence of the parameter.
  24. Update Method: The Each iteration method instructs the Vuser to use a new value for each script iteration. If a parameter appears in a script several times, the Vuser uses the same value for all occurrences of the parameter, for the entire iteration. This is useful when the statements using a parameter are related.
  25. If you create an action block with parameters using its own iteration count—if you instruct VuGen to update their values each iteration, it refers to the global iteration and not the block iteration.
  26. Update Method: The Once method instructs the Vuser to update the parameter value only once during the scenario run. The Vuser uses the same parameter value for all occurrences and all iterations of the parameter. This type may be useful when working with dates and times.

Comments

Post a Comment

Popular posts from this blog

How to use a value between two different threads in Jmeter

Steps to Analyze AWR Report in Oracle

Correlation and checking in Results