Skip to content

Commit 5c2b0f5

Browse files
committed
UG: Variable table -> Variable section
1 parent dc5c0c7 commit 5c2b0f5

File tree

3 files changed

+28
-27
lines changed

3 files changed

+28
-27
lines changed

doc/userguide/src/CreatingTestData/ResourceAndVariableFiles.rst

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -12,7 +12,7 @@ as well. The main difference is that resource files cannot have tests.
1212
variables. For example, they allow values other than strings and
1313
enable creating variables dynamically. Their flexibility comes from
1414
the fact that they are created using Python code, which also makes
15-
them somewhat more complicated than `Variable tables`_.
15+
them somewhat more complicated than `Variable sections`_.
1616

1717
.. contents::
1818
:depth: 2
@@ -127,7 +127,7 @@ Variable files
127127
--------------
128128

129129
Variable files contain variables_ that can be used in the test
130-
data. Variables can also be created using variable tables or set from
130+
data. Variables can also be created using Variable sections or set from
131131
the command line, but variable files allow creating them dynamically
132132
and also make it easy to create other variable values than strings.
133133

@@ -301,7 +301,7 @@ Using objects as values
301301
'''''''''''''''''''''''
302302

303303
Variables in variable files are not limited to having only strings or
304-
other base types as values like variable tables. Instead, their
304+
other base types as values like Variable sections. Instead, their
305305
variables can contain any objects. In the example below, the variable
306306
`${MAPPING}` contains a Java Hashtable with two values (this
307307
example works only when running tests on Jython).
@@ -585,8 +585,8 @@ from the command line using :option:`--variablefile` option, in the settings
585585
table using :setting:`Variables` setting, and dynamically using the
586586
:name:`Import Variables` keyword.
587587

588-
If the above YAML file is imported, it will create exactly the same
589-
variables as the following variable table:
588+
If the above YAML file is imported, it will create exactly the same variables
589+
as this Variable section:
590590

591591
.. sourcecode:: robotframework
592592

@@ -603,7 +603,7 @@ types supported by YAML syntax. If names or values contain non-ASCII
603603
characters, YAML variables files must be UTF-8 encoded.
604604

605605
Mappings used as values are automatically converted to special dictionaries
606-
that are used also when `creating dictionary variables`_ in the variable table.
606+
that are used also when `creating dictionary variables`_ in the Variable section.
607607
Most importantly, values of these dictionaries are accessible as attributes
608608
like `${DICT.one}`, assuming their names are valid as Python attribute names.
609609
If the name contains spaces or is otherwise not a valid attribute name, it is

doc/userguide/src/CreatingTestData/Variables.rst

Lines changed: 22 additions & 20 deletions
Original file line numberDiff line numberDiff line change
@@ -472,11 +472,13 @@ Creating variables
472472

473473
Variables can spring into existence from different sources.
474474

475-
Variable table
476-
~~~~~~~~~~~~~~
475+
.. _Variable sections:
477476

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
480482
allow creating variables in the same place as the rest of the test
481483
data, and the needed syntax is very simple. Their main disadvantages are
482484
that values are always strings and they cannot be created dynamically.
@@ -487,7 +489,7 @@ Creating scalar variables
487489

488490
The simplest possible variable assignment is setting a string into a
489491
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
491493
the second one. If the second column is empty, an empty string is set
492494
as a value. Also an already defined variable can be used in the value.
493495

@@ -525,7 +527,7 @@ Creating list variables
525527
'''''''''''''''''''''''
526528

527529
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
529531
values in the subsequent columns. A list variable can have any number
530532
of values, starting from zero, and if many values are needed, they
531533
can be `split into several rows`__.
@@ -544,7 +546,7 @@ __ `Dividing data to several rows`_
544546
Creating dictionary variables
545547
'''''''''''''''''''''''''''''
546548

547-
Dictionary variables can be created in the variable table similarly as
549+
Dictionary variables can be created in the Variable section similarly as
548550
list variables. The difference is that items need to be created using
549551
`name=value` syntax or existing dictionary variables. If there are multiple
550552
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
598600
the :option:`--variable (-v)` option or using a variable file with the
599601
:option:`--variablefile (-V)` option. Variables set from the command line
600602
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
602604
variable files imported in the test data.
603605

604606
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
722724
as it verifies that list variables can only get a list-like value.
723725

724726
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.
726728
Values in these dictionaries can be accessed using attribute access like
727729
`${dict.first}` in the above example. These dictionaries are also ordered, but
728730
if the original dictionary was not ordered, the resulting order is arbitrary.
@@ -775,7 +777,7 @@ keyword.
775777
Variables set with :name:`Set Suite Variable` keyword are available
776778
everywhere within the scope of the currently executed test
777779
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
779781
importing them from `variable files`_. Other test suites, including
780782
possible child test suites, will not see variables set with this
781783
keyword.
@@ -1062,7 +1064,7 @@ Variable priorities
10621064

10631065
Variables `set in the command line`__ have the highest priority of all
10641066
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
10661068
files, as well as in resource and variable files imported in the
10671069
test data.
10681070

@@ -1076,16 +1078,16 @@ Variable priorities
10761078

10771079
__ `Setting variables in command line`_
10781080

1079-
*Variable table in a test case file*
1081+
*Variable section in a test case file*
10801082

1081-
Variables created using the `Variable table`_ in a test case file
1083+
Variables created using the `Variable section`_ in a test case file
10821084
are available for all the test cases in that file. These variables
10831085
override possible variables with same names in imported resource and
10841086
variable files.
10851087

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
10871089
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
10891091
resource and variable files.
10901092

10911093
*Imported resource and variable files*
@@ -1097,13 +1099,13 @@ __ `Setting variables in command line`_
10971099
variables, the ones in the file imported first are taken into use.
10981100

10991101
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
11011103
variables it imports. All these variables are available for files that
11021104
import this resource file.
11031105

11041106
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
11071109
where the resource files and variable files are imported.
11081110

11091111
*Variables set during test execution*
@@ -1119,7 +1121,7 @@ __ `Setting variables in command line`_
11191121

11201122
`Built-in variables`_ like `${TEMPDIR}` and `${TEST_NAME}`
11211123
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
11231125
the test execution. An exception to this rule are `number variables`_, which
11241126
are resolved dynamically if no variable is found otherwise. They can thus be
11251127
overridden, but that is generally a bad idea. Additionally `${CURDIR}`
@@ -1148,7 +1150,7 @@ Test suite scope
11481150

11491151
Variables with the test suite scope are available anywhere in the
11501152
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`_,
11521154
or set during the test execution using the BuiltIn_ keyword
11531155
:name:`Set Suite Variable`.
11541156

doc/userguide/src/RobotFrameworkUserGuide.rst

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -156,7 +156,6 @@
156156
.. _user keyword timeouts: `User keyword timeout`_
157157
.. _keyword timeout: `User keyword timeout`_
158158
.. _variable: Variables_
159-
.. _Variable tables: `Variable table`_
160159
.. _automatic variable: `Automatic variables`_
161160
.. _test libraries: `Using test libraries`_
162161
.. _test library: `test libraries`_

0 commit comments

Comments
 (0)