Pamela Dragosh | f1f7c51 | 2017-08-03 13:31:15 +0000 | [diff] [blame] | 1 | *** Settings *** |
| 2 | Library OperatingSystem |
| 3 | Library RequestsLibrary |
| 4 | |
| 5 | *** Variables *** |
| 6 | ${MESSAGE} Hello, world! |
| 7 | |
| 8 | *** Test Cases *** |
| 9 | String Equality Test |
| 10 | Should Be Equal ${MESSAGE} Hello, world! |
| 11 | |
| 12 | Dir Test |
| 13 | [Documentation] Check if /tmp exists |
| 14 | Log ${MESSAGE} |
| 15 | CheckDir /tmp |
| 16 | |
| 17 | Url Test |
| 18 | [Documentation] Check if google.com can be reached |
| 19 | CheckUrl http://www.google.com |
| 20 | |
| 21 | *** Keywords *** |
| 22 | CheckDir |
| 23 | [Arguments] ${path} |
| 24 | Directory Should Exist ${path} |
| 25 | |
| 26 | CheckUrl |
| 27 | [Arguments] ${url} |
| 28 | Create Session session ${url} |
| 29 | ${resp}= Get Request session / |
| 30 | Should Be Equal As Integers ${resp.status_code} 200 |