Context
Robot Framework comes with a rich BuiltIn library that is always available. It provides general-purpose keywords for logging, assertions, conversions, and running Python expressions, which means you rarely need external libraries for basic tasks.
Theory
BuiltIn keywords such as Evaluate and Should Be Equal As Integers cover common automation needs. Evaluate runs a Python expression and returns the result, while Should Be Equal As Integers compares two integer values. A keyword can return a value to its caller with [Return].
Task
- Create variables ${A} = 10 and ${B} = 20.
- Create a keyword Calculate Sum that accepts ${a} and ${b}, evaluates ${a} + ${b}, and returns the result.
- Create test cases BuiltIn Test and BuiltIn Test Another that verify Calculate Sum.
Checks
Run your code to see terminal output.
Context
Robot Framework comes with a rich BuiltIn library that is always available. It provides general-purpose keywords for logging, assertions, conversions, and running Python expressions, which means you rarely need external libraries for basic tasks.
Theory
BuiltIn keywords such as Evaluate and Should Be Equal As Integers cover common automation needs. Evaluate runs a Python expression and returns the result, while Should Be Equal As Integers compares two integer values. A keyword can return a value to its caller with [Return].
Task
- Create variables ${A} = 10 and ${B} = 20.
- Create a keyword Calculate Sum that accepts ${a} and ${b}, evaluates ${a} + ${b}, and returns the result.
- Create test cases BuiltIn Test and BuiltIn Test Another that verify Calculate Sum.