Verify Contains Rule

The Verify Contains rule is one of the rules you can apply when you generate a script in Eggplant Performance Studio using the Generation Rules wizard. To ensure that the server's responses to the virtual user's (VU's) requests are correct, you can configure the script to perform a simple check to verify that the content of a response is what we expect.

Verify Contains rule

The Verify Contains rule is similar to the Verify Title rule but is more general—text can be searched for anywhere in the response content.

Related:

Example Script Code Changes (Java)

try (Response response1 = request1.send())

{

....

}

Changes to the following:

try (Response response1 = request1.send())

{

response1.verifyContains("Login successful!", ActionType.ACT_WARNING);

....

}

Generation Rules Wizard Pages

Set expected response content page

Use the Set the expected response content page to specify the content you want to look for.

Set expected response content page when you create a Verify Contains rule

After the Set the expected response content page, the common Success/failure options page is used to determine what action to take if the title matches or doesn't match.

After the Select Success/Failure options page, the common pages Create Request Filter and Rule name and summary follow.

 

This topic was last updated on October 11, 2019, at 11:19:01 AM.

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