Task Groups and Tasks

The vital elements of a Test are defined in a Task Group which comprises of various Tasks. On the basis of the project type selected while creating a test the Task Group will hold information about the URL or the database and the settings to be applied during the recording of the Test.

A Task forms the fundamental, basic unit of a test. It holds all the information and the settings on the basis of which a request or query would be considered as successful or failed.

Task Groups for Web Tests

To facilitate testing of web applications that require a startup(e.g. login) and cleanup(e.g. logout, deleting test tables/records from database) routine before allowing access to other services, AppPerfect Load Test provides three types of groups.

Starting Group

The purpose of this group is to hold tasks that logically get executed in the beginning.

Action Group

When AppPerfect Load Test records tests, all the tasks are first stored under Action Group. After the recording, you can re-arrange the tasks by cutting and pasting into the Starting and Ending Groups. You can create several Action Groups in a single Load Test project, and record a different set of tasks for each of these ActionGroups.

For each recording, you will be prompted for confirming the name of the ActionGroup you wish to record the test for. By default, the most recently created ActionGroup is selected for recording of new tasks.

Ending Group

This group is meant to hold the tasks that should get performed at the end in the set of tasks recorded. Most common example would be logging out.

You can choose not to play any of the groups by selecting the Ignore Group checkbox. You can set a Repeat Count for the groups. You can also change the order of the tasks for a group.

Action Group

Action Group is used by all types of Load Test tests : Web / Database. This group holds:

You can add more Action Groups to your project, edit and delete existing ones. You can also Cut, Copy, Paste Action Groups.

All these features are available by Right Clicking the Action Group.

Add

Right click the Action Group and click 'Add Group'. You will see a dialog box where you can provide a name to the group, a repeat count and select whether you want to ignore that group.

Edit

Select the Action Group and you will find all the settigns for group on right hand side panel. You can edit the group properties there:

Delete

Right click an Action Group and click Delete Group.

Other Operations

Verify Test Using Browser:

This feature allows you to watch the test being replayed as if in a browser window. Each URL is reproduced with its success or failure status and additionally you can view several details about it right there:

Load testing using single Login - Logout:

To load test a single login-logout, you must have login task in Starting Group and logout task in Ending Group. To create such test at the start of recording select Group as "Starting Group" in recording dialog and start recording. Once login task is recorded, go back to recording dialog and change group to say "ActionGroup1" and continue recording rest of the tasks. When you are done and ready to logout, again go back to recording dialog and change group "Ending Group". Now record logout and other cleanup tasks.

Now if you look at recorded test you will find that login task is present in "Starting Group" and logout task is present in "Ending Group". Now you can select how groups should be run, like - Starting, Action, Ending or Starting (Once), Action (Repeat), Ending (Once). In first selection its no different then having login and logout tasks in Action Group itself (if repeat count of action group is one). In second case each virtual user will login once and will execute tasks in Action Group using same logged in user and at the end will logout of application. You can select this execution behavior from Project Node view.

Tasks

Each URL visited and each query constitute a task in Load Tester. Features to add tasks, edit and delete existing tasks and many more, are available by right clicking the task name.

Add

Add Task Manually

Browser recording is the more convenient method of adding groups and tasks but adding tasks manually is a useful feature that allows you to provide all details about a task and embed it anywhere in the group, which may be a little more time-consuming then browser recording.

Click this option to add a task to the project manually. You will see Add Task dialog. There are 5 tabs:

Task Details

Task Name: Provide a name for your task here.

Host: The host is your web server's URL.

Path: In Path, you have to provide the location of that part of your application which you want to test. e.g. in the bundled petstore application, the HOST will be: http://localhost:8080/ and the path may be /petstore/selection.do, the URL of the page which you want to test. Please validate this path by clicking the validate icon.

Response Code: You have to provide the expected Response code here. This can be used for validation purposes. If the task will fail on replaying the test, the response code received will be recorded and you can check it agains the response code provided. In tasks that are recorded, the response code received by the browser is stored as the valid response code for the recorded task.

Method: If you wish to pass some data through this task, you need to specify the correct method - GET or POST. The default selection is GET.

Timeout (sec.): Also provide a timeout value over and above the Think Time. Timeout value is considered after think time lapses. For instance, if you have provided Think Time as 10 seconds and Timeout value as 10 seconds, then the total time Load Test will allow the task to respond is 20 seconds.

Uses Authentication: If your application uses some authentication mechanism then select this checkbox. Now, your authentication information will be stored and used automatically while replaying the test, rather than prompting you for the same.

Ignore Task: Check this box to ignore the task.

Benchmark Page: Select the page here which you want to use to validate the current page against. It should match the benchmark page you will provide here to succeed.

Parameters

To add parameters, click the add button on the right. You will get a list of parameters if you have recorded tasks using browser.

Request Header

Provide the Request Headers manually or select from the list provided. Click the add button.

Request Entity

Request Entity is data sent to server as request body in case of HTTP request. It could be simple text or could be XML data like in case of XMLHTTPRequest (AJAX request)

Sub Tasks

Click add to create sub tasks for the current task.

Add Task using Browser Recording

Click here to add task to the project using browser recording. The Recording dialog explains details regarding Proxy settings and details regarding recording the test. Please see the chapter Recording a Web Test.

When you are adding a task by recording using the browser, you cannot change the group while recording. The task will get recorded in the group where you right clicked and selected the option to Add a task using browser recording.

Edit

Select the task in the Editor tree and on right hand side you can view the details of the task. You can edit the task details there.

Delete

Right click a task name and click 'Delete Task' to delete it.

Other Operations