top of page
TopOfPage

 

Document the Custom Parameter Rules

 

Parameter

Configuration

​

The Configuration can be empty, but is expected to contain up to two Configuration Items: 'Value' and/or 'Update value on'.

​

Configuration

Overview

​

LoadRunner supports a parameter type of CustomDoxRunner also supports it, and extends its functionality.

​

The illustration on the right shows a typical configuration in LoadRunner

​

The illustration below that shows how they are configured in a DoxRunner document.

​

The documentation is simple, but the Process Raw operation does two things:

  1. It allows the scripter to use the documented value, or assign one in the green Parameter Association screen, whether a value was documented or not;

  2. If the Process Raw detects the value within Action.c or vuser_end.c, it will assign the parameter at the top of Action.c. Otherwise it will assign it at the top of vuser_init.c.

​

Parameter

​

The Parameter name is mandatory. It must be unique and only appears in the column with heading Parameter in the table of any Custom Parameters section.

​

It must also conform to LoadRunner rules.

​

Value:

​

The Value can be any text and can be preceded by the Configuration Item ID 'Value:'.

​

The Process Raw operation presents the Custom Parameters to the user in the green Parameter Association screen, where it can be decided whether to use the documented value, or assign it a different value.

​

Update value on:

​

This must be one of the following and can be preceded by the Configuration Item ID 'Update value on:'.

If this Configuration Item is missing, Auto is the default.

​

  • Once         - the value is assigned at the top of vuser_init.c;

  • Iteration   - the value is assigned at the top of Action.c;

  • Auto          - the value is assigned depending on where the first instance of the Parameter Name is used. If the first instance is in vuser_init.c or vuser_end.c, or if it isn't assigned at all, then it is assigned at the top of vuser_init.c. Otherwise it is assigned at the top of Action.c.

​

UpdateValueOn
Value
ScriptConfig.gif
SectionManagement
Example.gif
Overview

 

Section Management - Custom Parameters

 

Common Characteristics

​

A Custom Parameter section is optional, is semi-structured, and may appear in three places:​​

​

Each instance of the Custom Parameter section consists of:

  • a Section Title;

  • a Bookmark;

  • free-form Body Text;

  • Table with a minimum of two columns (Parameter and Configuration).

​

The Bookmark:​

  • Mandatory;

  • Location: Immediately before the Section Title;

  • Structure: Depends on which document it is embedded in:

​

The Section Title:

  • Mandatory;

  • Location: immediately after the Bookmark;

  • Structure: Free-format text;

  • Style: I_Heading n or I_Appendix n, where n can be an integer from 1 to 5;

  • Length: Cannot be longer than 200 characters.

​

The Body Text

  • Optional;

  • Location: between the Section Title and the Table;

  • Structure: free-format text;

  • Style: I_BodyText;

  • Length: Cannot be longer than 1,000 characters.

​​

The Table:

  • Mandatory;

  • Location: immediately below the Body Text (or Section Title if there is no Body Text):

  • A minimum of two rows:

    • A Heading row and a Data row (one data row per rule);

    • If there are no rules, the last Data row can contain empty cells (or the section can be deleted);

  • A minimum of two columns:

    • A Parameter column and a Configuration column;

    • More columns can be added;

    • A Description column is recommended and, if present, is appended to the line wherever the parameter is assigned by the Process Raw operation.

  • All cells in the Parameter and Configuration columns must conform to specific rules, as described in the Overview above.​

​

Advice
Common Characterstics
TestCaseSection

​

Advice

​

Assess whether the section is necessary. This decision will need to take into consideration two factors:​

  1. Whether the Test Case needs Custom Parameter rules;

  2. Which scenario you have chosen when assessing the relationship between Test Case sections and Solution document sections.

​

Assess the Section Title and update it if necessary.

​

Make sure the table has the two mandatory columns (Parameter and Configuration), each with the specified heading text.

​

Assess the table to see whether more columns are appropriate, especially a Description column.

​

Assess the Body Text between the Section Title and the Table and update it if necessary.

​

Make sure its bookmark is visible and located immediately before the first character of the Section Title (see each of the examples further down this page).

​

Do not change the bookmark.

​

The section looks better when on a page with portrait orientation. 

​

 

Test Case Section

​

In a test case, the Custom Parameters section is optional and can be located anywhere between the Description sections and the Transaction Timer section.

​

It is semi-structured as described above.

​

If you know that a test case won't require Custom Parameters, you may decide to delete the section. This can be done in two ways:

  1. Using the DoxRunner Manage Sections operation;

  2. Manually.

​

If you deleted the section from the test case and decide to re-add it, then it can be done in two ways also:

  1. Using the DoxRunner Manage Sections operation;

  2. Manually.

​

If the Solution document also contains a Custom Parameters section with a Parameter name that is the same as one in a test case, then the one in the test case takes precedence.

​

The illustration below shows a typical Custom Parameters  section as it appears in a test case. Note the following points:

  • The Bookmark must be structured as shown in the previous section:
    • That is, "P_", followed by the Test Case ID, followed by "_Custom";

    • For example, if the is TSC705, then the bookmark should be P_TSC705_Custom;
  • The      symbol is an optional link to the top of the test case for easier navigation.

​​​

TemplateSection

Example

​

TestCaseSection.gif

 

Test Case Template Section

​

The Custom Parameters section is optional and can be located anywhere in the Test Case Template between the Description sections and the Transaction Timer section.

​

It is semi-structured. The structure is described above.

​

It must be referenced by a Bookmark that must be located immediately before the Section Title.

 

The Bookmark is structured as follows:  P_Custom

​

The Body Text is expected to contain generic text that will be copied to any new test case then updated by the scripter.

​

The Table must have a minimum of two rows - a Heading row and a Data row - and two columns as shown below.

 

It is recommended that you leave the table empty and populate it only after it's incorporated into a test case. If the Data row contains a rule, then that rule is copied to any new test case.

​

Example

​

SolutionSection
TemplateSection.gif

 

Solution Document Section

​

The Custom Parameters section is optional and can be located anywhere in the Solution document.

​

Custom Parameter rules are normally defined in the Custom Parameters section of a Test Case, however if you find yourself defining the same parameter over and over, it may be useful to document them in the Solution document instead, outside of any Test Case.  This is optional.

 

A Custom Parameter section is included in the original downloaded version of the Solution document and is available unless it was manually deleted after the document was downloaded.

​

There is only one way to add rules to the Custom Parameters section of a Solution document and that is to manually insert them into the table.

​

If it exists, the section it is semi-structured. The structure is described above and is identical to the Test Case.

​

It must be referenced by a Bookmark that must be located immediately before the Section Title

 

The Bookmark is structured as follows: V_Custom

​

Why would you use the Solution document to document Custom Parameter rules? You don't need to, but if there are rules that are common across multiple test cases, then they may be easier to manage if placed in the Solution document instead. In fact, to take an extreme view, you can document -all- Custom Parameter rules in the Solution document and define -none- in the Test Cases, if that is easier to manage. The choice is yours.

​

If a rule in a Data row of the Table contains a Parameter name that is the same as one in a Test Case then the one in the Test Case takes precedence.

​

Example

​

AddRule
SolutionSection.gif
AddManually

 

Add a Custom Parameter rule

​

In all cases, each Custom Parameter rule is documented as a row in the table that is embedded in a Custom Parameter section. The section must exist in the appropriate place beforehand.

​

They can be added to a Test Case in three ways:

  1. Manually add a row in the table that should exist in the appropriate Custom Parameter section;

  2. Via the green Parameter Association screen during a Process Raw operation;

  3. Via the Reverse Engineer operation from a legacy script.

​

They can only be added to the Solution document or the Test Case Template manually

 

An empty table is present in the Test Case Template when downloaded from this site. Rules are not normally added to this table, but can be in the rare case where a rule is known to be needed in all (or most) new test cases.

​

​

Add a Custom Parameter rule manually

 

This can be done in a test case, the Solution document, and the Test Case Template. Make sure the Custom Parameter section exists. It should exist unless you have deleted it.

​

Adding a rule manually is simply a matter of adding a row to the table and typing in the details, making sure there is one row per parameter as illustrated below. Only the Parameter and Configuration columns are used by the Process Raw operation.

 

Extra columns can be added, but are ignored by the Process Raw operation. A Description column is optional but recommended.

 

Refer to the Overview above for details of each column.

​

AddViaGreenScreen
AddManually.gif

 

Add using the green Parameter Association Screen

​

If, during the Process Raw operation, it is noticed that a Custom Parameter rule can be applied to an Unassociated Name / Value Pair (that is, one that appears in the top left hand pane of the green Parameter Association screen), then it can be included in the association by typing in the details at the bottom of the Custom tab, then associating it.

​

Once the Process Raw operation has completed it is added to the test case. Note that the Description isn't included - it must be added to the rule in the test case manually.

​

AddUsingParameterAssociation.gif
AddViaReverseEngineer

 

Add using the Reverse Engineer Operation

​

This option is only available if there is a legacy script that contains the appropriate Custom Parameters.

 

Custom Parameter rules are included in this process and added to the test case, however it's possible that not all rules are captured and documented.

 

Make sure you check the test case once the Reverse Engineer operation has completed. 

​

DeleteRule

 

Delete a Rule

​

Except for the last rule, deleting one can be done manually in all documents by simply deleting the respective row in the table.

​

Deleting the last rule can be done in two ways:

​

A rule can also be deleted from a test case via the green Parameter Association screen during a Process Raw operation, as described below.

​

DeleteViaGreenScreen
Deleting a section

 

Delete using the Green Parameter Association Screen

​

If, during the Process Raw operation, a Custom Parameter rule is noticed that is no longer required, it can be deleted from the test case using the Delete from document button that appears on the green Parameter Association screen.

​

bottom of page