Highlighted
Contributor.
Contributor.
1391 views

Parameter Group Name

Jump to solution

Hello All!

Could any one of you explanied me in detail about Group Name Parameter Type and how can I use them in a script?

I saw in some encode formats in parameter properties, like %s , %01s, %02s , %03s  etc.

I am not able to understand of that encode formats and their uses.

Please any one of you help me to understand this ?

Thanks in Advance

 

0 Likes
1 Solution

Accepted Solutions
Highlighted
Acclaimed Contributor.
Acclaimed Contributor.

Re: Parameter Group Name

Jump to solution

And sorry for hijacking the original thread, here is the rest of the answer.

%s - means the full Group name in the controller.

%03s - means the three first letters of the Group name and so on...

br /ola


Please mark post as solved if your problems or questions is/are resolved.
If this post was valuable to you, please consider kudo it.

.

View solution in original post

8 Replies
Highlighted
Acclaimed Contributor.
Acclaimed Contributor.

Re: Parameter Group Name

Jump to solution

Hi,

You can use it to embeded group related logic in the script, like embedd the group name in the transaction name, apply branching in the code based on group name, if you have several groups that run the same scripts, and anything else that comes in your mind.

here is an example for using the group name in the transaction name

Action()
{
	char sTransactionName[100];
	
	sprintf(sTransactionName,lr_eval_string("BuyProduct_{GroupName}"));
	lr_start_transaction(sTransactionName);
	
	// content
	
	lr_end_transaction(sTransactionName, LR_AUTO);
	
	return 0;
}

Regards,

Shlomi

 

Highlighted
Acclaimed Contributor.
Acclaimed Contributor.

Re: Parameter Group Name

Jump to solution

Thanks for informing about this, that I somehow have missed!

Until now, I have used "Additional Attributes" for generic scripts, for passing logic to the scripts. This means that I can do it by the groupname instead and don't have to go inside the Runtime settings each time. Also better possibility to check if running in vugen or the controller than with runtime settings.

Good Friday!

br /ola


Please mark post as solved if your problems or questions is/are resolved.
If this post was valuable to you, please consider kudo it.

 

.
0 Likes
Highlighted
Acclaimed Contributor.
Acclaimed Contributor.

Re: Parameter Group Name

Jump to solution

Hi Ola,

Additional attributes is just another way for using Command Line arguments for the script. I prefer using command line arguments over parameters since it is configurable from the Controller and not forcing me to edit the script. 

Additional attrbiutes was added in VuGen as a feature to enable "testing" scripts that use command line arguments. Once tested, I believe it is better to remove the additional attributes from Run Time Settings and feed the values from the group command line.

Since command line arguments are limited comparing to parameters, I would still use parameters or VTS for large data. GroupName parameter is good if you would like to distinct between transactions in online and not only in offline. IterationNumber parameter is good if you need specific logic to run in specific iteration and not in others and so on... 

Cheers,

Shlomi

 

 

Highlighted
Acclaimed Contributor.
Acclaimed Contributor.

Re: Parameter Group Name

Jump to solution

Exactly.

I use it for script with the exact same contents, only differing in some point, like the "component" to interact with or the number of iterations or sleeptime., to avoid beeing overloaded with scripts. I will look into commandline parameters also, but I think that the group name will be the fastest and also most visible way to do it.

br /ola


Please mark post as solved if your problems or questions is/are resolved.
If this post was valuable to you, please consider kudo it.

 

.
0 Likes
Highlighted
Acclaimed Contributor.
Acclaimed Contributor.

Re: Parameter Group Name

Jump to solution

And sorry for hijacking the original thread, here is the rest of the answer.

%s - means the full Group name in the controller.

%03s - means the three first letters of the Group name and so on...

br /ola


Please mark post as solved if your problems or questions is/are resolved.
If this post was valuable to you, please consider kudo it.

.

View solution in original post

Highlighted
Contributor.
Contributor.

Re: Parameter Group Name

Jump to solution

Thank You!!!!!! not only My queries has resolved but also lernt some more points.

0 Likes
Highlighted
Contributor.
Contributor.

Re: Parameter Group Name

Jump to solution

Thanks Shlomi , I got it!!

 

 
0 Likes
Highlighted
Acclaimed Contributor.
Acclaimed Contributor.

Re: Parameter Group Name

Jump to solution

🙂

My pleasure

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.