Skip to content

Commit 0b99daf

Browse files
Merge branch 'main' into updated-explanation-and-examples
2 parents b4d61d9 + 7f8d557 commit 0b99daf

23 files changed

Lines changed: 1244 additions & 190 deletions

Glossary_wip.md

Lines changed: 0 additions & 27 deletions
This file was deleted.

LOs.csv

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -50,7 +50,7 @@ LO-2.5.2.3,(K1),Recall the concept of keywords with embedded arguments used in B
5050
LO-2.5.2.4,(K1),"Recall how ""Positional or Named Arguments"" are marked in the documentation and their use case.",,,
5151
LO-2.5.2.5,(K1),"Recall how ""Variable Number of Positional Arguments"" are marked in the documentation and their use case.",,,
5252
LO-2.5.2.6,(K1),"Recall what properties ""Named-Only Arguments"" have and how they are documented.",,,
53-
LO-2.5.2.7,(K1),Recall how free named arguments are marked in documentation.,,,
53+
LO-2.5.2.7,(K1),"Recall how ""Free Named Arguments"" are marked in documentation.",,,
5454
LO-2.5.2.8,(K2),Understand the concept of argument types and automatic type conversion.,,,
5555
LO-2.5.2.9,(K2),Understand the concept of return type hints.,,,
5656
LO-2.5.3,(K2),Understand how to read keyword documentation and how to interpret the examples.,,,

README.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -113,7 +113,7 @@
113113
- [`2.5.2.6 Named-Only Arguments`](website/docs/chapter-02/05_keyword_interface.md#2526-named-only-arguments)
114114
- LO-2.5.2.6 (K1) Recall what properties "Named-Only Arguments" have and how they are documented.
115115
- [`2.5.2.7 Free Named Arguments`](website/docs/chapter-02/05_keyword_interface.md#2527-free-named-arguments)
116-
- LO-2.5.2.7 (K1) Recall how free named arguments are marked in documentation.
116+
- LO-2.5.2.7 (K1) Recall how "Free Named Arguments" are marked in documentation.
117117
- [`2.5.2.8 Argument Types`](website/docs/chapter-02/05_keyword_interface.md#2528-argument-types)
118118
- LO-2.5.2.8 (K2) Understand the concept of argument types and automatic type conversion.
119119
- [`2.5.2.9 Return Types`](website/docs/chapter-02/05_keyword_interface.md#2529-return-types)

website/.gitignore

Lines changed: 10 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -8,6 +8,16 @@
88
.docusaurus
99
.cache-loader
1010

11+
# Build artifacts - TypeScript compiled JS files from TS sources
12+
docusaurus.config.js
13+
sidebars.js
14+
/src/components/**/*.js
15+
/src/pages/**/*.js
16+
/src/theme/**/*.js
17+
# Keep these JS files that are source files, not build artifacts:
18+
!/src/components/Quiz/quizPrebuild.js
19+
!/src/remark/*.js
20+
1121
# Misc
1222
.DS_Store
1323
.env.local

website/docs/chapter-01/04_styles.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -16,7 +16,7 @@ While **Keyword-Driven Testing (KDT)** and **Behavior-Driven Development (BDD)**
1616

1717
Both styles can be mixed, even within the same test or task, but it is strongly recommended to have separate styles for separate purposes and not mix them within the same body.
1818
One practical solution would be to define acceptance test cases that cover users' expectations in a declarative *Behavior-Driven Style*, while using keywords that are implemented in an imperative *Keyword-Driven style*.
19-
Further system level test cases, that are not covering acceptance criteria could be written in a *Keyword-Driven style*.
19+
Further system level :term[test cases]{term="Test Case"}, that are not covering acceptance criteria could be written in a *Keyword-Driven style*.
2020

2121
The approach of both styles is different in that way,
2222
that the *Behavior-Driven Style* is a **declarative** specification,

website/docs/chapter-02/05_keyword_interface.md

Lines changed: 27 additions & 25 deletions
Original file line numberDiff line numberDiff line change
@@ -70,14 +70,15 @@ All of them can be called positionally or by name.
7070

7171
![Set To Dictionary Keyword Documentation](/img/Set_To_Dictionary_part_1.png)
7272

73-
This keyword has one :term[Mandatory Arguments]{tooltipMd="An **Argument** that must be set.<br/>See [Mandatory Args](chapter-03/user_keyword)"} `dictionary` which can be called positionally or by name.
73+
This keyword has one :term[Mandatory Argument] `dictionary` which can be called positionally or by name. See [Mandatory Args](chapter-03/user_keyword).
7474
The latter two arguments are optional and can be used depending on the style of defining keys and values the user likes most.
7575

76-
The argument `key_value_pairs` is a "Variable Number of Positional Arguments" and can only be set by position.
76+
The argument `key_value_pairs` is a :term[Variable Number of Positional Arguments] and can only be set by position.
7777
Therefore, if it shall be set, all preceding arguments must be set by position as well.
7878
See [2.5.2.5 Variable Number of Positional Arguments](chapter-02/05_keyword_interface.md#2525-variable-number-of-positional-arguments) for more information about this kind of argument.
7979

80-
The argument `items` is a "Free Named Argument" and can only be set by names.
80+
The argument `items` is a :term[Free Named Argument] and can only be set by names.
81+
8182
See [2.5.2.7 Free Named Arguments](chapter-02/05_keyword_interface.md#2527-free-named-arguments) for more information about this kind of argument.
8283

8384

@@ -92,11 +93,11 @@ See [2.5.2.7 Free Named Arguments](chapter-02/05_keyword_interface.md#2527-free-
9293
This keyword has 2 "Mandatory Arguments" that can be called positionally or by name.
9394
The last two arguments are optional.
9495

95-
The argument `groups` is a "Variable Number of Positional Arguments" and can only be set by position.
96+
The argument `groups` is a :term[Variable Number of Positional Arguments] and can only be set by position.
9697
Therefore, if it shall be set, all preceding arguments must be set by position as well.
9798
See [2.5.2.5 Variable Number of Positional Arguments](chapter-02/05_keyword_interface.md#2525-variable-number-of-positional-arguments) for more information about this kind of argument.
9899

99-
The argument `flags` is a "Named-Only Argument" and can only be set by name.
100+
The argument `flags` is a :term[Named-Only Argument] and can only be set by name.
100101
See [2.5.2.6 Named-Only Arguments](chapter-02/05_keyword_interface.md#2526-named-only-arguments) for more information about this kind of argument.
101102

102103

@@ -118,20 +119,20 @@ The more business oriented keywords are the less arguments they typically have.
118119
Keyword arguments can be grouped into different argument kinds.
119120
On the one hand you can group them by their definition attributes and on the other hand by their usage kind.
120121

121-
The relevant distinction of usage kinds is between using **Positional Arguments**, **Named Arguments**, or **Embedded Arguments**.
122+
The relevant distinction of usage kinds is between using :term[Positional Arguments]{term="Positional Argument"}, :term[Named Arguments]{term="Named Argument"}, or :term[Embedded Arguments]{term="Embedded Argument"}.
122123
How to use them is described in [2.6 Writing Test|Task and Calling Keywords](chapter-02/06_writing_test.md).
123124

124125
Another important information is if an argument is mandatory or optional.
125126
See the next two sections for more information about these two kinds of arguments.
126127

127128
Most arguments can either be set by their position or by their name.
128-
But there are some kinds of arguments that can only be set positionally, like **Variable Number of Positional Arguments**, or only be set named, like **Named-Only Arguments** or **Free Named Arguments**.
129+
But there are some kinds of arguments that can only be set positionally, like :term[Variable Number of Positional Arguments], or only be set named, like :term[Named-Only Arguments]{term="Named-Only Argument"} or :term[Free Named Arguments]{term="Free Named Argument"}.
129130

130131
The order is as follows:
131-
1. **Positional or Named Arguments** (can be mandatory or optional)
132-
2. **Variable Number of Positional Arguments** (optional)
133-
3. **Named-Only Arguments** (can be mandatory or optional)
134-
4. **Free Named Arguments** (optional)
132+
1. :term[Positional or Named Arguments]{term="Positional or Named Argument"} (can be mandatory or optional)
133+
2. :term[Variable Number of Positional Arguments] (optional)
134+
3. :term[Named-Only Arguments]{term="Named-Only Argument"} (can be mandatory or optional)
135+
4. :term[Free Named Arguments]{term="Free Named Argument"} (optional)
135136

136137
### 2.5.2.1 Mandatory Arguments
137138

@@ -189,7 +190,7 @@ Arguments that have a default value can be omitted when the keyword is called, c
189190
These arguments are listed after the mandatory arguments in the argument interface.
190191
Default values are defined and represented in the docs by the equal sign `=` after the argument name and a value after that.
191192

192-
Also "Variable Number of Positional Arguments", represented with a single star (`*`) prefix, and "Free Named Arguments", represented with a double star (`**`) prefix are optional arguments.
193+
Also :term[Variable Number of Positional Arguments], represented with a single star (`*`) prefix, and :term[Free Named Arguments]{term="Free Named Argument"}, represented with a double star (`**`) prefix are optional arguments.
193194

194195
E.g. the argument `msg` in the `Should Be Equal` keyword documentation has the default value `None` and `ignore_case` has the default value `False`.
195196

@@ -233,7 +234,7 @@ Foundation Page should be Accessible
233234
And the url should be https://robotframework.org/foundation
234235
```
235236
The optional prefixes `Given`, `When`, `Then`, `And` and `But` are basically ignored by Robot Framework if a keyword is found matching the rest of the name including the embedded arguments.
236-
In the example test case some keywords are designed so that the arguments are surrounded by double quotes (`"`) for better visibility.
237+
In the example :term[test case] some keywords are designed so that the arguments are surrounded by double quotes (`"`) for better visibility.
237238

238239
A mix of embedded arguments and "normal" arguments is possible to fully support BDD.
239240
In the keyword documentation the embedded arguments are written in variable syntax with dollar-curly-braces (`${var_name}`) to indicate that they are not part of the keyword name but are arguments.
@@ -253,7 +254,7 @@ Recall how "Positional or Named Arguments" are marked in the documentation and t
253254
::::
254255

255256
Except for "Positional-Only Arguments", which are not part of this syllabus,
256-
all arguments that are positioned before "Variable Number of Positional Arguments", "Named-Only Arguments", or "Free Named Arguments" in the argument interface of a keyword are "Positional or Named Arguments".
257+
all arguments that are positioned before :term[Variable Number of Positional Arguments], :term[Named-Only Arguments]{term="Named-Only Argument"}, or :term[Free Named Arguments]{term="Free Named Argument"} in the argument interface of a keyword are :term[Positional or Named Arguments]{term="Positional or Named Argument"}.
257258

258259
As their name states, they can be set either by their position or by their name, but not by both at the same time for one argument.
259260
If an argument shall be set by its position, all preceding arguments must be set by their position as well.
@@ -275,7 +276,7 @@ Recall how "Variable Number of Positional Arguments" are marked in the documenta
275276

276277
::::
277278

278-
A special case of optional arguments that can only be set by their position are "Variable Number of Positional Arguments".
279+
A special case of optional arguments that can only be set by their position are :term[Variable Number of Positional Arguments].
279280
These are also referred to as `*args` or `*varargs` in Python.
280281
Some keywords need to collect a variable amount of values into one argument, because it is not possible to define the amount of values in advance.
281282

@@ -286,8 +287,9 @@ Depending on the number of keys and values, different amount of arguments are ne
286287
This key_value_pairs argument is marked with a single asterisk `*` before the argument name in the keyword documentation.
287288

288289
When calling this keyword, the first positional argument is assigned to `dictionary`, while all subsequent positional arguments are collected into `key_value_pairs`.
289-
Because of this behavior, no additional positional arguments can be used after these "Variable Number of Positional Arguments".
290-
As a result, any arguments following these "Variable Number of Positional Arguments" must be named arguments,
290+
Because of this behavior, no additional positional arguments can be used after these :term[Variable Number of Positional Arguments].
291+
As a result, any arguments following these :term[Variable Number of Positional Arguments] must be named arguments,
292+
291293
regardless of whether they are mandatory or optional arguments with a default value.
292294

293295
Example adding items to a dictionary using the `key_value_pairs` argument:
@@ -313,30 +315,30 @@ Recall what properties "Named-Only Arguments" have and how they are documented.
313315

314316
::::
315317

316-
All arguments that are defined after a "Variable Number of Positional Arguments" (`*varargs`) are "Named-Only Arguments".
317-
However it is also possible to create "Named-Only Arguments without a preceding "Variable Number of Positional Arguments".
318+
All arguments that are defined after a :term[Variable Number of Positional Arguments] (`*varargs`) are :term[Named-Only Arguments]{term="Named-Only Argument"}.
319+
However it is also possible to create :term[Named-Only Arguments]{term="Named-Only Argument"} without a preceding :term[Variable Number of Positional Arguments].
318320

319-
"Named-Only Arguments" are marked with a "LABEL" sign `🏷` before the argument name in the keyword documentation.
321+
:term[Named-Only Arguments]{term="Named-Only Argument"} are marked with a "LABEL" sign `🏷` before the argument name in the keyword documentation.
320322

321-
Those arguments can not be set positionally. All positional values would be consumed by the "Variable Number of Positional Arguments".
323+
Those arguments can not be set positionally. All positional values would be consumed by the :term[Variable Number of Positional Arguments].
322324
So they must be called by their name followed by an equal sign `=` and the value of the argument.
323325

324-
"Named-Only Arguments" can be mandatory or optional with a default value.
326+
:term[Named-Only Arguments]{term="Named-Only Argument"} can be mandatory or optional with a default value.
325327

326328
### 2.5.2.7 Free Named Arguments
327329

328330
::::lo[Learning Objectives]
329331

330332
:::K1[LO-2.5.2.7]
331333

332-
Recall how free named arguments are marked in documentation.
334+
Recall how "Free Named Arguments" are marked in documentation.
333335

334336
:::
335337

336338
::::
337339

338-
Another special case of "Named-Only Arguments" are "Free Named Arguments."
339-
These arguments are similar to the "Variable Number of Positional Arguments" in that they can collect multiple values.
340+
Another special case of :term[Named-Only Arguments]{term="Named-Only Argument"} are :term[Free Named Arguments]{term="Free Named Argument"}.
341+
These arguments are similar to the :term[Variable Number of Positional Arguments] in that they can collect multiple values.
340342
However, instead of collecting positional values, they gather all named values that are not explicitly defined as argument names.
341343
In this case all values given to the keyword as arguments, that do contain an unescaped equal sign (`=`) are considered as named arguments.
342344

0 commit comments

Comments
 (0)