Building a Database Project

AppPerfect Load Test can be used to load test your database directly. AppPerfect Load Test can generate and fire large number of SQL queries at your database. This enables you to load test the database layer of your application infrastructure in isolation from other layers. Having a smooth and efficient database layer is critical to a healthy and responsive Web application infrastructure.

The overall process for creating a database test is as follows:

  1. Create a new project
  2. Configure Database Settings at Project -> Properties..
  3. Create the necessary queries manually and store them in a file or enter then into AppPerfect Load Test via the editor view provided.
  4. Specify query parameters as needed for selection, filtering and sorting.
  5. Specify any validation criteria you wish

The queries to be fired at the database need to be created manually. Most often this is not an issue since you can obtain those queries from your Web application.

Project

You can see the following groups on the right hand side after you click the project name in the Editor:

Host Settings

These fields do not apply to a Database project.

Group Settings

In a project the tasks are stored in logical groups. This enables users to better organize the test. By default only ActionGroup for "HTTP tasks" is added to the project. To add Database tasks you need to create a new ActionGroup with JDBC type. To do so, right click on Project Node in the Editor tree and select Add Group... option from the popup menu. In the Add Group dialog you need to select the Group type as JDBC for database group.

Run Groups: A test can have one or more action groups. If you have more than one action group, you can specify if you want a virtual user to run these groups sequentially or simultaneously. In sequential execution, a virtual user executes every task/url in every group. In simultaneous execution, virtual users are assigned individual groups to execute. This assignment is based on a percentage distribution that you can specify from the "Groups table" shown for project node view in Editor tab.

This section lists the Action Groups of the project. You can :

Virtual Users

The amount of load to be exerted on your target application by AppPerfect depends on the number of virtual users you specify. In general, higher the number of virtual users, higher the work load. A good way to work with AppPerfect Load Test is to view your test from the point of view of each virtual user.

Additional information about virtual users can be found in the Virtual Users chapter.

Parameters

An important aspect of designing a good test is to define parameters correctly.

Additional information about parameterization can be found in the Parameters chapter.

Groups

The test consists of a number of "Groups". A Group is a logical unit for combining actions inside a test. By default, three Groups are created in a project: Starting Group, Action Group and Ending Group. But all these groups are for HTTP type tasks. For database tasks we need to create a new ActionGroup with type JDBC

Behavior of the various groups can be configured by clicking the group in the Editor and setting its properties on the right side of the window. To move a Task from one group to another, click right mouse button on the Task, select Cut from the popup menu, click right mouse button on the new group where you wish to paste it, and select Paste from the popup menu. More details are available in the Task Groups chapter.

Task Details

Validation

This feature is provided so that you can define what constitutes a Successful or a Failed response. If this is not specified, then a basic validation will be performed to the effect that no error code was returned in the response.

Criteria: The validation can be performed for two specific criteria, that is Success and Failure selected by using the available drop-down box.

Validate Count: Select Yes or No from the drop-down box depending on if you want to validate the row count as specified in the Count field.

Match Type: The Any Column or All Columns option can be selected from the drop-down box. If the Any Column option is selected and any one of the column validation is successful then the response is said to be successful. Whereas the response is said to be a failure only if all the column validations are a failure. If the All Columns is selected and all of the column validations are successful the response is deemed to be successful. If any one of the column validation is a failure then the response is said to be a Failure.

If you do not want to match type you can select the blank option for the Match Type field. The above explanation is applicable when the Success criteria is selected.

Count: This text box is active only when the Yes option is selected from the drop-down box in the Validate Count field.

Column Name: This is an editable field where the name of the column in the Database table can be specified.

Data Type: Select the String, Number or Date from the drop-down box depending on the data type of the column.

Values: The Search for Values dialog opens when the row corresponding to the Values column is clicked. The values are entered in the Enter Values text box and then Add is clicked to add individual values to the list. The selected value from the list can be deleted by clicking Delete.

The Add Column and Remove Column buttons are used to add or remove columns from the existing list.