Example Test "Transport" - Use of Random Values

Last modified by Carina Enke on 14.01.2024

Test variables allow, among other things, the use of once determined random values in various questions, which helps to parametrise related question complexes.

In the following, the example "transport" will be extended by a second follow-up question. Both questions should use the same random values (vehicle type and speed), which are therefore defined as test variables and linked to question variables of the same name. The first question is about calculating the distance travelled by a vehicle based on its speed and the time defined in the question. The second question includes another vehicle of the same type travelling at a slower speed. The participant should calculate when the vehicles overtake each other.

 

Example test “Transport”

1

Test - Testvariablenbeispiele_de.png

In both questions, the same random values should be applied for the vehicle type (transport) and speed, with the speed depending on the vehicle type. These random values will be defined as test variables.

In the example, the text variable {transport} will be randomly initialised at test level with one of the following values: "bike", "bus”, "car" or "train". The numerical variable {speed} should be randomly selected from a range of values, which will be set by a corresponding condition, depending on the selected vehicle {transport}.

2

Test - Variablen der Einzelaufgaben_de.png

To use the random test values in the individual questions, you must also create variables in those questions and link the values to one another.

In the example, two questions of the type calculation interaction will be created. In each question, the question variables {transport} and {speed} will be defined. For the purpose of clarity, the question variables in the example have the same name with the extension “item1” in the first question and “item2” in the second.

The values of the question variables will not be set in the question itself, as this would override the linked test variable values. When creating question variables, select the empty entry from the drop-down menu Set value to in the Edit variable dialogue for each question variable.

Detailed example of a variable with an empty value ...

Variable ohne Wertsetzung_en.png

3

Test - Verknüpfung von Test und Aufgabenvariablen_de.png

The variable link will be defined at test level for each test variable. Edit the particular variable and link it to the related question variables.

In the example, the test variable {transport} will be linked to the question variables {transport_item1} and {transport_item2}. The test variable {speed}, in contrast, will be linked to the question variables {speed_item1} and {speed_item2}.

4

Aufgabenstellungen der Beispielaufgaben_de.png

You may also define more question-specific variables and conditions for your questions. The given values of all question variables, including the linked variables that will be filled in automatically, will be entered in the question text by typing the variable name (e. g. {transport_item1}, {speed_item1}).

In the example, an additional question-specific variable {speed} was created for question 1, and the correct solution was calculated as a variable {distance}. The variables will be included in the question text with appropriate syntax, and the variable with the correct solution {distance} will be bound to the gap. The Example “Transport” provides more detailed information on these steps.

For question 2, the variables will also be included, and the correct solution will be calculated within the question {distance2}.

5

Beispielansicht der Aufgaben im Testrun_de.png

One of the defined values will be randomly chosen for each participant and each test attempt. In the example, the value "bus" was randomly selected as the vehicle ({transport}) together with a speed of 42 (km/h). These values calculated at test level can now be used in all questions, and related question series can be created with random values.