@@ -472,11 +472,13 @@ Creating variables
472
472
473
473
Variables can spring into existence from different sources.
474
474
475
- Variable table
476
- ~~~~~~~~~~~~~~
475
+ .. _Variable sections :
477
476
478
- The most common source for variables are Variable tables in `test case
479
- files `_ and `resource files `_. Variable tables are convenient, because they
477
+ Variable section
478
+ ~~~~~~~~~~~~~~~~
479
+
480
+ The most common source for variables are Variable sections in `test case
481
+ files `_ and `resource files `_. Variable sections are convenient, because they
480
482
allow creating variables in the same place as the rest of the test
481
483
data, and the needed syntax is very simple. Their main disadvantages are
482
484
that values are always strings and they cannot be created dynamically.
@@ -487,7 +489,7 @@ Creating scalar variables
487
489
488
490
The simplest possible variable assignment is setting a string into a
489
491
scalar variable. This is done by giving the variable name (including
490
- `${} `) in the first column of the Variable table and the value in
492
+ `${} `) in the first column of the Variable section and the value in
491
493
the second one. If the second column is empty, an empty string is set
492
494
as a value. Also an already defined variable can be used in the value.
493
495
@@ -525,7 +527,7 @@ Creating list variables
525
527
'''''''''''''''''''''''
526
528
527
529
Creating list variables is as easy as creating scalar variables. Again, the
528
- variable name is in the first column of the Variable table and
530
+ variable name is in the first column of the Variable section and
529
531
values in the subsequent columns. A list variable can have any number
530
532
of values, starting from zero, and if many values are needed, they
531
533
can be `split into several rows `__.
@@ -544,7 +546,7 @@ __ `Dividing data to several rows`_
544
546
Creating dictionary variables
545
547
'''''''''''''''''''''''''''''
546
548
547
- Dictionary variables can be created in the variable table similarly as
549
+ Dictionary variables can be created in the Variable section similarly as
548
550
list variables. The difference is that items need to be created using
549
551
`name=value ` syntax or existing dictionary variables. If there are multiple
550
552
items with same name, the last value has precedence. If a name contains
@@ -598,7 +600,7 @@ Variables can be set from the command line either individually with
598
600
the :option: `--variable (-v) ` option or using a variable file with the
599
601
:option: `--variablefile (-V) ` option. Variables set from the command line
600
602
are globally available for all executed test data files, and they also
601
- override possible variables with the same names in the Variable table and in
603
+ override possible variables with the same names in the Variable section and in
602
604
variable files imported in the test data.
603
605
604
606
The syntax for setting individual variables is :option: `--variable
@@ -722,7 +724,7 @@ verifies that the returned value is a dictionary or dictionary-like similarly
722
724
as it verifies that list variables can only get a list-like value.
723
725
724
726
A bigger benefit is that the value is converted into a special dictionary
725
- that it uses also when `creating dictionary variables `_ in the variable table .
727
+ that it uses also when `creating dictionary variables `_ in the Variable section .
726
728
Values in these dictionaries can be accessed using attribute access like
727
729
`${dict.first} ` in the above example. These dictionaries are also ordered, but
728
730
if the original dictionary was not ordered, the resulting order is arbitrary.
@@ -775,7 +777,7 @@ keyword.
775
777
Variables set with :name: `Set Suite Variable ` keyword are available
776
778
everywhere within the scope of the currently executed test
777
779
suite. Setting variables with this keyword thus has the same effect as
778
- creating them using the `Variable table `_ in the test data file or
780
+ creating them using the `Variable section `_ in the test data file or
779
781
importing them from `variable files `_. Other test suites, including
780
782
possible child test suites, will not see variables set with this
781
783
keyword.
@@ -1062,7 +1064,7 @@ Variable priorities
1062
1064
1063
1065
Variables `set in the command line `__ have the highest priority of all
1064
1066
variables that can be set before the actual test execution starts. They
1065
- override possible variables created in Variable tables in test case
1067
+ override possible variables created in Variable sections in test case
1066
1068
files, as well as in resource and variable files imported in the
1067
1069
test data.
1068
1070
@@ -1076,16 +1078,16 @@ Variable priorities
1076
1078
1077
1079
__ `Setting variables in command line `_
1078
1080
1079
- *Variable table in a test case file *
1081
+ *Variable section in a test case file *
1080
1082
1081
- Variables created using the `Variable table `_ in a test case file
1083
+ Variables created using the `Variable section `_ in a test case file
1082
1084
are available for all the test cases in that file. These variables
1083
1085
override possible variables with same names in imported resource and
1084
1086
variable files.
1085
1087
1086
- Variables created in the variable tables are available in all other tables
1088
+ Variables created in the Variable sections are available in all other sections
1087
1089
in the file where they are created. This means that they can be used also
1088
- in the Setting table , for example, for importing more variables from
1090
+ in the Setting section , for example, for importing more variables from
1089
1091
resource and variable files.
1090
1092
1091
1093
*Imported resource and variable files *
@@ -1097,13 +1099,13 @@ __ `Setting variables in command line`_
1097
1099
variables, the ones in the file imported first are taken into use.
1098
1100
1099
1101
If a resource file imports resource files or variable files,
1100
- variables in its own Variable table have a higher priority than
1102
+ variables in its own Variable section have a higher priority than
1101
1103
variables it imports. All these variables are available for files that
1102
1104
import this resource file.
1103
1105
1104
1106
Note that variables imported from resource and variable files are not
1105
- available in the Variable table of the file that imports them. This
1106
- is due to the Variable table being processed before the Setting table
1107
+ available in the Variable section of the file that imports them. This
1108
+ is due to the Variable section being processed before the Setting section
1107
1109
where the resource files and variable files are imported.
1108
1110
1109
1111
*Variables set during test execution *
@@ -1119,7 +1121,7 @@ __ `Setting variables in command line`_
1119
1121
1120
1122
`Built-in variables `_ like `${TEMPDIR} ` and `${TEST_NAME} `
1121
1123
have the highest priority of all variables. They cannot be overridden
1122
- using Variable table or from command line, but even they can be reset during
1124
+ using Variable section or from command line, but even they can be reset during
1123
1125
the test execution. An exception to this rule are `number variables `_, which
1124
1126
are resolved dynamically if no variable is found otherwise. They can thus be
1125
1127
overridden, but that is generally a bad idea. Additionally `${CURDIR} `
@@ -1148,7 +1150,7 @@ Test suite scope
1148
1150
1149
1151
Variables with the test suite scope are available anywhere in the
1150
1152
test suite where they are defined or imported. They can be created
1151
- in Variable tables , imported from `resource and variable files `_,
1153
+ in Variable sections , imported from `resource and variable files `_,
1152
1154
or set during the test execution using the BuiltIn _ keyword
1153
1155
:name: `Set Suite Variable `.
1154
1156
0 commit comments