- Subscribe to RSS Feed
- Bookmark
- Subscribe
- Email to a Friend
- Printer Friendly Page
- Report Inappropriate Content
Seeding CSV Data into a Multi-Maes tro Compositio n
|
Seed data is used to dynamically populate certain values in a test, either via a comma-separated value (CSV) file, or by creation of a new seed data object in CloudTest. CloudTest includes the ability to create repository-level seed data objects via the Central > Seed Data. Seed data can also be placed into a file (reachable by CloudTest) and referred to by URL. In either case, seed data can then be utilized defining a Custom Property whose Value Type is either Seed Data: Repository or Seed Data: URL. This can be done at the Target, Clip, and Container levels of a test. To create either seed data type, click Central > Seed Data and then New. The Seed Data Wizard can import data from a CSV, create a seed data object to enter new seed data manually, or reference CSV data in a network file. See Creating and Editing Seed Data for more about these options. Seed data support includes the following capabilities:
For example, when utilizing username/password pairs, or lists of responses in a questionnaire. For example, so that repeating test clips within each track can each have their own row. |
|||||||||
The following notes and restrictions apply:
|
|||||||||
|
|||||||||
Basic Example (One Column Seed Data File)By default, only the first column of the CSV file is extracted, resulting in a single value for each Custom Property. The most basic seed data example pulls an individual value from a CSV file with one column (and a sufficient number of rows to populate all the possible values). The steps to customize the test include the creation of:
For more about substituting property paths, refer to Setting Property Paths. |
|||||||||
Create a Custom Track Property That Points to the Seed Data FileSince the clip’s property path is based on the track custom property, it is created first. Use the following steps:
|
|||||||||
When the composition is played, the data in the CSV file will be extracted and set as the value of the custom property in the track. If the track repeats, each repeat of the track will get a different value. |
|||||||||
Substitute the Dynamic Value into the Test ClipThe Custom track Property can be referred to using a property path, ISSE, script, or anywhere else a Custom Property can be used. There can be multiple seed data properties in a single track, each with a different URL or using the same URL. Parameterization of test clips to deploy seed data can be performed manually, using Find and Replace, or using the Session Template Wizard. |
|||||||||
|
|
||||||||
|
The selected text from above is replaced as shown on the right. Note: If there is more than one, or the number is unknown, consider using Find and Replace or the Session Template Wizard’s Variable Search and Retrieval method. |
|||||||||
Advanced SettingsAdvanced Options are specified to control seed data behavior in certain situations. Define custom properties with the following Advanced options:
For a detailed discussion of these parameters, see Setting Advanced Seed Data Options (in Tracks, Clips, and Containers). | |||||||||
Intermediate ExampleThe composition shown below includes a track that uses a Dedicated Load Server. The track’s Copy Count is 4, which will result in the track being copied to four servers. The track’s virtual users (parallel repeats) is set to 25. Since the test clip has no additional repeats set the estimated Total Virtual Users calculation shows that the composition has 100 estimated virtual users. The seed data file for this composition must have, minimally, 100 rows, if each user is to receive unique data. |
|
||||||||
|
The composition’s lower panel General properties also reflect these settings. |
|||||||||
|
The track’s custom properties (shown by clicking the Custom Properties tab when the track is selected) also reflect the 100 virtual user count. |
|||||||||
|
Note that the column count (shown right) is five. When the property path is substituted, the array values are deployed similarly to the values shown here: |
|||||||||
Advanced ExampleThis example uses the following CSV file, which is assumed to be located at “http://hostname/SampleSeedData4.csv”: |
|
||||||||
|
The Composition contains a Track, named Track 1 with 3 Virtual Users that are copied to 3 servers using Dedicated Load Server and the activated Copy Count field. |
|
||||||||
|
The track contains the following Custom Property:
|
|||||||||
|
When the Composition plays, the following instances of the Track are given the following values for the Custom Property |
|
||||||||
|
Track: "Track 1 (server 1 of 3)" [1] |
|
||||||||
|
Track: "Track 1 (server 1 of 3)" [2] |
|
||||||||
|
Track: "Track 1 (server 2 of 3)" [0] |
|
||||||||
|
Track: "Track 1 (server 2 of 3)" [1] |
|
||||||||
|
Track: "Track 1 (server 2 of 3)" [2] |
|
||||||||
|
Track: "Track 1 (server 3 of 3)" [0] |
|
||||||||
|
Track: "Track 1 (server 3 of 3)" [1] |
|
||||||||
|
Track: "Track 1 (server 3 of 3)" [2] |
|




















