Highlighted
Absent Member.. Absent Member..
Absent Member..
9064 views

Changing parameter delimiters

Ok...

 

This is either a 11.52 bug or user error.  The odds are always in favor of user error so I really hope I'm not making an embarrasingly simple mistake here.  Please check this out.  

 

I run a simple script.  It executes as expected.

 

Script:

Action()
{
    lr_save_string("testing", "iamaparam");
    lr_output_message("This is iamaparam: %s", lr_eval_string("{iamaparam}") );
    
    return 0;
}

 

Starting iteration 1.

Maximum number of concurrent connections per server: 2         [MsgId: MMSG-26000]

Starting action Action.

Action.c(3): Notify: Saving Parameter "iamaparam = testing".

Action.c(5): Notify: Parameter Substitution: parameter "iamaparam" =  "testing"

Action.c(5): This is iamaparam: testing

Ending action Action.

Ending iteration 1.

 

Parameter is substituted.  Good.  Ok, now... 

 

I need to change my parameter delimiters so I go to Tools -> Options -> Scripting -> Parameters.  I change left delimiter to [ and right delimiter to ]

 

Now my script looks exactly the same, but with [] delimiters.  

 

Script2:

Action()
{
    lr_save_string("testing", "iamaparam");
    lr_output_message("This is iamaparam: %s", lr_eval_string("[iamaparam]") );
    
    return 0;
}

 

Starting iteration 1.

Maximum number of concurrent connections per server: 2         [MsgId: MMSG-26000]

Starting action Action.

Action.c(3): Notify: Saving Parameter "iamaparam = testing".

Action.c(4): This is iamaparam: [iamaparam]

Ending action Action.

Ending iteration 1.

 

---

 

What am I doing wrong here?  Can you reproduce this behavior?  

0 Likes
5 Replies
Highlighted
Absent Member.
Absent Member.

It is by design, if you look at the Note in change parameter delimiter window, you will see "If you modify the default delimiter, the specified delimiter will be applied to new scripts only."

0 Likes
Highlighted
Honored Contributor.
Honored Contributor.

Hi Dan_J_Corey,

 

I think there is a slight misunderstanding here.

When you're changing the parameters delimiters via Tools -> Options -> Scripting -> Parameters, the new delimiters are set only for newly created scripts, not for those that you already have open.

Even the dialog UI tries to emphasize it:

 

So, if you have an existing script and would like to change its existing parameters delimiter - no problem, you have two ways to do it:

1. Select your script in Solution Explorer -> right-click Parameters node -> Configure Parameter Delimiters...

2. Select your script in Solution Explorer (to make it active) -> Design menu -> Parameters -> Configure Parameter Delimiters...

Any change you make with one of the above options will be applied to this script only.

 

BTW, in old VuGen (versions 11.04 and earlier) all the changes were always made via the Options generalmenu and the changes in delimiters were applied to both the "default for new scripts" and to existing open scripts. From usability perspective, this was very confusing.

 

Hope this helps. Let us know if you have more questions.

Igor Markov
R&D Manager, Performance Engineering Core
0 Likes
Highlighted
Absent Member.
Absent Member.

Hi Dan,

 

Changing delimiter only applies to new script.

You need to generate a new one to make it work.

 

Regards,

Hankman

0 Likes
Highlighted
Trusted Contributor.
Trusted Contributor.

Hi Igor,

If parameter delimiter is modified ex. from {} to <>, is the parameter which is used to save correlation value also need to be changed from {} to <>?

0 Likes
Highlighted
Trusted Contributor.
Trusted Contributor.

Hi Igor,

If parameter delimiter is changed from {} to <> for example, is the parameter which is used to save correlation value also need to be changed from {} to <> if i want to use it?

0 Likes
The opinions expressed above are the personal opinions of the authors, not of Micro Focus. By using this site, you accept the Terms of Use and Rules of Participation. Certain versions of content ("Material") accessible here may contain branding from Hewlett-Packard Company (now HP Inc.) and Hewlett Packard Enterprise Company. As of September 1, 2017, the Material is now offered by Micro Focus, a separately owned and operated company. Any reference to the HP and Hewlett Packard Enterprise/HPE marks is historical in nature, and the HP and Hewlett Packard Enterprise/HPE marks are the property of their respective owners.