You Wang | 3964e84 | 2016-12-09 12:04:32 -0800 | [diff] [blame] | 1 | *** Settings *** |
You Wang | ebdf53e | 2017-01-03 16:34:29 -0800 | [diff] [blame] | 2 | Documentation Test suite for checking default services |
You Wang | 3964e84 | 2016-12-09 12:04:32 -0800 | [diff] [blame] | 3 | Suite Setup Read InputFile |
| 4 | Test Template Verify Service Sanity |
| 5 | Library Collections |
| 6 | Library String |
| 7 | Library OperatingSystem |
| 8 | Library XML |
| 9 | Library RequestsLibrary |
| 10 | Library ../Framework/utils/utils.py |
| 11 | Library ../Framework/restApi.py |
| 12 | |
| 13 | *** Variables *** |
| 14 | ${USER} admin |
| 15 | ${PASSWORD} admin |
| 16 | ${PATHFILE} ${CURDIR}/data/defaultServices.json |
| 17 | |
| 18 | *** Test Cases *** TYPE |
| 19 | Test Service Sanity SANITY |
| 20 | |
| 21 | *** Keywords *** |
| 22 | Read InputFile |
| 23 | ${serviceList}= utils.jsonToList ${PATHFILE} ServiceInfo |
| 24 | Set Suite Variable ${slist} ${serviceList} |
| 25 | |
| 26 | Verify Service Sanity |
| 27 | [Arguments] ${type} |
| 28 | Run Keyword If "${type}" == "SANITY" Test Service Sanity |
| 29 | |
| 30 | Test Service Sanity |
| 31 | ${json_result}= restApi.ApiGet CORE_SERVICES |
| 32 | Log ${json_result} |
| 33 | ${serviceList}= Get Variable Value ${slist} |
| 34 | ${test_result}= utils.compare_list_of_dicts ${serviceList} ${json_result} |
| 35 | Should Be True ${test_result} |