aboutsummaryrefslogtreecommitdiffstats
path: root/test/csit/tests
diff options
context:
space:
mode:
Diffstat (limited to 'test/csit/tests')
-rw-r--r--test/csit/tests/portal-sdk/testsuites/test1.robot10
-rw-r--r--test/csit/tests/portal/testsuites/test1.robot2
-rw-r--r--test/csit/tests/sdc/nightly/__init__.robot2
-rw-r--r--test/csit/tests/sdc/nightly/test1.robot16
-rw-r--r--test/csit/tests/sdnc/healthcheck/data/data.json4
-rw-r--r--test/csit/tests/sdnc/healthcheck/data/preload.json41
-rw-r--r--test/csit/tests/sdnc/healthcheck/test1.robot45
7 files changed, 108 insertions, 12 deletions
diff --git a/test/csit/tests/portal-sdk/testsuites/test1.robot b/test/csit/tests/portal-sdk/testsuites/test1.robot
index f3e4017fb..84579d017 100644
--- a/test/csit/tests/portal-sdk/testsuites/test1.robot
+++ b/test/csit/tests/portal-sdk/testsuites/test1.robot
@@ -47,9 +47,14 @@ Portal admin Login To Portal GUI
Portal Admin Navigation Application Link Tab
[Documentation] Logs into Portal GUI as Portal admin
-
Click Element xpath=.//h3[contains(text(),'xDemo App')]/following::div[1]
- Page Should Contain ONAP Portal
+ Go To ${PORTAL_HOME_PAGE}
+ Dismiss Alert accept=false
+ #Scroll Element Into View xpath=//span[@id='tab-Home']
+ #Click Element xpath=//span[@id='tab-Home']
+ #Click Element xpath=(//span[@id='tab-xDemo-App']/following::i[@class='ion-close-round'])[1]
+ Click Element xpath=.//h3[contains(text(),'xDemo App')]/following::div[1]
+
Validate SDK Sub Menu
@@ -72,7 +77,6 @@ Click Sample Pages and validate sub Menu
Click Link xpath=//a[@id='parent-item-Sample-Pages']
Click Link xpath=//a[contains(@title,'Notebook')]
Element Text Should Be xpath=//h1[contains(.,'Notebook')] Notebook
- #Click Link xpath=//a[@id='parent-item-Home']
Click Reports and validate sub Menu
[Documentation] Click Reports Tab
diff --git a/test/csit/tests/portal/testsuites/test1.robot b/test/csit/tests/portal/testsuites/test1.robot
index ab5fed47e..70fdcf0d6 100644
--- a/test/csit/tests/portal/testsuites/test1.robot
+++ b/test/csit/tests/portal/testsuites/test1.robot
@@ -886,7 +886,7 @@ Application admin Logout from Portal GUI
[Documentation] Logout from Portal GUI
Click Element xpath=//div[@id='header-user-icon']
#Set Selenium Implicit Wait 3000
- Click Button xpath=//button[contains(.,'Log out')]
+ Click Button xpath=//button[contains(text(),'Log out')]
#Set Selenium Implicit Wait 3000
Title Should Be Login
diff --git a/test/csit/tests/sdc/nightly/__init__.robot b/test/csit/tests/sdc/nightly/__init__.robot
new file mode 100644
index 000000000..8ee10d5f6
--- /dev/null
+++ b/test/csit/tests/sdc/nightly/__init__.robot
@@ -0,0 +1,2 @@
+*** Settings ***
+Documentation Sdc - HealthCheck
diff --git a/test/csit/tests/sdc/nightly/test1.robot b/test/csit/tests/sdc/nightly/test1.robot
new file mode 100644
index 000000000..6d4dc242d
--- /dev/null
+++ b/test/csit/tests/sdc/nightly/test1.robot
@@ -0,0 +1,16 @@
+*** Settings ***
+Library Collections
+Library OperatingSystem
+Library RequestsLibrary
+Library json
+
+*** Test Cases ***
+Get Requests health check ok
+ [Tags] get
+ CreateSession sdc-be http://localhost:8080
+ ${headers}= Create Dictionary Accept=application/json Content-Type=application/json
+ ${resp}= Get Request sdc-be /sdc2/rest/healthCheck headers=&{headers}
+ Should Be Equal As Strings ${resp.status_code} 200
+ @{ITEMS}= Copy List ${resp.json()['componentsInfo']}
+ : FOR ${ELEMENT} IN @{ITEMS}
+ \ Log ${ELEMENT['healthCheckComponent']} ${ELEMENT['healthCheckStatus']}
diff --git a/test/csit/tests/sdnc/healthcheck/data/data.json b/test/csit/tests/sdnc/healthcheck/data/data.json
new file mode 100644
index 000000000..583e26fb9
--- /dev/null
+++ b/test/csit/tests/sdnc/healthcheck/data/data.json
@@ -0,0 +1,4 @@
+{
+ "input" : {
+ }
+}
diff --git a/test/csit/tests/sdnc/healthcheck/data/preload.json b/test/csit/tests/sdnc/healthcheck/data/preload.json
new file mode 100644
index 000000000..b53afa859
--- /dev/null
+++ b/test/csit/tests/sdnc/healthcheck/data/preload.json
@@ -0,0 +1,41 @@
+{
+ "input": {
+ "vnf-topology-information": {
+ "vnf-topology-identifier": {
+ "service-type": "robot_demo",
+ "vnf-name": "vf_robot_module",
+ "vnf-type": "vf_robot_type",
+ "generic-vnf-name": "generic_vnf_name",
+ "generic-vnf-type": "generic_vnf_type"
+ },
+ "vnf-assignments": {
+ "availability-zones": [],
+ "vnf-networks": [],
+ "vnf-vms": []
+ },
+ "vnf-parameters": [
+ {
+ "vnf-parameter-name": "ngm1_management_ip_0",
+ "vnf-parameter-value":"127.0.0.1"
+ },
+ {
+ "vnf-parameter-name": "ngm2_management_ip_1",
+ "vnf-parameter-value":"127.0.0.2"
+ }
+ ]
+ },
+ "request-information": {
+ "request-id": "robot12",
+ "order-version": "1",
+ "notification-url": "openecomp.org",
+ "order-number": "1",
+ "request-action": "PreloadVNFRequest"
+ },
+ "sdnc-request-header": {
+ "svc-request-id": "robot12",
+ "svc-notification-url": "http:\/\/openecomp.org:8080\/adapters\/rest\/SDNCNotify",
+ "svc-action": "reserve"
+ }
+ }
+}
+
diff --git a/test/csit/tests/sdnc/healthcheck/test1.robot b/test/csit/tests/sdnc/healthcheck/test1.robot
index 1adb9a6b3..4bf3d25e7 100644
--- a/test/csit/tests/sdnc/healthcheck/test1.robot
+++ b/test/csit/tests/sdnc/healthcheck/test1.robot
@@ -1,16 +1,45 @@
*** Settings ***
-Library OperatingSystem
-Library Process
+Library Collections
+Library RequestsLibrary
+Library OperatingSystem
+Library json
+Library String
*** Variables ***
+${SDN_APIDOCS_URI} /apidoc/apis
+${SDN_HEALTHCHECK_OPERATION_PATH} /operations/SLI-API:healthcheck
+${PRELOAD_VNF_TOPOLOGY_OPERATION_PATH} /operations/VNF-API:preload-vnf-topology-operation
-${health_check} ${SCRIPTS}/health_check.sh
+*** Test Cases ***
+Healthcheck API
+ Create Session sdnc http://localhost:8282/restconf
+ ${data}= Get Binary File ${CURDIR}${/}data${/}data.json
+ &{headers}= Create Dictionary Authorization=Basic YWRtaW46S3A4Yko0U1hzek0wV1hsaGFrM2VIbGNzZTJnQXc4NHZhb0dHbUp2VXkyVQ== Content-Type=application/json Accept=application/json
+ ${resp}= Post Request sdnc ${SDN_HEALTHCHECK_OPERATION_PATH} data=${data} headers=${headers}
+ Should Be Equal As Strings ${resp.status_code} 200
+ Should Be Equal As Strings ${resp.json()['output']['response-code']} 200
+
+Check SLI-API
+ Create Session sdnc http://localhost:8282
+ &{headers}= Create Dictionary Authorization=Basic YWRtaW46S3A4Yko0U1hzek0wV1hsaGFrM2VIbGNzZTJnQXc4NHZhb0dHbUp2VXkyVQ== Content-Type=application/json Accept=application/json
+ ${resp}= Get Request sdnc ${SDN_APIDOCS_URI} headers=${headers}
+ Log ${resp.content}
+ Should Contain ${resp.content} SLI-API
-*** Test Cases ***
-Health check test case for SDNC
- [Documentation] Health check
- ${result_hc}= Run Process bash ${health_check} > log_hc.txt shell=yes
- Should Be Equal As Integers ${result_hc.rc} 0
+Check VNF-API
+ Create Session sdnc http://localhost:8282
+ &{headers}= Create Dictionary Authorization=Basic YWRtaW46S3A4Yko0U1hzek0wV1hsaGFrM2VIbGNzZTJnQXc4NHZhb0dHbUp2VXkyVQ== Content-Type=application/json Accept=application/json
+ ${resp}= Get Request sdnc ${SDN_APIDOCS_URI} headers=${headers}
+ Log ${resp.content}
+ Should Contain ${resp.content} VNF-API
+Test Preload
+ Create Session sdnc http://localhost:8282/restconf
+ ${data}= Get Binary File ${CURDIR}${/}data${/}preload.json
+ &{headers}= Create Dictionary Authorization=Basic YWRtaW46S3A4Yko0U1hzek0wV1hsaGFrM2VIbGNzZTJnQXc4NHZhb0dHbUp2VXkyVQ== Content-Type=application/json Accept=application/json
+ ${resp}= Post Request sdnc ${PRELOAD_VNF_TOPOLOGY_OPERATION_PATH} data=${data} headers=${headers}
+ Log ${resp.content}
+ Should Be Equal As Strings ${resp.status_code} 200
+ Should Be Equal As Strings ${resp.json()['output']['response-code']} 200