Having problems with your account or logging in?
A lot of changes are happening in the community right now. Some may affect you. READ MORE HERE

Create a recording rule that will suppress the recording and scripting of calls to a particular URL.

Create a recording rule that will suppress the recording and scripting of calls to a particular URL.

If you need to prevent calls to particular URL being recorded on a regular basis e.g. you may want to suppress requests to Microsoft Windows updates or to suppress calls to a third party site e.g. banner ads, which you do not wish to test under load, then you may want to create a recording rule to suppress recording. Full details of recording rules can be found in the 'Rule-Based Recording' section of the Advanced Concepts book which ships with Silk Performer.

Below is an example of a recording rule that will prevent calls to http://demo.borland.com/ being recorded. To make this rule work you will need to copy it to a text editor and save the file with an .xrl extension. You will need to copy this rule into either the Documents directory (which you need to create) of the current project (which means it will only apply to this project) or place it in the C:\Users\Public\Documents\Silk Performer x.x\RecordingRules directory (which means the rule will apply globally across all projects).

If you then try to record a script against http://demo.borland.com/ you will see that no functions are recorded.

            
  


  
    Suppress Recording by Host
    true
    SuppressRecording
  	
      
	  		Http.Initial.Request.Url.Host
	  		borland
      
  	
  


The attributes in the rule above are as follows :

- Defines the type of rule. This rule type allows you to manipulate the recorder and thus affect the outcome of the recorded script. It allows you to override the default heuristics the recorder employed prior to this rule type and still employs in the absence of such rules.

- is simply a name to refer to the rule as. This name will appear at the beginning of the record.log file, to let you know if the rule has been loaded correctly or not.

- is used to toggle the rule on or off, if this is set to True the rule will take effect, if it is set to false it will not.

- Specifies what the recording rule should do. In the this case the "SuppressRecording" action is used, this Action can be used to suppress the recording of individual HTTP requests. Please note that this action is only available in SilkPerformer 6.5.1 onwards.

- Tell the Silk Performer recorder under what conditions the Rule should be applied.

- specifies what part of the request that you apply this rule to. In the example above it is applied to the initial request URLs.

- In here you need to enter the text of the URL that you want to suppress recording of. In the example above we have entered "borland" this will mean that any URL that contains "borland" will not be recorded by the Silk Performer recorder.

The rule detailed above can also be found in the C:\Program Files (x86)\silk\Silk Performer x.x\Templates\RecordingRules directory under the name 'Suppress_Recording_ByHost.xrl'.

DISCLAIMER:

Some content on Community Tips & Information pages is not officially supported by Micro Focus. Please refer to our Terms of Use for more detail.
Top Contributors
Version history
Revision #:
1 of 1
Last update:
‎2013-02-15 18:48
Updated by:
 
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.