Context
Variables are a core part of any Robot Framework suite. They let you store values in one place and reuse them across tests and keywords, which reduces duplication and makes maintenance easier when values change.
Theory
Scalar variables are defined in the *** Variables *** section and referenced with the ${NAME} syntax. A common pattern is to define constants there and then compare them inside test cases using assertion keywords such as Should Be Equal.
Task
- Create a *** Variables *** section.
- Define a scalar variable ${GREETING} with the value Hello, Robot!
- Create a test case named Greeting Test that verifies ${GREETING} equals Hello, Robot!.
Checks
Run your code to see terminal output.
Context
Variables are a core part of any Robot Framework suite. They let you store values in one place and reuse them across tests and keywords, which reduces duplication and makes maintenance easier when values change.
Theory
Scalar variables are defined in the *** Variables *** section and referenced with the ${NAME} syntax. A common pattern is to define constants there and then compare them inside test cases using assertion keywords such as Should Be Equal.
Task
- Create a *** Variables *** section.
- Define a scalar variable ${GREETING} with the value Hello, Robot!
- Create a test case named Greeting Test that verifies ${GREETING} equals Hello, Robot!.