Previous Topic: Data SetsNext Topic: Random Data Sets


Global and Local Data Sets

Data sets can be global or local.

Global Data Sets

By default, a data set is global.

The coordinator server is responsible for providing data to all the test steps.

Here, all the model instances share a single instance of the data set.

The global data set is shared and applied to all instances of the model, even if they are run in different simulators.

Local Data Sets

You can make the data set local by selecting the Local check box while building the data set.

Each instance gets (essentially) its own copy of the data set.

A local data set provides one copy of the data set to each instance being run.

Example

This example has the following components:

Each virtual user sees all the 100 rows of data in the data set.

For a local data set

A single run (one vuser): Test Case A, gets the first row of data: Record 1, customer 1

Concept diagram of global and local data sets

A data set that is shared across virtual users is global.

For a global data set

When Test Case A is staged with three virtual users or it is staged to run continuously, each test case receives the next row of data. DevTest shares a data set across multiple runs, using the instructions that are specified in the staging document.

Concept diagram of global and local data sets

Each virtual user (instance) gets its own copy of the data set that is local.

Concept diagram of global and local data sets

When local is marked and Test Case A has a loop, the test reads every row of data in the data set. Each run gets its own copy of the data set.

Test Case Looping

Often the data in a data set drives the number of times a test case is run.

Looping can be implemented several ways:

Use a numeric counter data set to cause a specific step to run a fixed number of times. You can set the frequency at the step level or the test case level.

For example, consider a test where we want to test the login functionality of our application using 100 user ID/password pairs. To achieve this test, set a single step to call itself until the data set (with 100 rows of data) is exhausted. When the data set is exhausted, the test can redirect to the next natural step in the case, or the End step. Alternatively, you can use a counter data set with the user ID/password data set.

If you configure a global data set in the first step of a test case to end the test when the data set is exhausted, all test instances end for a staged run.

This overrides other staging parameters such as steady state time. Local data sets do not end the staged run in this fashion nor will data sets on steps other than the first test.