Absent Member.. BCollins Absent Member..
Absent Member..
685 views

Is it possible to create recording rules that parse a variable but don't use it?

I am looking at trying to create a number of recording rules for an asynchronous application we are testing - currently, we have to record the script and, through numerous try-scripts, find certain parameters (listed as formID's) and parse them as variables, then use these variables later in the script (passed as parentID's) to allow the script to continue. 

 

However, the packets in question use a very odd layout, and so far I have not been able to successfully get the recording rule to replace the variable in the correct location (it keeps placing it all over the script in, literally, hundreds of locations).

 

A workaround would be to have the recording rule simply find and parse the variable, but not use it anywhere. However, even when I uncheck all the "replace in" fields when creating a rule in the TrueLog Explorer, and regenerate the script with the rule, it is replacing it all over the place. If I go into the XML and look at the "ReplaceIn" field, it is blank... so why is Silk still replacing it in places?

 

I've tried adding conditions to the ScriptGen section that will never exist in the script, but in that instance the recording rule doesn't even add the variable.

 

Alternatively, if it were possible to use left and right boundaries in the ScriptGen part of the recording rule, I could more accurately tell the rule where to use the variable.

 

Thanks!

0 Likes
2 Replies
Highlighted
Absent Member.. BCollins Absent Member..
Absent Member..

RE: Is it possible to create recording rules that parse a variable but don't use it?

Another option would be if it were possible to use Regular Expression to specify what needs changed: For example, if it were possible to direct the ScriptGen to only make a replacement when it occurs between two characters and is exactly a set number of characters long.

Is this possible?
0 Likes
Micro Focus Contributor
Micro Focus Contributor

RE: Is it possible to create recording rules that parse a variable but don't use it?

Hi,

As this question was raised a support case, a possible solution was found through a recording rule. A KB article will be created on how to achieve the goal mentioned above. This KB article will be posted here in due course.

Regards

Paul
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.