When using data in an ActiveData file for ActiveData testing, you can specify the rows of data in the file that are used and the order in which they are used. The Start row, End row, and Random count values determine the rows used and the order in which they are used.
Random count can take different values that determine if and how records from the ActiveData file associated with the asset are used in the ActiveData test.
For visual tests, set the Start row, End row and Random count values in the Define the ActiveData asset to use page of the Test Logic (Repetition) Designer. Once set, you can update the values in the Start row, End row and Random count properties for the Repeat using ActiveData step. For VB .NET test scripts, set and update the Start row, End row and Random count values using the StartRow, EndRow, and RandomCount parameters of the LoadActiveData method.
The following table shows the result of using different Start row and End row values with the acceptable values for Random count.
Start Row Value | End Row Value | RandomCount Value (Visual Test) | RandomCount Value (VB .NET Script) | Result |
---|---|---|---|---|
1 | -1 ^{b} | Get all rows in sequence | 0 or False (Get all rows in sequence) | All rows load in index order. |
1 | 5 | Get all rows in sequence | 0 or False (Get all rows in sequence) | Rows 1, 2, 3, 4, and 5 load in order. |
5 | -1 ^{b} | Get all rows in sequence | 0 or False (Get all rows in sequence) | Row 5 through the last row in the ActiveData file load in order. |
5 | 1 | Get all rows in sequence | 0 or False (Get all rows in sequence) | Rows 5, 4, 3, 2, and 1 load. |
-1 ^{a} | 1 | Get all rows in sequence | 0 or False (Get all rows in sequence) | All rows load in reverse order |
-1 ^{a} | 5 | Get all rows in sequence | 0 or False (Get all rows in sequence) | Loads the last row in the ActiveData file through row 5 in reverse order. |
-1 ^{a} | -1 ^{b} | Get all rows in sequence | 0 or False (Get all rows in sequence) | Loads the last row in the ActiveData file. |
1 | 1 | Get all rows in sequence | 0 or False (Get all rows in sequence) | Loads row 1. |
1 | -1 ^{b} | Get all rows in random order | -1 or True (Get all rows in random order) | Loads all rows in random order. |
1 | 5 | Get all rows in random order | -1 or True (Get all rows in random order) | Rows 1 through 5 load in random order. |
5 | -1 ^{b} | Get all rows in random order | -1 or True (Get all rows in random order) | Rows 5 through the last row in the ActiveData file load in random order. |
5 | 1 | Get all rows in random order | -1 or True (Get all rows in random order) | Loads rows 5 through 1 in random order. |
-1 ^{a} | 1 | Get all rows in random order | -1 or True (Get all rows in random order) | Loads all rows in random order. |
-1 ^{a} | 5 | Get all rows in random order | -1 or True (Get all rows in random order) | Loads rows 5 through the last row in the ActiveData file in random order. |
1 | -1 ^{b} | 5 | 5 | Loads five random rows from the ActiveData file. |
1 | 10 | 5 | 5 | Loads five rows from the first through the tenth row in the ActiveData file in random order. |
10 | -1 ^{b} | 5 | 5 | Loads five rows from the tenth row through the last row in the ActiveData file in random order. |
1 | 5 | 10 | 10 | Generates an out-of-bounds run-time error. |
^{ a} For visual test, checking the Start at last row containing data check box for the Start row value is the equivalent.
^{ b} For visual test, checking the End at last row containing data check box for the End row value is the equivalent.
If any value used for the StartRow, EndRow, or RandomCount exceeds the number of rows in the ActiveData file, an out-of bounds run-time error generates.
A run-time error occurs if LoadActiveData() attempts to load an ActiveData file that is opened in another application.