| shuffleQuestions | false |
|---|---|
| shuffleAnswers | true |
LO-1.1 Recall the two main Use-Cases of Robot Framework
- Robot Framework supports both test automation and robotic process automation (RPA)
- Robot Framework was originally developed specifically for unit testing.
Initially designed for acceptance testing
- Robot Framework's keyword-driven approach makes it accessible to users with minimal programming skills.
- Robot Framework can automate interactions with various technologies, such as APIs and databases.
- Robot Framework is not extensible.
RF can be extended with keyword libraries
Which TWO of the following are key attributes of Robot Framework's syntax that contribute to its simplicity and human-readability?
LO-1.3 Recall the key attributes of the syntax that makes Robot Framework simple and human-readable
- Use of complex nested structures is not possible.
Robot Framework avoids complex nested structures but they can be used.
- Focus on the use of specialized symbols and character sequences as syntax.
Specialized symbols and character sequences are kept to a minimum to improve readability. Robot Framework emphasizes clarity over complexity.
- String first syntax where all arguments are strings unless explicitly stated otherwise.
Unquoted strings are considered as strings, while variables need special syntax like
{variable}or integers like${42}. - There are no programming control flows such as if statements and for loops.
Control flows are present in Robot Framework as described in
LO-5.2.X. - Reduced use of special characters.
Compared to programming languages the focus is on reducing special characters, making the syntax human-readable and user-friendly.
LO-2.1.2.3 Understand the purpose of the
*** Test Cases ***or*** Tasks ***section.
- The section can be used in resource files.
Not allowed in resource files
- The section can only have keyword calls in them.
Syllabus chapter mentions multiple settings (also control flows, var assigns, groups)
- The section is not mandatory in a suite file.
One kind of this section is mandatory in suite files
- The section defines the executable elements of a suite.
LO-2.2.1 Understand and apply the mechanics of indentation and separation in Robot Framework.
-
*** Settings ***Items have no bodies requiring indentation
-
*** Variables ***Items have no bodies requiring indentation
-
*** Test Cases ***Keywork calls in the body of a test case are indented.
-
*** Keywords ***Keywork calls in the body of a keyword are indented.
-
*** Comments ***Contents are completely ignored
LO-2.3.2 Explain the execution artifacts generated by Robot Framework.
- Configuration files (
robot.yaml)Configuration files are not generated as a result of test execution, but are rather part of the project setup and development.
- Log files (
log.html)A detailed log file that provides an HTML view of the execution, including keyword-level details.
- Resource files (
keywords.resource)Resource files are used by Robot Framework but are not created as execution artifacts; they are components used by tests.
- Report files (
report.html)A summary report that gives an overview of the execution results, including statistics of tests|tasks executed, passed, and failed.
- Output files (
output.xml)A machine-readable file containing ALL logged execution details, limited by the given log-level.
LO-3.2.1-1 Recall the four syntactical access types to variables with their prefixes
Given the following prefixes:
1. `@`
2. `$`
3. `%`
4. `&`
Match the variable prefixes to their correct descriptions:
(Use Drag&Drop to match)
- Store multiple values in a list structure
- Store values as a single entity
- Read access to an environment variable.
- Store key-value pairs in a dictionary structure.
LO-4.2.2-1 Recall key characteristics, benefits, and syntax of Test|Task Teardown
- When
Test|Task Teardownfails, the test|task is marked as failed in reports and logs. -
Test|Task Teardownruns only when the Test|Task passes.Teardowns run always, even if a preceding keyword fails.
- All keywords within the
Test|Task Teardownare executed, even when one of them fails. -
Test|Task Teardownmust be set separately for each test|task.You can use the setting
Test TeardownorTask Teardownin the*** Settings ***section to define a teardown for all tests|tasks in the suite which do not have a locally define Teardown with the[Teardown]setting.
LO-4.4 Recall the purpose of Test|Task Tags in Robot Framework
- Tags are case-sensitive labels used for grouping suites and tests|tasks.
Tags are case-insensitive and only used for tests|tasks or keywords.
- Tags are assigned to suites to create a statistical summary of the suite results.
Tags are assigned to tests|tasks, not to suites, even though a default can be configured in the suite setting, which result in automatic tagging of all tests|tasks within that suite.
- Tags offer a simple mechanism for classifying and controlling the execution of tests|tasks.
- Only pre-defined tags, such as
smoke,regression, andcriticalcan be assigned to tests|tasksTags are free-form text labels.
Read the keyword explanation carefully to understand the given scenario!
Arguments
* messages
Documentation
Logs the given messages as separate entries using the INFO level.
Supports also logging list and dictionary variable items individually.
The following Variables are available to each test case.
*** Variables ***
@{user_names} Alice Bob Charlie
&{name_id_pairs} Alice=001 Bob=002 Charlie=003LO-5.1.4.2 Recall that
@{list}unpacks the values of a list variable when accessed
- ```robot
*** Test Cases ***
Test A
Log Many Alice Bob Charlie
> 'Logs three entries: "Alice", "Bob", and "Charlie".' - ```robot
*** Test Cases ***
Test B
Log Many ${user_names}
> This logs a single entry: the string representation of the list. > > It logs: `['Alice', 'Bob', 'Charlie']` - ```robot
*** Test Cases ***
Test C
Log Many @{user_names}
> Logs three entries: `Alice`, `Bob`, and `Charlie`. - ```robot
*** Test Cases ***
Test D
Log Many @{name_id_pairs}
> Logs three entries: `Alice`, `Bob`, and `Charlie` > this is a rare use case but if dictionaries are unpacked as list, it is a list of its keys.
LO-5.1.6 Recall that Robot Framework provides access to execution information via Built-In variables
- An absolute path to the directory where the current suite or resource file is located.
Description for
${CURDIR} - An absolute path to the directory where test execution was started from.
- An absolute path to the directory where output files are written.
Description for
${OUTPUT_DIR}. - An absolute path to the system temporary directory.
Description for
${TEMPDIR}.