Samples of tests using PureTest and PureLoad

Here are some samples gathered on how you implement different types of test cases with PureLoad and PureTest. For a full description of the functionality please download and try out the tools themselves or read the product documentation.

Basic HTTP

The samples 1.02 and 1.03 will show two basic web test cases using HTTP GET.

This picture show a basic structure implemented with several test cases (Scenarios) in one file stored as a .plc file which is our own format.One or several Scenarios can be executed manually or automatic.

The picture also show how each Scenario is built up by one or several Tasks.

Task: HttpGetTask

Task: JsonExtractTask

Basic REST

The samples 2.02-4 show three basic REST test cases using HTTP GET, POST, and DELETE.

This picture show an overview of the three test cases (Scenarios) implemented using a simple structure. They are stored in file with a ".plc" as extension which is our own format.One or several Scenarios can be executed manually or automatic.

The picture also show how each Scenario is built up by one or several Tasks (operations).

Scenario: List of resources

Task: DecriptionTask

Each Scenario is normally started with a DescriptionTask describing the content/purpose of the test. This task will not be part of Scenario execution.

Task: HttpInitTask

HttpInitTask is used to initiate common HTTP parameters for a client.

Task: HttpGetTask

Do an HTTP GET towards ”http://jsonplaceholder.typicode.com/posts”. When run the operation will be executed OK if the specified parameter/value exist.

Debugger and Task Execution Result

For a Scenario you can use the Debugger Tool to execute all, single step, step over, etc for debugging purposes. Here the Scenario has been run in the Debugger.This is how the result looks like for the HttpGetTask. General statistics are saved for each operation made, like:- If the operation was executed successfully.- How long I took to execute the operation- Response codes received- Response headers

Also the type of content that was specified in the HttpInitTask has been saved.

Response Content

This is the actual content that was fetched with the HTTP GET. It is shown by using the "Show..." button in the Execution Result pane.

Task:HttpDeleteTask

General Operations, Features and some special cases

Here we are using the example "REST - Using HTTP GET" to present the PureLoad Debugger Tool, the execution log pane and the result pane.

Task: HttpGetTask

Do an HTTP GET towards ”http://jsonplaceholder.typicode.com/posts”. When run, the operation will be executed OK if the specified parameter/value exist.

Debugger and Task Execution Result

For a Scenario you can use the PureTest/PureLoad Debugger Tool to execute all operations, single step, step over, etc for debugging purposes. Here the Scenario has been run in the Debugger.This is how the result looks like for the HttpGetTask. General statistics are saved for each operation made, like:- If the operation was executed successfully.- How long I took to execute the operation- Response codes received- Response headers

Also the type of content that was specified in the HttpInitTask has been saved.

Response Content

This is the actual content that was fetched with the HTTP GET. It is shown by using the "Show..." button in the Execution Result pane. You can use Tasks such as VerifyTask to verify content or do other operations.

Reference Sequence

Here we are using the example "REST - Delete a resource" from "Basic REST" to present an example on how to work with Parameter Generators.

Creating the Parameter Generator

A Parameter Generator can be added in the "Parameter Generator" pane. There are different types of parameter types such as counters, lists, IP addresses, etc. Here the parameter type "Counter" is used.

Next the parameter is named and properties as start/stop are choosen. The "IdCounter" will be assigned values 1, 2, 3, 4, and 5.

Task Sequence: Loop

Here a Task Sequene "Loop" is inserted to loop over the different parameter values.

Task: SetVariable Task

A variable "id" is set to be used for looping over the values. Several kind of operations can be chosen for the parameters.

Task: HttpDeleteTask

Do an HTTP Delete on the post with value from the parameter generator.

Here we are using the example "HTTP GET" to present how to set User Agent Profiles with PureLoad.

A number of predefined User Agent Profiles are available as part of the HttpInitTask. Here also a number of other parameters can be set like how many connections that should maximum be used, if a bandwidth limit should be used, etc.

Task: HttpUserAgentProfileTask

There is also a possibility to set your own User Agent Profile if you have a specific device you need to simulate, or if you need an easy way to distinguish the test traffic. Wanted User Agent Profiles can be added using a file in XML format.