summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorDR695H <dr695h@att.com>2019-07-29 17:18:49 -0400
committerDR695H <dr695h@att.com>2019-07-29 17:18:49 -0400
commit63e3c4bfd4d38e02e355019bb0ce2d7410481c4b (patch)
treec81bf20779eff19bdfb5a975e14340282a3503f3
parentc0cf6a4765212cc66e364fa0eb43a2447366ce5b (diff)
dont use outdated locator
Issue-ID: TEST-174 Change-Id: Iddff8eaec3300c3dc9485a18f46fe57296c8835c Signed-off-by: DR695H <dr695h@att.com>
-rw-r--r--ete-k8s2.sh62
-rwxr-xr-xeteHelm-k8s.sh50
-rw-r--r--robot/resources/vid/create_service_instance.robot2
-rw-r--r--robot/resources/vid/create_vid_vnf.robot25
-rw-r--r--robot/resources/vid/teardown_vid.robot5
5 files changed, 15 insertions, 129 deletions
diff --git a/ete-k8s2.sh b/ete-k8s2.sh
deleted file mode 100644
index 1eaaa56e..00000000
--- a/ete-k8s2.sh
+++ /dev/null
@@ -1,62 +0,0 @@
-# Copyright © 2018 Amdocs, Bell Canada
-#
-# Licensed under the Apache License, Version 2.0 (the "License");
-# you may not use this file except in compliance with the License.
-# You may obtain a copy of the License at
-#
-# http://www.apache.org/licenses/LICENSE-2.0
-#
-# Unless required by applicable law or agreed to in writing, software
-# distributed under the License is distributed on an "AS IS" BASIS,
-# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
-# See the License for the specific language governing permissions and
-# limitations under the License.
-
-#!/bin/bash
-
-#################################################################
-#################################################################
-#################################################################
-#
-# Example script that uses second openstack tenant for VNFs
-# Put modified vm_properties2.py and integration_preload_parameter2.py
-# in /tmp
-# ./ete-k8s2.sh onap <tag>
-#
-#################################################################
-#################################################################
-#################################################################
-#################################################################
-
-#
-# Run the testsuite for the passed robot tag.
-# Please clean up logs when you are done...
-#
-if [ "$1" == "" ] || [ "$2" == "" ]; then
- echo "Usage: ete-k8s2.sh [namespace] [tag]"
- exit
-fi
-
-set -x
-
-export NAMESPACE="$1"
-
-POD=$(kubectl --namespace $NAMESPACE get pods | sed 's/ .*//'| grep robot)
-
-
-TAGS="-i $2"
-
-if [ "$3" ]; then
- VARIABLES="-v $3"
-fi
-
-ETEHOME=/var/opt/ONAP
-export GLOBAL_BUILD_NUMBER=$(kubectl --namespace $NAMESPACE exec ${POD} -- bash -c "ls -1q /share/logs/ | wc -l")
-OUTPUT_FOLDER=$(printf %04d $GLOBAL_BUILD_NUMBER)_ete_$2
-DISPLAY_NUM=$(($GLOBAL_BUILD_NUMBER + 90))
-
-#VARIABLEFILES="-V /share/config/vm_properties.py -V /share/config/integration_robot_properties.py -V /share/config/integration_preload_parameters.py"
-VARIABLEFILES="-V /tmp/vm_properties2.py -V /share/config/integration_robot_properties.py -V /tmp/integration_preload_parameters2.py"
-VARIABLES="$VARIABLES -v GLOBAL_BUILD_NUMBER:$$"
-
-kubectl --namespace $NAMESPACE exec ${POD} -- ${ETEHOME}/runTags.sh ${VARIABLEFILES} ${VARIABLES} -d /share/logs/${OUTPUT_FOLDER} ${TAGS} --display $DISPLAY_NUM
diff --git a/eteHelm-k8s.sh b/eteHelm-k8s.sh
deleted file mode 100755
index 0fa8e94f..00000000
--- a/eteHelm-k8s.sh
+++ /dev/null
@@ -1,50 +0,0 @@
-# Copyright (c) 2017 AT&T Intellectual Property. All rights reserved.
-#
-# Licensed under the Apache License, Version 2.0 (the "License");
-# you may not use this file except in compliance with the License.
-# You may obtain a copy of the License at
-#
-# http://www.apache.org/licenses/LICENSE-2.0
-#
-# Unless required by applicable law or agreed to in writing, software
-# distributed under the License is distributed on an "AS IS" BASIS,
-# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
-# See the License for the specific language governing permissions and
-# limitations under the License.
-
-#!/bin/bash
-
-#
-# Run the health-check testsuites for the tags discovered by helm list
-# Please clean up logs when you are done...
-#
-if [ "$1" == "" ] ; then
- echo "Usage: eteHelm-k8s.sh [namespace]"
- echo " list projects via helm list and runs health-check with those tags except dev and dev-consul"
- exit
-fi
-
-set -x
-
-export NAMESPACE="$1"
-
-POD=$(kubectl --namespace $NAMESPACE get pods | sed 's/ .*//'| grep robot)
-
-PROJECTS=$(helm list | tail -n +3 | grep '-' | cut -d' ' -f1 | sed -E 's/\w+-(\w+)/health-\1/g' | grep -v consul | grep -v nfs-provision)
-
-TAGS=""
-for project in $PROJECTS ;
-do
-TAGS="$TAGS -i $project"
-done
-
-
-ETEHOME=/var/opt/ONAP
-export GLOBAL_BUILD_NUMBER=$(kubectl --namespace $NAMESPACE exec ${POD} -- bash -c "ls -1q /share/logs/ | wc -l")
-OUTPUT_FOLDER=$(printf %04d $GLOBAL_BUILD_NUMBER)_ete_helmlist
-DISPLAY_NUM=$(($GLOBAL_BUILD_NUMBER + 90))
-
-VARIABLEFILES="-V /share/config/vm_properties.py -V /share/config/integration_robot_properties.py -V /share/config/integration_preload_parameters.py"
-VARIABLES="-v GLOBAL_BUILD_NUMBER:$$"
-
-kubectl --namespace $NAMESPACE exec ${POD} -- ${ETEHOME}/runTags.sh ${VARIABLEFILES} ${VARIABLES} -d /share/logs/${OUTPUT_FOLDER} ${TAGS} --display $DISPLAY_NUM
diff --git a/robot/resources/vid/create_service_instance.robot b/robot/resources/vid/create_service_instance.robot
index e617d8fc..46a142b7 100644
--- a/robot/resources/vid/create_service_instance.robot
+++ b/robot/resources/vid/create_service_instance.robot
@@ -54,7 +54,7 @@ Wait For Model
Delete Service Instance By GUI
[Arguments] ${service_instance_id}
Click On Element When Visible xpath=//a/span[@class='glyphicon glyphicon-remove']
- Click On Button When Enabled xpath=//div[@class='buttonRow']/button[@ngx-enabled='true']
+ Click On Button When Enabled //div[@class='buttonRow']/button[@ngx-enabled='true']
Wait Until Element Contains xpath=//div[@ng-controller='deletionDialogController']//div[@ng-controller= 'msoCommitController']/pre[@class = 'log ng-binding'] requestId timeout=${GLOBAL_VID_UI_TIMEOUT_LONG}
${response text}= Get Text xpath=//div[@ng-controller='deletionDialogController']//div[@ng-controller= 'msoCommitController']/pre[@class = 'log ng-binding']
${request_id}= Parse Request Id ${response text}
diff --git a/robot/resources/vid/create_vid_vnf.robot b/robot/resources/vid/create_vid_vnf.robot
index 5ca55e48..76cf836b 100644
--- a/robot/resources/vid/create_vid_vnf.robot
+++ b/robot/resources/vid/create_vid_vnf.robot
@@ -21,13 +21,12 @@ Create VID VNF
#Input Text When Enabled //input[@name='selectedServiceInstance'] ${service_instance_id}
#Select From List By Label //select[@ng-model='selectedserviceinstancetype'] Service Instance Id
Select From List By Label //select[@ng-model='selectedCustomer'] ${customer}
- Click Button button=Submit
+ Click On Button When Enabled //button[contains(text(),'Submit')]
Wait Until Page Contains Element link=View/Edit timeout=${GLOBAL_VID_UI_TIMEOUT_MEDIUM}
Click Element xpath=//a[contains(text(), 'View/Edit')]
Wait Until Page Contains View/Edit Service Instance timeout=${GLOBAL_VID_UI_TIMEOUT_MEDIUM}
# in slower environment the background load of data from AAI takes time so that the button is not populated yet
- Sleep 20s
- Click Element button=Add node instance
+ Click On Button When Enabled //button[contains(text(),'Add node instance')]
#01681d02-2304-4c91-ab2d 0
# This is where firefox breaks. Th elink never becomes visible when run with the script.
${dataTestsId}= Catenate AddVNFOption-${vnf_type}
@@ -47,13 +46,13 @@ Create VID VNF
Sleep 5s
Click Element xpath=//multiselect[@parameter-id='lineOfBusiness']
Sleep 5s
- Click Element xpath=//button[contains(text(),${line_of_business})]
+ Click On Button When Enabled //button[contains(text(),${line_of_business})]
Select From List By Label xpath=//select[@parameter-id='platform'] ${platform}
- Click Element button=Confirm
+ Click On Button When Enabled //button[contains(text(),'Confirm')]
Wait Until Element Contains xpath=//pre[@class = 'log ng-binding'] requestState timeout=${GLOBAL_VID_UI_TIMEOUT_LONG}
${response text}= Get Text xpath=//pre[@class = 'log ng-binding']
Should Not Contain ${response text} FAILED
- Click Element button=Close
+ Click On Button When Enabled //button[contains(text(),'Close')]
${instance_id}= Parse Instance Id ${response text}
Wait Until Page Contains ${service_instance_name} ${GLOBAL_VID_UI_TIMEOUT_MEDIUM}
[Return] ${instance_id}
@@ -68,7 +67,7 @@ Delete VID VNF
# If we don't wait for this control to be enabled, the submit results in a 'not found' pop-up (UnexpectedAlertPresentException)
Input Text When Enabled //input[@name='selectedServiceInstance'] ${service_instance_id}
- Click Button button=Submit
+ Click On Button When Enabled //button[contains(text(),'Submit')]
Wait Until Page Contains Element link=View/Edit timeout=${GLOBAL_VID_UI_TIMEOUT_MEDIUM}
Click Element link=View/Edit
Wait Until Page Contains View/Edit Service Instance timeout=${GLOBAL_VID_UI_TIMEOUT_MEDIUM}
@@ -95,8 +94,7 @@ Create VID VNF module
# If we don't wait for this control to be enabled, the submit results in a 'not found' pop-up (UnexpectedAlertPresentException)
Select From List By Label //select[@ng-model='selectedCustomer'] ${customer}
- ###Input Text When Enabled //input[@name='selectedServiceInstance'] ${service_instance_id}
- Click Button button=Submit
+ Click On Button When Enabled //button[contains(text(),'Submit')]
Wait Until Page Contains Element link=View/Edit timeout=${GLOBAL_VID_UI_TIMEOUT_MEDIUM}
Click Element link=View/Edit
Wait Until Keyword Succeeds 300s 5s Wait For Add VF Module
@@ -117,10 +115,10 @@ Create VID VNF module
Wait Until Element Is Visible xpath=//input[@parameter-id='sdncPreload'] ${GLOBAL_VID_UI_TIMEOUT_SHORT}
Wait Until Element Is Enabled xpath=//input[@parameter-id='sdncPreload'] ${GLOBAL_VID_UI_TIMEOUT_SHORT}
Select Checkbox xpath=//input[@parameter-id='sdncPreload']
- Click Element button=Confirm
+ Click On Button When Enabled //button[contains(text(),'Confirm')]
Wait Until Element Contains xpath=//pre[@class = 'log ng-binding'] requestState timeout=${GLOBAL_VID_UI_TIMEOUT_LONG}
${response text}= Get Text xpath=//pre[@class = 'log ng-binding']
- Click Element button=Close
+ Click On Button When Enabled //button[contains(text(),'Close')]
${instance_id}= Parse Instance Id ${response text}
${request_id}= Parse Request Id ${response text}
@@ -130,8 +128,9 @@ Create VID VNF module
Wait For Add VF Module
[Documentation] Retry by refresh if the ADD VF-Module is not visible
- Wait Until Page Contains View/Edit Service Instance timeout=${GLOBAL_VID_UI_TIMEOUT_MEDIUM}
- ${status} ${value} Run Keyword And Ignore Error Wait Until Element Is Visible button=Add VF-Module timeout=${GLOBAL_VID_UI_TIMEOUT_SHORT}
+ Wait Until Page Contains View/Edit Service Instance timeout=${GLOBAL_VID_UI_TIMEOUT_MEDIUM}
+
+ ${status} ${value} Run Keyword And Ignore Error Wait Until Element Is Visible //button[contains(text(),'Add VF-Module')] timeout=${GLOBAL_VID_UI_TIMEOUT_SHORT}
Return From Keyword If '${status}' == 'PASS'
Reload Page
Fail Retry
diff --git a/robot/resources/vid/teardown_vid.robot b/robot/resources/vid/teardown_vid.robot
index 46f5a33a..d5f7fb5a 100644
--- a/robot/resources/vid/teardown_vid.robot
+++ b/robot/resources/vid/teardown_vid.robot
@@ -50,8 +50,7 @@ Delete Next VID Entity
# If we don't wait for this control to be enabled, the submit results in a 'not found' pop-up (UnexpectedAlertPresentException)
Select From List By Label //select[@ng-model='selectedCustomer'] ${customer}
- Click Button button=Submit
-
+ Click On Button When Enabled //button[contains(text(),'Submit')]
# When Handle VID Alert detects a pop-up. it will return FAIL and we are done
# Return from Keyword is required because FAIL is inored during teardown
${teardown_status}= Catenate PASS
@@ -89,7 +88,7 @@ Delete Next VID Entity
Handle VID Alert
[Documentation] When service instance has been deleted, an alert will be triggered on the search to end the loop
... The various Alert keywords did not prevent the alert exception on the Click ELement, hence this roundabout way of handling the alert
- Run Keyword And Ignore Error Click Element button=Submit
+ Run Keyword And Ignore Error Click On Button When Enabled //button[contains(text(),'Submit')]
${status} ${t}= Run Keyword And Ignore Error Handle Alert
Return From Keyword If '${status}' == 'FAIL'
Fail ${t}