diff options
Diffstat (limited to 'test/csit/tests')
-rw-r--r-- | test/csit/tests/appc/testsuite/APPC_Netstat.robot | 19 | ||||
-rw-r--r-- | test/csit/tests/appc/testsuite/LCM_HEALTHCHECK.robot | 33 | ||||
-rw-r--r-- | test/csit/tests/appc/testsuite/LCM_VM_RESTART.robot | 31 | ||||
-rw-r--r-- | test/csit/tests/appc/testsuite/LCM_VNF_RESTART.robot | 45 | ||||
-rw-r--r-- | test/csit/tests/cli/startup/startup_check.robot | 2 | ||||
-rw-r--r-- | test/csit/tests/vfc/gvnfm-vnfres/test.robot | 11 | ||||
-rw-r--r-- | test/csit/tests/vfc/nfvo-catalog/test.robot | 2 | ||||
-rw-r--r-- | test/csit/tests/vfc/nfvo-driver-gvnfm/gvnfmdriver.robot | 21 | ||||
-rw-r--r-- | test/csit/tests/vfc/nfvo-driver-gvnfm/jujudriver.robot | 1 | ||||
-rw-r--r-- | test/csit/tests/vfc/nfvo-driver-svnfm/huawei.robot | 16 | ||||
-rw-r--r-- | test/csit/tests/vfc/nfvo-driver-svnfm/ztevmanager.robot | 21 |
11 files changed, 198 insertions, 4 deletions
diff --git a/test/csit/tests/appc/testsuite/APPC_Netstat.robot b/test/csit/tests/appc/testsuite/APPC_Netstat.robot new file mode 100644 index 000000000..5544fb565 --- /dev/null +++ b/test/csit/tests/appc/testsuite/APPC_Netstat.robot @@ -0,0 +1,19 @@ +*** Settings *** +Library SSHLibrary +Library OperatingSystem +*** Variables *** +${HOST} 104.130.138.49 +${USERNAME} test +${private_key} H:\\TestSuite\\testsuite\\robot\\testsuites +*** Test Cases *** +APPC Netstat + Open Connection ${HOST} + ${password}= Get File ${private_key} + Login ${USERNAME} ${password} + log to console \nConnected Successfully + ${cmd} = set variable netstat -a | grep -E '8443 | grep LISTEN + execute command ${cmd} + +Tear Down + [Documentation] Close all connections + Close All connections
\ No newline at end of file diff --git a/test/csit/tests/appc/testsuite/LCM_HEALTHCHECK.robot b/test/csit/tests/appc/testsuite/LCM_HEALTHCHECK.robot new file mode 100644 index 000000000..c3594ef2e --- /dev/null +++ b/test/csit/tests/appc/testsuite/LCM_HEALTHCHECK.robot @@ -0,0 +1,33 @@ +*** Settings *** +Library Selenium2Library +Library OperatingSystem + +*** Variable *** +${ResponseCode} +${var} +${RequestJSON} C:\\RobotSampleForLearning\\LearningSamples\\Resources\\Healthchk.json + + +*** Test Cases *** + +APPC LCM Health check + [Documentation] APPC HealthCheck + Open Browser http://admin:Kp8bJ4SXszM0WXlhak3eHlcse2gAw84vaoGGmJvUy2U@104.130.138.49:8282/apidoc/explorer/index.html chrome + Click Element xpath=.//p[contains(text(),'If you have reason to expect the website is safe, select the I Accept the Risk button to continue.')]//following::img + + Wait Until Page Contains Element xpath=//*[@id="resource_appc-provider-lcm(2016-01-08)"]/div/h2/a + Click Element xpath=//*[@id="resource_appc-provider-lcm(2016-01-08)"]/div/h2/a + + wait until page contains element xpath=//*[@id="resource_appc-provider-lcm(2016-01-08)"]/div/h2/a//following::a[contains(text(),'/operations/appc-provider-lcm:health-check')] + Click Element xpath=//*[@id="resource_appc-provider-lcm(2016-01-08)"]/div/h2/a//following::a[contains(text(),'/operations/appc-provider-lcm:health-check')] + + ${HealthChk}= Get File ${RequestJSON} + wait until page contains element xpath=//*[@id="resource_appc-provider-lcm(2016-01-08)"]/div/h2/a//following::a[contains(text(),'/operations/appc-provider-lcm:health-check')]//following::table + Input Text xpath=//*[@id="resource_appc-provider-lcm(2016-01-08)"]/div/h2/a//following::a[contains(text(),'/operations/appc-provider-lcm:health-check')]//following::table//tbody/tr/td[2]/textarea ${HealthChk} + + wait until page contains element xpath=//*[@id="resource_appc-provider-lcm(2016-01-08)"]/div/h2/a//following::a[contains(text(),'/operations/appc-provider-lcm:health-check')]//following::form/div[2]/input[1] + Click Element xpath=//*[@id="resource_appc-provider-lcm(2016-01-08)"]/div/h2/a//following::a[contains(text(),'/operations/appc-provider-lcm:health-check')]//following::form/div[2]/input[1] + +Tear Down + [Documentation] Close all browsers + Close All Browsers
\ No newline at end of file diff --git a/test/csit/tests/appc/testsuite/LCM_VM_RESTART.robot b/test/csit/tests/appc/testsuite/LCM_VM_RESTART.robot new file mode 100644 index 000000000..997ba17a0 --- /dev/null +++ b/test/csit/tests/appc/testsuite/LCM_VM_RESTART.robot @@ -0,0 +1,31 @@ +*** Settings *** +Library Selenium2Library +Library OperatingSystem + +*** Variable *** +${ResponseCode} +${var} +${RequestJSON} /LearningSamples/Resources/VMRestart.json + + +*** Test Cases *** + +APPC API VM RESTART + [Documentation] APPC VM LCM Restart + Open Browser http://admin:Kp8bJ4SXszM0WXlhak3eHlcse2gAw84vaoGGmJvUy2U@104.130.138.49:8282/apidoc/explorer/index.html chrome + Click Element xpath=.//p[contains(text(),'If you have reason to expect the website is safe, select the I Accept the Risk button to continue.')]//following::img + Click Element xpath=//*[@id="resource_appc-provider-lcm(2016-01-08)"]/div/h2/a + Click Element xpath=//*[@id="appc-provider-lcm(2016-01-08)_restart_post_23"]/div[1]/h3/span[2]/a + ${VM_LCM_RESTART} Get File ${RequestJSON} + Input Text xpath=//*[@id="appc-provider-lcm(2016-01-08)_restart_post_23_content"]/form/table/tbody/tr/td[2]/textarea ${VM_LCM_RESTART} + Click Element xpath=//*[@id="appc-provider-lcm(2016-01-08)_restart_post_23_content"]/form/div[2]/input + # Get Text locator + ${ResponseCode} Get Text xpath=//*[@id="appc-provider-lcm(2016-01-08)_restart_post_23_content"]/div[2]/h4[contains(text(),'Response Code')]//following::div//pre + ${var} Get Value xpath=//*[@id="appc-provider-lcm(2016-01-08)_restart_post_23_content"]/div[2]/h4[contains(text(),'Response Code')]//following::div//pre + Log Value--> ${ResponseCode} + Log var--> ${var} + Element Text Should Be xpath=//*[@id="appc-provider-lcm(2016-01-08)_restart_post_23_content"]/div[2]/h4[contains(text(),'Response Code')]//following::div//pre 400 expected + +Tear Down + [Documentation] Close all browsers + Close All Browsers
\ No newline at end of file diff --git a/test/csit/tests/appc/testsuite/LCM_VNF_RESTART.robot b/test/csit/tests/appc/testsuite/LCM_VNF_RESTART.robot new file mode 100644 index 000000000..1bb2c13eb --- /dev/null +++ b/test/csit/tests/appc/testsuite/LCM_VNF_RESTART.robot @@ -0,0 +1,45 @@ +*** Settings *** +Library Selenium2Library +Library OperatingSystem + +*** Variable *** +${ResponseCode} +${var} +${RequestJSON} C:\\RobotSampleForLearning\\LearningSamples\\Resources\\VNFRestart.json + + +*** Test Cases *** + +APPC API VM RESTART + [Documentation] APPC VM LCM Restart + Open Browser http://admin:Kp8bJ4SXszM0WXlhak3eHlcse2gAw84vaoGGmJvUy2U@104.130.138.49:8282/apidoc/explorer/index.html chrome + Click Element xpath=.//p[contains(text(),'If you have reason to expect the website is safe, select the I Accept the Risk button to continue.')]//following::img + + Wait Until Page Contains Element xpath=//*[@id="resource_appc-provider-lcm(2016-01-08)"]/div/h2/a + Click Element xpath=//*[@id="resource_appc-provider-lcm(2016-01-08)"]/div/h2/a + + + Wait Until Page Contains Element xpath=//*[@id="resource_appc-provider-lcm(2016-01-08)"]/div/h2/a//following::a[contains(text(),'/operations/appc-provider-lcm:restart')] + Click Element xpath=//*[@id="resource_appc-provider-lcm(2016-01-08)"]/div/h2/a//following::a[contains(text(),'/operations/appc-provider-lcm:restart')] + + + ${VNF_LCM_RESTART}= Get File ${RequestJSON} + Wait Until Page Contains Element xpath=//*[@id="resource_appc-provider-lcm(2016-01-08)"]/div/h2/a//following::a[contains(text(),'/operations/appc-provider-lcm:restart')]//following::table + + Input Text xpath=//*[@id="resource_appc-provider-lcm(2016-01-08)"]/div/h2/a//following::a[contains(text(),'/operations/appc-provider-lcm:restart')]//following::table//tbody/tr/td[2]/textarea ${VNF_LCM_RESTART} + + # Wait Until Page Contains Element xpath=//*[@id="resource_appc-provider-lcm(2016-01-08)"]/div/h2/a//following::a[contains(text(),'/operations/appc-provider-lcm:restart')]/form/div[2]/input + Click Element xpath=//*[@id="resource_appc-provider-lcm(2016-01-08)"]/div/h2/a//following::a[contains(text(),'/operations/appc-provider-lcm:restart')]//following::form/div[2]/input[1] + + # Get Text locator + ${ResponseCode} Get Text xpath=//*[@id="resource_appc-provider-lcm(2016-01-08)"]/div/h2/a//following::a[contains(text(),'/operations/appc-provider-lcm:restart')]//following::h4[contains(text(),'Response Code')][1]//following-sibling::div//pre + + # //*[@id="resource_appc-provider-lcm(2016-01-08)"]/div/h2/a//following::a[contains(text(),'/operations/appc-provider-lcm:restart')]//following::h4[contains(text(),'Response Code')]//following-sibling::div//pre + ${var} Get Value xpath=//*[@id="resource_appc-provider-lcm(2016-01-08)"]/div/h2/a//following::a[contains(text(),'/operations/appc-provider-lcm:restart')]//following::h4[contains(text(),'Response Code')][1]//following-sibling::div//pre + Log Value--> ${ResponseCode} + Log var--> ${var} + Element Text Should Be xpath=//*[contains(text(),'/operations/appc-provider-lcm:restart')]//following::h4[text()='Response Code'][1]//following-sibling::div//pre[1] 200 expected + +Tear Down + [Documentation] Close all browsers + Close All Browsers
\ No newline at end of file diff --git a/test/csit/tests/cli/startup/startup_check.robot b/test/csit/tests/cli/startup/startup_check.robot index a10467078..053a6d115 100644 --- a/test/csit/tests/cli/startup/startup_check.robot +++ b/test/csit/tests/cli/startup/startup_check.robot @@ -20,7 +20,7 @@ Check Cli help ${cli_cmd_output}= Run Process ${cli_exec} --help shell=yes Log ${cli_cmd_output.stdout} Should Be Equal As Strings ${cli_cmd_output.rc} 0 - Should Contain ${cli_cmd_output.stdout} ONAP Command-line interface + Should Contain ${cli_cmd_output.stdout} CLI version Check Cli Version Default [Documentation] check cli default version diff --git a/test/csit/tests/vfc/gvnfm-vnfres/test.robot b/test/csit/tests/vfc/gvnfm-vnfres/test.robot index 21ae45996..fb87435be 100644 --- a/test/csit/tests/vfc/gvnfm-vnfres/test.robot +++ b/test/csit/tests/vfc/gvnfm-vnfres/test.robot @@ -9,6 +9,13 @@ Library json ${queryswagger_url} /api/vnfres/v1/swagger.json *** Test Cases *** -NslcmSwaggerTest +VnfresSwaggerTest [Documentation] query vnfres swagger info rest test - Should Be Equal 2.0 2.0 + ${headers} Create Dictionary Content-Type=application/json Accept=application/json + Create Session web_session http://${VNFRES_IP}:8802 headers=${headers} + ${resp}= Get Request web_session ${queryswagger_url} + ${responese_code}= Convert To String ${resp.status_code} + List Should Contain Value ${return_ok_list} ${responese_code} + ${response_json} json.loads ${resp.content} + ${swagger_version}= Convert To String ${response_json['swagger']} + Should Be Equal ${swagger_version} 2.0 diff --git a/test/csit/tests/vfc/nfvo-catalog/test.robot b/test/csit/tests/vfc/nfvo-catalog/test.robot index a23128c90..99dff9bd2 100644 --- a/test/csit/tests/vfc/nfvo-catalog/test.robot +++ b/test/csit/tests/vfc/nfvo-catalog/test.robot @@ -13,7 +13,7 @@ ${queryNSPackages_url} /api/catalog/v1/nspackages *** Test Cases *** GetVNFPackages ${headers} Create Dictionary Content-Type=application/json Accept=application/json - Create Session web_session http://${CATALOG_IP} headers=${headers} + Create Session web_session http://${CATALOG_IP}:8806 headers=${headers} ${resp}= Get Request web_session ${queryVNFPackage_url} ${responese_code}= Convert To String ${resp.status_code} List Should Contain Value ${return_ok_list} ${responese_code} diff --git a/test/csit/tests/vfc/nfvo-driver-gvnfm/gvnfmdriver.robot b/test/csit/tests/vfc/nfvo-driver-gvnfm/gvnfmdriver.robot new file mode 100644 index 000000000..e7dd612a7 --- /dev/null +++ b/test/csit/tests/vfc/nfvo-driver-gvnfm/gvnfmdriver.robot @@ -0,0 +1,21 @@ +*** settings *** +Library Collections +Library RequestsLibrary +Library OperatingSystem +Library json + +*** Variables *** +@{return_ok_list}= 200 201 202 +${queryswagger_url} /api/gvnfmdriver/v1/swagger.json + +*** Test Cases *** +VnfresSwaggerTest + [Documentation] query gvnfmdriver swagger info rest test + ${headers} Create Dictionary Content-Type=application/json Accept=application/json + Create Session web_session http://${GVNFMDRIVER_IP}:8484 headers=${headers} + ${resp}= Get Request web_session ${queryswagger_url} + ${responese_code}= Convert To String ${resp.status_code} + List Should Contain Value ${return_ok_list} ${responese_code} + ${response_json} json.loads ${resp.content} + ${swagger_version}= Convert To String ${response_json['swagger']} + Should Be Equal ${swagger_version} 2.0 diff --git a/test/csit/tests/vfc/nfvo-driver-gvnfm/jujudriver.robot b/test/csit/tests/vfc/nfvo-driver-gvnfm/jujudriver.robot new file mode 100644 index 000000000..8b1378917 --- /dev/null +++ b/test/csit/tests/vfc/nfvo-driver-gvnfm/jujudriver.robot @@ -0,0 +1 @@ + diff --git a/test/csit/tests/vfc/nfvo-driver-svnfm/huawei.robot b/test/csit/tests/vfc/nfvo-driver-svnfm/huawei.robot new file mode 100644 index 000000000..3277e7782 --- /dev/null +++ b/test/csit/tests/vfc/nfvo-driver-svnfm/huawei.robot @@ -0,0 +1,16 @@ +*** settings *** +Library Collections +Library RequestsLibrary +Library simplejson +Library OperatingSystem +Library json +Library HttpLibrary.HTTP + +*** Variables *** +@{return_ok_list}= 200 201 202 +${queryswagger_url} /api/hwvnfm/v1/swagger.json + +*** Test Cases *** +SwaggerFuncTest + [Documentation] query swagger info rest test + Should Be Equal 2.0 2.0 diff --git a/test/csit/tests/vfc/nfvo-driver-svnfm/ztevmanager.robot b/test/csit/tests/vfc/nfvo-driver-svnfm/ztevmanager.robot new file mode 100644 index 000000000..7d7d305b1 --- /dev/null +++ b/test/csit/tests/vfc/nfvo-driver-svnfm/ztevmanager.robot @@ -0,0 +1,21 @@ +*** settings *** +Library Collections +Library RequestsLibrary +Library OperatingSystem +Library json + +*** Variables *** +@{return_ok_list}= 200 201 202 +${queryswagger_url} /api/ztevmanagerdriver/v1/swagger.json + +*** Test Cases *** +VnfresSwaggerTest + [Documentation] query ztevmanagerdriver swagger info rest test + ${headers} Create Dictionary Content-Type=application/json Accept=application/json + Create Session web_session http://${ZTEVMANAGERDRIVER_IP}:8410 headers=${headers} + ${resp}= Get Request web_session ${queryswagger_url} + ${responese_code}= Convert To String ${resp.status_code} + List Should Contain Value ${return_ok_list} ${responese_code} + ${response_json} json.loads ${resp.content} + ${swagger_version}= Convert To String ${response_json['swagger']} + Should Be Equal ${swagger_version} 2.0 |