Context
Setups keep test cases focused on what they verify by moving preparation into a named keyword. They are executed before the test body, making preconditions explicit and reusable across multiple tests.
Theory
A test-level setup is declared inside a test case with the [Setup] setting followed by a keyword call. Robot Framework runs that keyword first; only if it succeeds does the rest of the test execute. This separates preparation from the actual verification steps.
Task
- Create a *** Keywords *** section with a keyword Log Start.
- Log Start should log Starting test...
- Create a test case named Setup Test that uses [Setup] to call Log Start.
Checks
Run your code to see terminal output.
Context
Setups keep test cases focused on what they verify by moving preparation into a named keyword. They are executed before the test body, making preconditions explicit and reusable across multiple tests.
Theory
A test-level setup is declared inside a test case with the [Setup] setting followed by a keyword call. Robot Framework runs that keyword first; only if it succeeds does the rest of the test execute. This separates preparation from the actual verification steps.
Task
- Create a *** Keywords *** section with a keyword Log Start.
- Log Start should log Starting test...
- Create a test case named Setup Test that uses [Setup] to call Log Start.