Quantcast
Channel: Silk Performer
Viewing all articles
Browse latest Browse all 4084

Wiki Page: How can I create a recording rule that will suppress the recording and scripting of calls to a particular URL?

$
0
0

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.

For full details on recording rules please see resolution 19289.

Below is an example of a recording rule that will prevent calls to http://gmo.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 SilkPerformer"s Working\Include directory (which means the rule will apply globally across all projects).

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

                     Suppress Recording Of http://gmo.borland.com/      true      SuppressRecording                      Http.Initial.Request.Url         gmo                              

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 SilkPerformer 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 "gmo" this will mean that any URL that contains "gmo" will not be recorded by the SilkPerformer recorder.

Old KB# 18205

Viewing all articles
Browse latest Browse all 4084

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>