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

Generating Clean Scripts

Micro Focus Expert
Micro Focus Expert
0 5 2,111

When recording websites or web applications with Silk Performer you might end up with big, messy scripts, containing a lot of web requests you did not intend to record. Silk Performer 17 now provides a couple of  traffic filters that allow you to exclude such unwanted requests. The graphic below summarizes the three traffic filters we will be discussing in this blog article: (1) the general filter, (2) the domain filter, and (3) the path and query filter. The filters display on the Capture File page. To learn more about capture files, read the blog article about Offline Scripting.

How the traffic filters work

Before we use the traffic filters in a real-world example, let's first take a look at what they do and how they work. The general filter consists of two check boxes, or two settings: Exclude Proprietary TCP/IP Traffic and Exclude Browser-Specific Domains. When you enable Exclude Proprietary TCP/IP Traffic, Silk Performer will exclude all non-standard TCP/IP protocols. These can also be called proprietary protocols. All standard protocols like HTTP, FTP, LDAP, and so on, will be kept. When you enable Exclude Browser-Specific Domains, Silk Performer will exclude domains like urs.microsoft.com or translate.googleapis.com. Browsers usually use such domains for statistical or tracking purposes. When you record a web application you typically do not want to include such traffic.

Next, there's the domain filter. You can use it to include or exclude requests to specific domains. If you want to learn more, read the blog article about Domain Filtering. It provides a comprehensive introduction to this topic. And then, there's the path and query filter. You can use it to exclude web requests that contain a specific string. Requests you cannot exclude with the domain filter (because you want to keep the respective domain in your script), can easily be addressed using the path and query filter.

Creating a new project

Now, let's try out the filters in a sample project. To do so, we first need to create a new Web business transaction project and record any website. We'll be recording yahoo.com for this example, because this website triggers quite a lot of events in the background. Make sure that you use Internet Explorer or Chrome for recording. These browsers typically make heavy use of the already mentioned proprietary protocols and browser-specific domains. For this example we need this otherwise unwanted traffic to learn what the filters can do for us.

Recording a website

Performing some clicks on yahoo.com should be enough to generate a big amount of events. Take a look at the number of events in the Recorder window. In our case, 516 events have been recorded. So let's close the browser, stop the recording, and save the script. The script displays in Silk Performer. As expected, it is a huge and messy script, full of web requests we actually do not want to have in there. Let's double-click the .spcap file in the tree to open the capture file. On the Capture File page, the three traffic filters display.

The general filter

We can see that the general filter settings are enabled by default (1), which makes perfect sense. You usually do not want to include any of the propriety TCP/IP requests or the requests caused by browser-specific domains. When you hover your mouse over the Exclude browser-specific domains check box, a tooltip appears (2). It shows which browser-specific domains have been detected. In our case it is the domain urs.microsoft.com. Let's disable the two general filter settings for a moment, just to find out how they affect the script. Click Generate and compare the new script with the initial script. The new one should be a little longer and it should contain a couple of web requests to urs.microsoft.com.

The domain filter

Go back to the Capture File page and play around with the domain filter. In our example, we enable the filter (1) and include (2) just two domains: www.yahoo.com and login.yahoo.com (3). Now, when we generate a new script, it is considerably shorter and much more useful. All requests to the domains we didn't want to record in the first place are gone.

The path and query filter

To try out filter number three, search for a string in your script you might want to exclude. In our example, we're going for the string px.gif (1). All requests that contain this string should be excluded from the script. So, again jump back to the Capture File page and enter px.gif in the field below the path and query filter (2). When you press enter, you can immediatly see the matches (3). Generate a new script and verify that the respective requests are removed.


The traffic filters help you to tidy up your scripts and remove requests that were unintentionally recorded. Use the traffic filters in your Silk Performer projects and see what they can do for you.

Watch the Generating Clean Scripts video

The following video shows how to make use of the three traffic filters based on the same example we've discussed in this article:

More information

To learn more about all new features and enhancements Silk Performer 17.0 provides, take a look at the following blog posts:

The Silk Performer Help is another comprehensive source of information:

If this article was useful for you, leave us a comment or like it. We appreciate any of your feedback.

Tags (1)
Anonymous3 Absent Member.
Absent Member.

In this blog article, we're going to introduce you to HTTP Live Streaming, or HLS for short. You

Anonymous3 Absent Member.
Absent Member.

Silk Performer 17.0 introduces a number of new features and enhancements for Performance Explorer. In

Anonymous3 Absent Member.
Absent Member.

In this blog post, we'll take you through the improved CloudBurst workflow of Silk Performer 17.

Anonymous3 Absent Member.
Absent Member.

Usually the general-setup for a load test is clear: You have recorded a script, configured a certain

Anonymous3 Absent Member.
Absent Member.

Assuming you have defined a workload with a certain amount of virtual users and you have a pool of agents

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.