@@ -1313,8 +1313,7 @@ __ `User keyword teardown`_
1313
1313
`GROUP ` syntax
1314
1314
--------------
1315
1315
1316
- Robot Framework 7.2 introduced the `GROUP ` syntax that allows grouping related
1317
- keywords and control structures together:
1316
+ The `GROUP ` syntax allows grouping related keywords and control structures together:
1318
1317
1319
1318
.. sourcecode :: robotframework
1320
1319
@@ -1333,19 +1332,22 @@ keywords and control structures together:
1333
1332
END
1334
1333
1335
1334
As the above example demonstrates, groups can have a name, but the name is
1336
- optional. Groups can be nested freely with each others and also with other control
1337
- structures.
1335
+ optional. Groups can be nested freely with each others and also with other
1336
+ control structures.
1338
1337
1339
- Notice that reusable `user keywords `_ are in general recommended over the `GROUP `
1340
- syntax, but if there are no reusing possibilities, named groups give similar benefits.
1341
- For example, in the log file the end result is exactly the same except that there is
1342
- a `GROUP ` label instead of a `KEYWORD ` label.
1338
+ `User keywords `_ are in general recommended over the `GROUP ` syntax, because
1339
+ they are reusable and they simplify tests or keywords where they are used by
1340
+ hiding and encapsulating lower level details. In the log file user keywords
1341
+ and groups look the same, though, except that instead of a `KEYWORD ` label
1342
+ there is a `GROUP ` label.
1343
1343
1344
- All groups within a test or a user keyword share the same variable namespace.
1344
+ All groups within a test or a keyword share the same variable namespace.
1345
1345
This means that, unlike when using keywords, there is no need to use arguments
1346
1346
or return values for sharing values. This can be a benefit in simple cases,
1347
- but if there are lot of variables, the benefit can turn into a problem and cause
1348
- a huge mess.
1347
+ but if there are lot of variables, the benefit can turn into a problem and
1348
+ cause a huge mess.
1349
+
1350
+ .. note :: The `GROUP` syntax is new in Robot Framework 7.2.
1349
1351
1350
1352
`GROUP ` with templates
1351
1353
~~~~~~~~~~~~~~~~~~~~~~
@@ -1389,7 +1391,6 @@ be added similarly also by `listeners`_ that use the `listener API version 3`__.
1389
1391
1390
1392
.. sourcecode :: python
1391
1393
1392
-
1393
1394
from robot.api import SuiteVisitor
1394
1395
1395
1396
0 commit comments