The Create Request Filter in Eggplant Performance

The Create a request filter page is a page in the Generation Rules wizard. When a script is generated, the script generator adds code to the script for every HTTP request in the recording. Generation rules automatically modify the generated code, but sometimes a rule should only be applied to certain requests in the recording. The Create a request filter page enables you to specify the requests to which the current rule should apply.

This doesn't affect which requests are included in the script—code is still generated for every request in the recording. If you are trying to exclude requests entirely, consider filtering hosts in the recording first, or creating an Exclude rule.

In many cases, you can apply the rule to all requests, because the rule itself defines the requests to which it applies. For example, a Replace Key Value rule only takes effect if the HTTP request contains GET or POST data with the relevant key. In all other cases the script code is unaffected. However, if you find that the rule is applied in places where it shouldn't be, then you can try filtering the requests to which the rule is applied.

Note: For some generation rules, such as Exclude rule and Promote Sub-request rule, this is the only option page provided. In this case you must supply a condition to filter requests.

Generation rules filter window in Eggplant Performance Studio

  • Choose Apply rule to all requests, or Only apply rule to requests that match the following conditions.

Specifying Conditions

If you select Only apply rule to requests that match the following conditions, then the requests that match this filter table are populated to show the requests in the current recording that match the combination of filters.

Requests are only included if they match all the conditions in the list.

Conditions can be added by clicking the Add button.

The Create Request Filter window opens:

The Create Request Filter for Rules Generation in Eggplant Performance Studio

Filter By Options

You can filter requests using any of the options in the Filter by list. Descriptions of the options follow:

URL: Requests made with a URL that matches the URL regular expression are included in the filter.

Note: Be aware of regular expression special characters, for example the . (dot) character commonly appears in URLs, but if typed into the URL regular expression box will match any character.

Request header: Requests that sent the specified Header name and Header value are included in the filter.

POST data: Requests that sent the specified name and value in their POST data are included in the filter.

Query data: Requests whose POST or query data contain the specified key (query data name) and matching values (query data regular expression) are included in the filter.

Response code: Requests whose response from the server was sent with the specified HTTP response code (for example, "200 OK") are included in the filter. The response code can be one of the codes listed in the HTTP specification, or a custom response code if necessary.

Response header: Requests whose response from the server was sent with the specified Header name and Header value are included in the filter.

Response content: Requests whose response from the server contains the text specified in the Response contains box are included in the filter.

Modifying Conditions

Edit conditions in the list by selecting them in the list and clicking Edit, or by double-clicking them in the list. The Create Request Filter window appears as above, enabling you to edit the condition as before. Remove conditions in the list by selecting them in the list and clicking the Delete button.

 

This topic was last updated on August 19, 2021, at 03:30:52 PM.

Eggplant icon Eggplantsoftware.com | Documentation Home | User Forums | Support | Copyright © 2022 Eggplant