Exclude Rule

The Exclude rule is one of the rules you can apply when you generate a web virtual user (VU) script in Eggplant Performance using the Generation Rules wizard. The requests in the recording that match the criteria will be excluded from the generated script; the code to send those requests will be omitted.

The Exclude rule is useful if you want to filter out requests from particular scripts without removing them from the recording, or if you want to filter out requests based on criteria other than the host to which the request was sent.

Alternately, read the Filtering hosts topic to see if you can filter requests out of the recording before the script generation process.

Exclude Rules in Eggplant Performance

Example Script Code Changes (Java)

The following example code shows the effect of applying an Exclude rule:

Url url1 = new Url(protocol1, httpbin, "/");

try (Request request1 = getWebBrowser().createRequest(HttpMethod.GET, url1))

{

request1.setHeader("Accept-Charset", "utf-8");

 

try (Response response1 = request1.send())

{

....

}

}

 

Url url2 = new Url(protocol1, httpbin, "/");

try (Request request2 = getWebBrowser().createRequest(HttpMethod.GET, url2))

{

try (Response response2 = request2.send())

{

....

}

}

Changes to the following:

// Exclude request 1 based on Accept-Charset header

 

Url url2 = new Url(protocol1, httpbin, "/");

try (Request request2 = getWebBrowser().createRequest(HttpMethod.GET, url2))

{

try (Response response2 = request2.send())

{

....

}

}

Generation Rules Wizard pages

Create Request Filter

Since the purpose of this rule is to exclude requests from the generated script, the only information required is which requests to exclude. These can be described by creating a request filter on the common Create Request Filter page.

Note: You must add at least one condition (otherwise the rule would have no effect).

After the Create Request Filter page, the common Rule name and summary page appears.

 

This topic was last updated on June 21, 2019, at 02:49:50 PM.

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