1.7. "Global" Suite Setup and Suite Teardown
Goal
- Define a suite setup, which executes before the first test case. The suite setup should log the following:
Our Robot awesomeness begins!
. - Define a suite teardown, which will execute after the last test case. The suite teardown should log the following:
The end of the awesomeness!
.
Solution
Hints
You can set Suite Setup
and Suite Teardown
in *** Settings ***
table. If you have a test suite which was created from a directory (a folder containing suite file(s) and folder(s)), you can define setup and teardown for that suite with using an initialization file.
Solution: tests/__init__.robot
1 2 3 4 5 6 7 8 9 10 |
|
Results
Inside the tests
folder, execute the following command.
1 |
|
You can check the generated log.html
file to see how your test cases worked.
Last update: June 22, 2020