From 10d13035c82097a57517c5eb608b1021e3841b7a Mon Sep 17 00:00:00 2001 From: eh552t Date: Fri, 15 Sep 2017 14:47:45 +0200 Subject: Add first Holmes test and refactor Change-Id: Ic508686c2f12424ac87698a09f372de578c6dc91 Signed-off-by: eh552t Issue-ID: CLAMP-34 --- test/csit/plans/clamp/APIs/setup.sh | 27 ++++++++ test/csit/plans/clamp/APIs/teardown.sh | 22 ++++++ test/csit/plans/clamp/APIs/testplan.txt | 4 ++ test/csit/plans/clamp/TCA/setup.sh | 27 -------- test/csit/plans/clamp/TCA/teardown.sh | 22 ------ test/csit/plans/clamp/TCA/testplan.txt | 4 -- test/csit/tests/clamp/APIs/01__TCA.robot | 62 +++++++++++++++++ test/csit/tests/clamp/APIs/02__Holmes.robot | 38 ++++++++++ test/csit/tests/clamp/APIs/__init__.robot | 2 + .../tests/clamp/APIs/data/createHolmesModel1.json | 8 +++ .../clamp/APIs/data/createHolmesTemplate1.json | 7 ++ .../clamp/APIs/data/createHolmesTemplate2.json | 7 ++ .../tests/clamp/APIs/data/createTCAModel1.json | 8 +++ .../tests/clamp/APIs/data/createTCAModel2.json | 8 +++ .../tests/clamp/APIs/data/createTCATemplate1.json | 7 ++ .../tests/clamp/APIs/data/createTCATemplate2.json | 7 ++ test/csit/tests/clamp/TCA/01__TCA.robot | 62 ----------------- test/csit/tests/clamp/TCA/__init__.robot | 2 - test/csit/tests/clamp/TCA/data/createModel1.json | 8 --- test/csit/tests/clamp/TCA/data/createModel2.json | 8 --- .../csit/tests/clamp/TCA/data/createTemplate1.json | 7 -- .../csit/tests/clamp/TCA/data/createTemplate2.json | 7 -- .../tests/clamp/UIs/01__Create_TCA_template.robot | 81 ++++++++++++++++++++++ .../csit/tests/clamp/UIs/01__Create_template.robot | 81 ---------------------- .../tests/clamp/UIs/02__Create_TCA_model.robot | 50 +++++++++++++ test/csit/tests/clamp/UIs/02__Create_model.robot | 48 ------------- 26 files changed, 338 insertions(+), 276 deletions(-) create mode 100755 test/csit/plans/clamp/APIs/setup.sh create mode 100755 test/csit/plans/clamp/APIs/teardown.sh create mode 100644 test/csit/plans/clamp/APIs/testplan.txt delete mode 100755 test/csit/plans/clamp/TCA/setup.sh delete mode 100755 test/csit/plans/clamp/TCA/teardown.sh delete mode 100644 test/csit/plans/clamp/TCA/testplan.txt create mode 100644 test/csit/tests/clamp/APIs/01__TCA.robot create mode 100644 test/csit/tests/clamp/APIs/02__Holmes.robot create mode 100644 test/csit/tests/clamp/APIs/__init__.robot create mode 100644 test/csit/tests/clamp/APIs/data/createHolmesModel1.json create mode 100644 test/csit/tests/clamp/APIs/data/createHolmesTemplate1.json create mode 100644 test/csit/tests/clamp/APIs/data/createHolmesTemplate2.json create mode 100644 test/csit/tests/clamp/APIs/data/createTCAModel1.json create mode 100644 test/csit/tests/clamp/APIs/data/createTCAModel2.json create mode 100644 test/csit/tests/clamp/APIs/data/createTCATemplate1.json create mode 100644 test/csit/tests/clamp/APIs/data/createTCATemplate2.json delete mode 100644 test/csit/tests/clamp/TCA/01__TCA.robot delete mode 100644 test/csit/tests/clamp/TCA/__init__.robot delete mode 100644 test/csit/tests/clamp/TCA/data/createModel1.json delete mode 100644 test/csit/tests/clamp/TCA/data/createModel2.json delete mode 100644 test/csit/tests/clamp/TCA/data/createTemplate1.json delete mode 100644 test/csit/tests/clamp/TCA/data/createTemplate2.json create mode 100644 test/csit/tests/clamp/UIs/01__Create_TCA_template.robot delete mode 100644 test/csit/tests/clamp/UIs/01__Create_template.robot create mode 100644 test/csit/tests/clamp/UIs/02__Create_TCA_model.robot delete mode 100644 test/csit/tests/clamp/UIs/02__Create_model.robot diff --git a/test/csit/plans/clamp/APIs/setup.sh b/test/csit/plans/clamp/APIs/setup.sh new file mode 100755 index 000000000..bb7a81447 --- /dev/null +++ b/test/csit/plans/clamp/APIs/setup.sh @@ -0,0 +1,27 @@ +#!/bin/bash +# +# Copyright 2016-2017 Huawei Technologies Co., Ltd. +# +# 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. +# +# Modifications copyright (c) 2017 AT&T Intellectual Property +# +# Place the scripts in run order: + +source ${WORKSPACE}/test/csit/scripts/clamp/clone_clamp_and_change_dockercompose.sh + +source ${WORKSPACE}/test/csit/scripts/clamp/start_clamp_containers.sh + +# Pass any variables required by Robot test suites in ROBOT_VARIABLES +#ROBOT_VARIABLES="-v TEST:${TEST}" + diff --git a/test/csit/plans/clamp/APIs/teardown.sh b/test/csit/plans/clamp/APIs/teardown.sh new file mode 100755 index 000000000..07067e60e --- /dev/null +++ b/test/csit/plans/clamp/APIs/teardown.sh @@ -0,0 +1,22 @@ +#!/bin/bash +# +# Copyright 2016-2017 Huawei Technologies Co., Ltd. +# +# 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. +# +# Modifications copyright (c) 2017 AT&T Intellectual Property +# + +source ${WORKSPACE}/test/csit/scripts/clamp/kill_and_remove_clamp_and_db_containers.sh + +# $WORKSPACE/archives/clamp-clone deleted with archives folder when tests starts so we keep it at the end for debugging diff --git a/test/csit/plans/clamp/APIs/testplan.txt b/test/csit/plans/clamp/APIs/testplan.txt new file mode 100644 index 000000000..9d328f52a --- /dev/null +++ b/test/csit/plans/clamp/APIs/testplan.txt @@ -0,0 +1,4 @@ +# Test suites are relative paths under [integration.git]/test/csit/tests/. +# Place the suites in run order. +clamp/APIs + diff --git a/test/csit/plans/clamp/TCA/setup.sh b/test/csit/plans/clamp/TCA/setup.sh deleted file mode 100755 index bb7a81447..000000000 --- a/test/csit/plans/clamp/TCA/setup.sh +++ /dev/null @@ -1,27 +0,0 @@ -#!/bin/bash -# -# Copyright 2016-2017 Huawei Technologies Co., Ltd. -# -# 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. -# -# Modifications copyright (c) 2017 AT&T Intellectual Property -# -# Place the scripts in run order: - -source ${WORKSPACE}/test/csit/scripts/clamp/clone_clamp_and_change_dockercompose.sh - -source ${WORKSPACE}/test/csit/scripts/clamp/start_clamp_containers.sh - -# Pass any variables required by Robot test suites in ROBOT_VARIABLES -#ROBOT_VARIABLES="-v TEST:${TEST}" - diff --git a/test/csit/plans/clamp/TCA/teardown.sh b/test/csit/plans/clamp/TCA/teardown.sh deleted file mode 100755 index 07067e60e..000000000 --- a/test/csit/plans/clamp/TCA/teardown.sh +++ /dev/null @@ -1,22 +0,0 @@ -#!/bin/bash -# -# Copyright 2016-2017 Huawei Technologies Co., Ltd. -# -# 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. -# -# Modifications copyright (c) 2017 AT&T Intellectual Property -# - -source ${WORKSPACE}/test/csit/scripts/clamp/kill_and_remove_clamp_and_db_containers.sh - -# $WORKSPACE/archives/clamp-clone deleted with archives folder when tests starts so we keep it at the end for debugging diff --git a/test/csit/plans/clamp/TCA/testplan.txt b/test/csit/plans/clamp/TCA/testplan.txt deleted file mode 100644 index c0f569673..000000000 --- a/test/csit/plans/clamp/TCA/testplan.txt +++ /dev/null @@ -1,4 +0,0 @@ -# Test suites are relative paths under [integration.git]/test/csit/tests/. -# Place the suites in run order. -clamp/TCA - diff --git a/test/csit/tests/clamp/APIs/01__TCA.robot b/test/csit/tests/clamp/APIs/01__TCA.robot new file mode 100644 index 000000000..e4837a66a --- /dev/null +++ b/test/csit/tests/clamp/APIs/01__TCA.robot @@ -0,0 +1,62 @@ +*** Settings *** +Library Collections +Library RequestsLibrary +Library OperatingSystem +Library json + + +*** Test Cases *** +Get Requests health check ok + CreateSession clamp http://localhost:8080 + ${resp}= Get Request clamp /restservices/clds/v1/clds/healthcheck + Should Be Equal As Strings ${resp.status_code} 200 + +Put Requests to add TCA template1 with yaml properties + ${auth}= Create List admin 5f4dcc3b5aa765d61d8327deb882cf99 + Create Session clamp http://localhost:8080 auth=${auth} + ${data}= Get Binary File ${CURDIR}${/}data${/}createTCATemplate1.json + &{headers}= Create Dictionary Content-Type=application/json + ${resp}= Put Request clamp /restservices/clds/v1/cldsTempate/template/TCATemplate1 data=${data} headers=${headers} + Should Be Equal As Strings ${resp.status_code} 200 + +Put Requests to add TCA template2 with yaml properties + ${auth}= Create List admin 5f4dcc3b5aa765d61d8327deb882cf99 + Create Session clamp http://localhost:8080 auth=${auth} + ${data}= Get Binary File ${CURDIR}${/}data${/}createTCATemplate2.json + &{headers}= Create Dictionary Content-Type=application/json + ${resp}= Put Request clamp /restservices/clds/v1/cldsTempate/template/TCATemplate2 data=${data} headers=${headers} + Should Be Equal As Strings ${resp.status_code} 200 + +Get Requests verify TCA template1 and template2 found + ${auth}= Create List admin 5f4dcc3b5aa765d61d8327deb882cf99 + Create Session clamp http://localhost:8080 auth=${auth} + ${resp}= Get Request clamp /restservices/clds/v1/cldsTempate/template-names + Should Be Equal As Strings ${resp.status_code} 200 + Should Contain Match ${resp} *TCATemplate1* + Should Contain Match ${resp} *TCATemplate2* + Should Not Contain Match ${resp} *TCATemplate99* + +Put Requests to add Close Loop TCA Model1 + ${auth}= Create List admin 5f4dcc3b5aa765d61d8327deb882cf99 + Create Session clamp http://localhost:8080 auth=${auth} + ${data}= Get Binary File ${CURDIR}${/}data${/}createTCAModel1.json + &{headers}= Create Dictionary Content-Type=application/json + ${resp}= Put Request clamp /restservices/clds/v1/clds/model/TCAModel1 data=${data} headers=${headers} + Should Be Equal As Strings ${resp.status_code} 200 + +Put Requests to add Close Loop TCA Model2 + ${auth}= Create List admin 5f4dcc3b5aa765d61d8327deb882cf99 + Create Session clamp http://localhost:8080 auth=${auth} + ${data}= Get Binary File ${CURDIR}${/}data${/}createTCAModel2.json + &{headers}= Create Dictionary Content-Type=application/json + ${resp}= Put Request clamp /restservices/clds/v1/clds/model/TCAModel2 data=${data} headers=${headers} + Should Be Equal As Strings ${resp.status_code} 200 + +Get Requests verify Model1 and Model2 found + ${auth}= Create List admin 5f4dcc3b5aa765d61d8327deb882cf99 + Create Session clamp http://localhost:8080 auth=${auth} + ${resp}= Get Request clamp /restservices/clds/v1/clds/model-names + Should Be Equal As Strings ${resp.status_code} 200 + Should Contain Match ${resp} *TCAModel1* + Should Contain Match ${resp} *TCAModel2* + Should Not Contain Match ${resp} *TCAModel99* diff --git a/test/csit/tests/clamp/APIs/02__Holmes.robot b/test/csit/tests/clamp/APIs/02__Holmes.robot new file mode 100644 index 000000000..9087c4bcd --- /dev/null +++ b/test/csit/tests/clamp/APIs/02__Holmes.robot @@ -0,0 +1,38 @@ +*** Settings *** +Library Collections +Library RequestsLibrary +Library OperatingSystem +Library json + + +*** Test Cases *** +Get Requests health check ok + CreateSession clamp http://localhost:8080 + ${resp}= Get Request clamp /restservices/clds/v1/clds/healthcheck + Should Be Equal As Strings ${resp.status_code} 200 + +Put Requests to add Holmes template1 with yaml properties + ${auth}= Create List admin 5f4dcc3b5aa765d61d8327deb882cf99 + Create Session clamp http://localhost:8080 auth=${auth} + ${data}= Get Binary File ${CURDIR}${/}data${/}createHolmesTemplate1.json + &{headers}= Create Dictionary Content-Type=application/json + ${resp}= Put Request clamp /restservices/clds/v1/cldsTempate/template/HolmesTemplate1 data=${data} headers=${headers} + Should Be Equal As Strings ${resp.status_code} 200 + +Put Requests to add Holmes template2 with yaml properties + ${auth}= Create List admin 5f4dcc3b5aa765d61d8327deb882cf99 + Create Session clamp http://localhost:8080 auth=${auth} + ${data}= Get Binary File ${CURDIR}${/}data${/}createHolmesTemplate2.json + &{headers}= Create Dictionary Content-Type=application/json + ${resp}= Put Request clamp /restservices/clds/v1/cldsTempate/template/HolmesTemplate2 data=${data} headers=${headers} + Should Be Equal As Strings ${resp.status_code} 200 + +Get Requests verify Holmes template1 and template2 found + ${auth}= Create List admin 5f4dcc3b5aa765d61d8327deb882cf99 + Create Session clamp http://localhost:8080 auth=${auth} + ${resp}= Get Request clamp /restservices/clds/v1/cldsTempate/template-names + Should Be Equal As Strings ${resp.status_code} 200 + Should Contain Match ${resp} *HolmesTemplate1* + Should Contain Match ${resp} *HolmesTemplate2* + Should Not Contain Match ${resp} *HolmesTemplate99* + diff --git a/test/csit/tests/clamp/APIs/__init__.robot b/test/csit/tests/clamp/APIs/__init__.robot new file mode 100644 index 000000000..de57680c2 --- /dev/null +++ b/test/csit/tests/clamp/APIs/__init__.robot @@ -0,0 +1,2 @@ +*** Settings *** +Documentation Clamp - APIs diff --git a/test/csit/tests/clamp/APIs/data/createHolmesModel1.json b/test/csit/tests/clamp/APIs/data/createHolmesModel1.json new file mode 100644 index 000000000..10bc82cd6 --- /dev/null +++ b/test/csit/tests/clamp/APIs/data/createHolmesModel1.json @@ -0,0 +1,8 @@ +{ + "name": "HolmesModel1", + "controlNamePrefix": "ClosedLoop-", + "bpmnText": " SequenceFlow_0co4u88 SequenceFlow_0rastvv SequenceFlow_0dk7l0v SequenceFlow_0dk7l0v SequenceFlow_0e0orup SequenceFlow_0ra7ywp SequenceFlow_1luu2du SequenceFlow_0e0orup SequenceFlow_0co4u88 SequenceFlow_10lgcns SequenceFlow_0ra7ywp SequenceFlow_0rastvv SequenceFlow_10lgcns SequenceFlow_1luu2du ", + "propText": "{\"Policy_0cq8t1w\":{\"Policy1\":[{\"name\":\"pname\",\"value\":\"Policy1\"},{\"name\":\"pid\",\"value\":\"0\"},{\"name\":\"timeout\",\"value\":\"345\"},{\"policyConfigurations\":[[{\"name\":\"maxRetries\",\"value\":[\"3\"]},{\"name\":\"retryTimeLimit\",\"value\":[\"180\"]},{\"name\":\"_id\",\"value\":[\"fv24LBw\"]},{\"name\":\"parentPolicy\",\"value\":[\"\"]}]]}]},\"TCA_199ueal\":{\"tca1\":[{\"name\":\"tname\",\"value\":\"tca1\"},{\"name\":\"tuuid\",\"value\":\"66657dc2-beee-t33a-8d6a-9f0ad61b7269\"},{\"name\":\"tnfc\",\"value\":\"\"},{\"name\":\"tcaEnab\",\"value\":\"on\"},{\"name\":\"tcaPol\",\"value\":\"Policy1\"},{\"name\":\"tcaPolId\",\"value\":\"0\"},{\"name\":\"tcaInt\",\"value\":\"1\"},{\"name\":\"tcaSev\",\"value\":\"NORMAL\"},{\"name\":\"tcaVio\",\"value\":\"1\"},{\"serviceConfigurations\":[]}]},\"StringMatch_08icoyk\":{\"group1\":[{\"name\":\"rgname\",\"value\":\"1505404573310\"},{\"name\":\"rgfriendlyname\",\"value\":\"group1\"},{\"name\":\"policyName\",\"value\":\"Policy1\"},{\"name\":\"policyId\",\"value\":\"0\"},{\"serviceConfigurations\":[[{\"name\":\"aaiMatchingFields\",\"value\":[\"complex.city\",\"complex.physical-location-id\"]},{\"name\":\"aaiSendFields\",\"value\":[\"complex.city\",\"complex.physical-location-id\"]},{\"name\":\"timeWindow\",\"value\":[\"0\"]},{\"name\":\"ageLimit\",\"value\":[\"1600\"]},{\"name\":\"createClosedLoopEventId\",\"value\":[\"Initial\"]},{\"name\":\"outputEventName\",\"value\":[\"ONSET\"]},{\"stringSet\":[{},{\"name\":\"eventSeverity\",\"value\":[\"NORMAL\"]},{\"name\":\"eventSourceType\",\"value\":[\"\"]}]}]]}]},\"Collector_0ki9muk\":[{\"name\":\"topicPublishes\",\"value\":\"DCAE-COLLECTOR-UCSNMP\"}]}", + "imageText": "", + "templateName": "HolmesTemplate1" +} \ No newline at end of file diff --git a/test/csit/tests/clamp/APIs/data/createHolmesTemplate1.json b/test/csit/tests/clamp/APIs/data/createHolmesTemplate1.json new file mode 100644 index 000000000..27a044f5e --- /dev/null +++ b/test/csit/tests/clamp/APIs/data/createHolmesTemplate1.json @@ -0,0 +1,7 @@ +{ + "name": "HolmesTemplate1", + "controlNamePrefix": "ClosedLoop-", + "bpmnText": " SequenceFlow_0co4u88 SequenceFlow_0rastvv SequenceFlow_0dk7l0v SequenceFlow_0dk7l0v SequenceFlow_0e0orup SequenceFlow_0ra7ywp SequenceFlow_1luu2du SequenceFlow_0e0orup SequenceFlow_0co4u88 SequenceFlow_10lgcns SequenceFlow_0ra7ywp SequenceFlow_0rastvv SequenceFlow_10lgcns SequenceFlow_1luu2du ", + "propText": "{\"global\":[{\"name\":\"service\",\"value\":[\"tosca_definitions_version: cloudify_dsl_1_2\\r\\n\\r\\nimports:\\r\\n- http://www.getcloudify.org/spec/cloudify/3.3.1/types.yaml\\r\\n- http://135.207.127.211/1607_prod/type_files/cdap_app.yaml\\r\\n\\r\\nnode_templates:\\r\\n MTCA:\\r\\n type: dcae.nodes.cdap_app\\r\\n properties:\\r\\n service_name: \\\"cdap-mtca-central\\\"\\r\\n deployment_JSON: |-\\r\\n {\\r\\n \\\"clusterService\\\": {\\\"$ref\\\": \\\"/services/vm-cdap-cluster-central/instances/rdm2c\\\"},\\r\\n \\\"namespace\\\": \\\"MTCA\\\",\\r\\n \\\"appNames\\\": [ \\\"cdap-mtca\\\" ],\\r\\n \\\"flowNames\\\": [ \\\"cdap-mtca.TCAVESCollectorFlow\\\" ],\\r\\n \\\"workerNames\\\": [\\\"cdap-mtca.TCADMaaPMRSubscriberWorker\\\", \\\"cdap-mtca.TCADMaaPMRPublisherWorker\\\"],\\r\\n \\\"serviceNames\\\" : [],\\r\\n \\\"apps\\\": {\\r\\n \\\"cdap-mtca\\\": {\\r\\n \\\"jarFile\\\": \\\"/opt/app/cdap-apps/dcae-analytics-mtca-1.0.0.jar\\\",\\r\\n \\\"artifactName\\\": \\\"dcae-analytics-mtca\\\",\\r\\n \\\"version\\\": \\\"1.0.0\\\",\\r\\n \\\"appConfigFileContent\\\": \\\"{config:{ \\\\\\\"appName\\\\\\\":\\\\\\\"cdap-mtca\\\\\\\", \\\\\\\"appDescription\\\\\\\":\\\\\\\"DCAE Analytics Threshold Crossing Alert Application\\\\\\\", \\\\\\\"tcaSubscriberOutputStreamName\\\\\\\":\\\\\\\"TCASubscriberOutputStream\\\\\\\", \\\\\\\"thresholdCalculatorFlowletInstances\\\\\\\":2, \\\\\\\"tcaVESMessageStatusTableName\\\\\\\":\\\\\\\"TCAVESMessageStatusTable\\\\\\\", \\\\\\\"tcaVESMessageStatusTableTTLSeconds\\\\\\\":864000, \\\\\\\"tcaVESAlertsTableName\\\\\\\":\\\\\\\"TCAVESAlertsTable\\\\\\\", \\\\\\\"tcaVESAlertsTableTTLSeconds\\\\\\\":1728000 }}\\\"\\r\\n }\\r\\n },\\r\\n \\r\\n \\\"configuration\\\": {\\r\\n \\\"$class\\\": \\\"com.att.ecomp.dcae.clamp.common.MThresholdCrossingConfiguration\\\",\\r\\n \\\"subscriberContentType\\\": \\\"\\\",\\r\\n \\\"subscriberConsumerId\\\": \\\"c12\\\",\\r\\n \\\"subscriberConsumerGroup\\\": \\\"OpenDCAE-c12\\\",\\r\\n \\\"subscriberTimeoutMS\\\": \\\"-1\\\",\\r\\n \\\"subscriberMessageLimit\\\": \\\"-1\\\",\\r\\n \\\"subscriberPollingInterval\\\": \\\"20000\\\",\\r\\n \\\"publisherContentType\\\": \\\"application/json\\\",\\r\\n \\\"publisherMaxBatchSize\\\": \\\"10\\\",\\r\\n \\\"publisherMaxRecoveryQueueSize\\\": \\\"100000\\\",\\r\\n \\\"publisherPollingInterval\\\": \\\"20000\\\",\\r\\n \\\"publisherAlertWindowingTime\\\": \\\"86400\\\",\\r\\n \\\"policyName\\\": \\\"policy.dcae.configuration\\\",\\r\\n \\\"policyScope\\\": \\\"pnf=eNodeB;type=configuration\\\",\\r\\n \\\"policyVersion\\\": \\\"1.0.0\\\",\\r\\n \\\"domain\\\" : \\\"measurementsForVfScaling\\\",\\r\\n \\r\\n \\\"signatures\\\" : {\\r\\n \\t }\\r\\n\\r\\n }\\r\\n }\"]}]}", + "imageText":"PolicyHHolmesVESVesCollectorCollectorTCAStringMatch" +} \ No newline at end of file diff --git a/test/csit/tests/clamp/APIs/data/createHolmesTemplate2.json b/test/csit/tests/clamp/APIs/data/createHolmesTemplate2.json new file mode 100644 index 000000000..e267591bd --- /dev/null +++ b/test/csit/tests/clamp/APIs/data/createHolmesTemplate2.json @@ -0,0 +1,7 @@ +{ + "name": "HolmesTemplate2", + "controlNamePrefix": "ClosedLoop-", + "bpmnText": " SequenceFlow_0co4u88 SequenceFlow_0rastvv SequenceFlow_0dk7l0v SequenceFlow_0dk7l0v SequenceFlow_0e0orup SequenceFlow_0ra7ywp SequenceFlow_1luu2du SequenceFlow_0e0orup SequenceFlow_0co4u88 SequenceFlow_10lgcns SequenceFlow_0ra7ywp SequenceFlow_0rastvv SequenceFlow_10lgcns SequenceFlow_1luu2du ", + "propText": "{\"global\":[{\"name\":\"service\",\"value\":[\"tosca_definitions_version: cloudify_dsl_1_2\\r\\n\\r\\nimports:\\r\\n- http://www.getcloudify.org/spec/cloudify/3.3.1/types.yaml\\r\\n- http://135.207.127.211/1607_prod/type_files/cdap_app.yaml\\r\\n\\r\\nnode_templates:\\r\\n MTCA:\\r\\n type: dcae.nodes.cdap_app\\r\\n properties:\\r\\n service_name: \\\"cdap-mtca-central\\\"\\r\\n deployment_JSON: |-\\r\\n {\\r\\n \\\"clusterService\\\": {\\\"$ref\\\": \\\"/services/vm-cdap-cluster-central/instances/rdm2c\\\"},\\r\\n \\\"namespace\\\": \\\"MTCA\\\",\\r\\n \\\"appNames\\\": [ \\\"cdap-mtca\\\" ],\\r\\n \\\"flowNames\\\": [ \\\"cdap-mtca.TCAVESCollectorFlow\\\" ],\\r\\n \\\"workerNames\\\": [\\\"cdap-mtca.TCADMaaPMRSubscriberWorker\\\", \\\"cdap-mtca.TCADMaaPMRPublisherWorker\\\"],\\r\\n \\\"serviceNames\\\" : [],\\r\\n \\\"apps\\\": {\\r\\n \\\"cdap-mtca\\\": {\\r\\n \\\"jarFile\\\": \\\"/opt/app/cdap-apps/dcae-analytics-mtca-1.0.0.jar\\\",\\r\\n \\\"artifactName\\\": \\\"dcae-analytics-mtca\\\",\\r\\n \\\"version\\\": \\\"1.0.0\\\",\\r\\n \\\"appConfigFileContent\\\": \\\"{config:{ \\\\\\\"appName\\\\\\\":\\\\\\\"cdap-mtca\\\\\\\", \\\\\\\"appDescription\\\\\\\":\\\\\\\"DCAE Analytics Threshold Crossing Alert Application\\\\\\\", \\\\\\\"tcaSubscriberOutputStreamName\\\\\\\":\\\\\\\"TCASubscriberOutputStream\\\\\\\", \\\\\\\"thresholdCalculatorFlowletInstances\\\\\\\":2, \\\\\\\"tcaVESMessageStatusTableName\\\\\\\":\\\\\\\"TCAVESMessageStatusTable\\\\\\\", \\\\\\\"tcaVESMessageStatusTableTTLSeconds\\\\\\\":864000, \\\\\\\"tcaVESAlertsTableName\\\\\\\":\\\\\\\"TCAVESAlertsTable\\\\\\\", \\\\\\\"tcaVESAlertsTableTTLSeconds\\\\\\\":1728000 }}\\\"\\r\\n }\\r\\n },\\r\\n \\r\\n \\\"configuration\\\": {\\r\\n \\\"$class\\\": \\\"com.att.ecomp.dcae.clamp.common.MThresholdCrossingConfiguration\\\",\\r\\n \\\"subscriberContentType\\\": \\\"\\\",\\r\\n \\\"subscriberConsumerId\\\": \\\"c12\\\",\\r\\n \\\"subscriberConsumerGroup\\\": \\\"OpenDCAE-c12\\\",\\r\\n \\\"subscriberTimeoutMS\\\": \\\"-1\\\",\\r\\n \\\"subscriberMessageLimit\\\": \\\"-1\\\",\\r\\n \\\"subscriberPollingInterval\\\": \\\"20000\\\",\\r\\n \\\"publisherContentType\\\": \\\"application/json\\\",\\r\\n \\\"publisherMaxBatchSize\\\": \\\"10\\\",\\r\\n \\\"publisherMaxRecoveryQueueSize\\\": \\\"100000\\\",\\r\\n \\\"publisherPollingInterval\\\": \\\"20000\\\",\\r\\n \\\"publisherAlertWindowingTime\\\": \\\"86400\\\",\\r\\n \\\"policyName\\\": \\\"policy.dcae.configuration\\\",\\r\\n \\\"policyScope\\\": \\\"pnf=eNodeB;type=configuration\\\",\\r\\n \\\"policyVersion\\\": \\\"1.0.0\\\",\\r\\n \\\"domain\\\" : \\\"measurementsForVfScaling\\\",\\r\\n \\r\\n \\\"signatures\\\" : {\\r\\n \\t }\\r\\n\\r\\n }\\r\\n }\"]}]}", + "imageText":"PolicyHHolmesVESVesCollectorCollectorTCAStringMatch" +} \ No newline at end of file diff --git a/test/csit/tests/clamp/APIs/data/createTCAModel1.json b/test/csit/tests/clamp/APIs/data/createTCAModel1.json new file mode 100644 index 000000000..7d21771df --- /dev/null +++ b/test/csit/tests/clamp/APIs/data/createTCAModel1.json @@ -0,0 +1,8 @@ +{ + "name": "TCAModel1", + "controlNamePrefix": "ClosedLoop-", + "bpmnText": " SequenceFlow_0wokvsg SequenceFlow_0wokvsg SequenceFlow_0w8129u SequenceFlow_0w8129u SequenceFlow_0bdkahu SequenceFlow_0bdkahu SequenceFlow_039geog SequenceFlow_039geog ", + "propText": "{\"Collector_04kan6k\":[{\"name\":\"topicPublishes\",\"value\":\"DCAE-COLLECTOR-UCSNMP\"}],\"TCA_0laok3g\":{\"New_Set\":[{\"name\":\"tname\",\"value\":\"New_Set\"},{\"name\":\"tuuid\",\"value\":\"06663292-a9ca-te93-329f-bd12accc6bd9\"},{\"name\":\"tnfc\",\"value\":\"\"},{\"name\":\"tcaEnab\",\"value\":\"on\"},{\"name\":\"tcaPolId\",\"value\":\"\"},{\"name\":\"tcaInt\",\"value\":\"1\"},{\"name\":\"tcaSev\",\"value\":\"Normal\"},{\"name\":\"tcaVio\",\"value\":\"1\"},{\"serviceConfigurations\":[]}]},\"Policy_1u1q61z\":{}}", + "imageText": "", + "templateName": "TCATemplate1" +} \ No newline at end of file diff --git a/test/csit/tests/clamp/APIs/data/createTCAModel2.json b/test/csit/tests/clamp/APIs/data/createTCAModel2.json new file mode 100644 index 000000000..6e26e314c --- /dev/null +++ b/test/csit/tests/clamp/APIs/data/createTCAModel2.json @@ -0,0 +1,8 @@ +{ + "name": "TCAModel2", + "controlNamePrefix": "ClosedLoop-", + "bpmnText": " SequenceFlow_0wokvsg SequenceFlow_0wokvsg SequenceFlow_0w8129u SequenceFlow_0w8129u SequenceFlow_0bdkahu SequenceFlow_0bdkahu SequenceFlow_039geog SequenceFlow_039geog ", + "propText": "{\"Collector_04kan6k\":[{\"name\":\"topicPublishes\",\"value\":\"DCAE-COLLECTOR-UCSNMP\"}],\"TCA_0laok3g\":{\"TCA1\":[{\"name\":\"tname\",\"value\":\"TCA1\"},{\"name\":\"tuuid\",\"value\":\"22edf952-0c3f-t957-94e0-d5911e155aff\"},{\"name\":\"tnfc\",\"value\":\"\"},{\"name\":\"tcaEnab\",\"value\":\"on\"},{\"name\":\"tcaPol\",\"value\":\"Policy1\"},{\"name\":\"tcaPolId\",\"value\":\"0\"},{\"name\":\"tcaInt\",\"value\":\"1\"},{\"name\":\"tcaSev\",\"value\":\"Normal\"},{\"name\":\"tcaVio\",\"value\":\"1\"},{\"serviceConfigurations\":[]}]},\"Policy_1u1q61z\":{\"Policy1\":[{\"name\":\"pname\",\"value\":\"Policy1\"},{\"name\":\"pid\",\"value\":\"0\"},{\"name\":\"timeout\",\"value\":\"345\"},{\"policyConfigurations\":[[{\"name\":\"recipe\",\"value\":[\"migrate\"]},{\"name\":\"maxRetries\",\"value\":[\"3\"]},{\"name\":\"retryTimeLimit\",\"value\":[\"180\"]},{\"name\":\"_id\",\"value\":[\"Maw1TWE\"]},{\"name\":\"parentPolicy\",\"value\":[\"\"]}]]}]},\"global\":[{\"name\":\"service\",\"value\":[\"e27f3679-8d95-4ee1-a5a3-95a7e243306f\"]},{\"name\":\"vf\",\"value\":[\"6c7aaec2-59eb-41d9-8681-b7f976ab668d\"]},{\"name\":\"actionSet\",\"value\":[\"vnfRecipe\"]}]}", + "imageText": "", + "templateName": "TCATemplate1" +} \ No newline at end of file diff --git a/test/csit/tests/clamp/APIs/data/createTCATemplate1.json b/test/csit/tests/clamp/APIs/data/createTCATemplate1.json new file mode 100644 index 000000000..2157b9589 --- /dev/null +++ b/test/csit/tests/clamp/APIs/data/createTCATemplate1.json @@ -0,0 +1,7 @@ +{ + "name": "TCATemplate1", + "controlNamePrefix": "ClosedLoop-", + "bpmnText": " SequenceFlow_0wokvsg SequenceFlow_0wokvsg SequenceFlow_0w8129u SequenceFlow_0w8129u SequenceFlow_0bdkahu SequenceFlow_0bdkahu SequenceFlow_039geog SequenceFlow_039geog ", + "propText": "{\"global\":[{\"name\":\"service\",\"value\":[\"tosca_definitions_version: cloudify_dsl_1_2\\r\\n\\r\\nimports:\\r\\n- http://www.getcloudify.org/spec/cloudify/3.3.1/types.yaml\\r\\n- http://127.0.0.1/1607_prod/type_files/cdap_app.yaml\\r\\n\\r\\nnode_templates:\\r\\n MTCA:\\r\\n type: dcae.nodes.cdap_app\\r\\n properties:\\r\\n service_name: \\\"cdap-mtca-central\\\"\\r\\n deployment_JSON: |-\\r\\n {\\r\\n \\\"clusterService\\\": {\\\"$ref\\\": \\\"/services/vm-cdap-cluster-central/instances/rdm2c\\\"},\\r\\n \\\"namespace\\\": \\\"MTCA\\\",\\r\\n \\\"appNames\\\": [ \\\"cdap-mtca\\\" ],\\r\\n \\\"flowNames\\\": [ \\\"cdap-mtca.TCAVESCollectorFlow\\\" ],\\r\\n \\\"workerNames\\\": [\\\"cdap-mtca.TCADMaaPMRSubscriberWorker\\\", \\\"cdap-mtca.TCADMaaPMRPublisherWorker\\\"],\\r\\n \\\"serviceNames\\\" : [],\\r\\n \\\"apps\\\": {\\r\\n \\\"cdap-mtca\\\": {\\r\\n \\\"jarFile\\\": \\\"/opt/app/cdap-apps/dcae-analytics-mtca-1.0.0.jar\\\",\\r\\n \\\"artifactName\\\": \\\"dcae-analytics-mtca\\\",\\r\\n \\\"version\\\": \\\"1.0.0\\\",\\r\\n \\\"appConfigFileContent\\\": \\\"{config:{ \\\\\\\"appName\\\\\\\":\\\\\\\"cdap-mtca\\\\\\\", \\\\\\\"appDescription\\\\\\\":\\\\\\\"DCAE Analytics Threshold Crossing Alert Application\\\\\\\", \\\\\\\"tcaSubscriberOutputStreamName\\\\\\\":\\\\\\\"TCASubscriberOutputStream\\\\\\\", \\\\\\\"thresholdCalculatorFlowletInstances\\\\\\\":2, \\\\\\\"tcaVESMessageStatusTableName\\\\\\\":\\\\\\\"TCAVESMessageStatusTable\\\\\\\", \\\\\\\"tcaVESMessageStatusTableTTLSeconds\\\\\\\":864000, \\\\\\\"tcaVESAlertsTableName\\\\\\\":\\\\\\\"TCAVESAlertsTable\\\\\\\", \\\\\\\"tcaVESAlertsTableTTLSeconds\\\\\\\":1728000 }}\\\"\\r\\n }\\r\\n },\\r\\n \\r\\n \\\"configuration\\\": {\\r\\n \\\"$class\\\": \\\"com.att.ecomp.dcae.clamp.common.MThresholdCrossingConfiguration\\\",\\r\\n \\\"subscriberContentType\\\": \\\"\\\",\\r\\n \\\"subscriberConsumerId\\\": \\\"c12\\\",\\r\\n \\\"subscriberConsumerGroup\\\": \\\"OpenDCAE-c12\\\",\\r\\n \\\"subscriberTimeoutMS\\\": \\\"-1\\\",\\r\\n \\\"subscriberMessageLimit\\\": \\\"-1\\\",\\r\\n \\\"subscriberPollingInterval\\\": \\\"20000\\\",\\r\\n \\\"publisherContentType\\\": \\\"application/json\\\",\\r\\n \\\"publisherMaxBatchSize\\\": \\\"10\\\",\\r\\n \\\"publisherMaxRecoveryQueueSize\\\": \\\"100000\\\",\\r\\n \\\"publisherPollingInterval\\\": \\\"20000\\\",\\r\\n \\\"publisherAlertWindowingTime\\\": \\\"86400\\\",\\r\\n \\\"policyName\\\": \\\"policy.dcae.configuration\\\",\\r\\n \\\"policyScope\\\": \\\"pnf=eNodeB;type=configuration\\\",\\r\\n \\\"policyVersion\\\": \\\"1.0.0\\\",\\r\\n \\\"domain\\\" : \\\"measurementsForVfScaling\\\",\\r\\n \\r\\n \\\"signatures\\\" : {\\r\\n \\t }\\r\\n\\r\\n }\\r\\n }\"]}]}", + "imageText":"CollectorTCAPolicy" +} \ No newline at end of file diff --git a/test/csit/tests/clamp/APIs/data/createTCATemplate2.json b/test/csit/tests/clamp/APIs/data/createTCATemplate2.json new file mode 100644 index 000000000..b0cc1b6ab --- /dev/null +++ b/test/csit/tests/clamp/APIs/data/createTCATemplate2.json @@ -0,0 +1,7 @@ +{ + "name": "TCATemplate2", + "controlNamePrefix": "ClosedLoop-", + "bpmnText": " SequenceFlow_0wokvsg SequenceFlow_0wokvsg SequenceFlow_0w8129u SequenceFlow_0w8129u SequenceFlow_0bdkahu SequenceFlow_0bdkahu SequenceFlow_039geog SequenceFlow_039geog ", + "propText": "{\"global\":[{\"name\":\"service\",\"value\":[\"tosca_definitions_version: cloudify_dsl_1_2\\r\\n\\r\\nimports:\\r\\n- http://www.getcloudify.org/spec/cloudify/3.3.1/types.yaml\\r\\n- http://127.0.0.1/1607_prod/type_files/cdap_app.yaml\\r\\n\\r\\nnode_templates:\\r\\n MTCA:\\r\\n type: dcae.nodes.cdap_app\\r\\n properties:\\r\\n service_name: \\\"cdap-mtca-central\\\"\\r\\n deployment_JSON: |-\\r\\n {\\r\\n \\\"clusterService\\\": {\\\"$ref\\\": \\\"/services/vm-cdap-cluster-central/instances/rdm2c\\\"},\\r\\n \\\"namespace\\\": \\\"MTCA\\\",\\r\\n \\\"appNames\\\": [ \\\"cdap-mtca\\\" ],\\r\\n \\\"flowNames\\\": [ \\\"cdap-mtca.TCAVESCollectorFlow\\\" ],\\r\\n \\\"workerNames\\\": [\\\"cdap-mtca.TCADMaaPMRSubscriberWorker\\\", \\\"cdap-mtca.TCADMaaPMRPublisherWorker\\\"],\\r\\n \\\"serviceNames\\\" : [],\\r\\n \\\"apps\\\": {\\r\\n \\\"cdap-mtca\\\": {\\r\\n \\\"jarFile\\\": \\\"/opt/app/cdap-apps/dcae-analytics-mtca-1.0.0.jar\\\",\\r\\n \\\"artifactName\\\": \\\"dcae-analytics-mtca\\\",\\r\\n \\\"version\\\": \\\"1.0.0\\\",\\r\\n \\\"appConfigFileContent\\\": \\\"{config:{ \\\\\\\"appName\\\\\\\":\\\\\\\"cdap-mtca\\\\\\\", \\\\\\\"appDescription\\\\\\\":\\\\\\\"DCAE Analytics Threshold Crossing Alert Application\\\\\\\", \\\\\\\"tcaSubscriberOutputStreamName\\\\\\\":\\\\\\\"TCASubscriberOutputStream\\\\\\\", \\\\\\\"thresholdCalculatorFlowletInstances\\\\\\\":2, \\\\\\\"tcaVESMessageStatusTableName\\\\\\\":\\\\\\\"TCAVESMessageStatusTable\\\\\\\", \\\\\\\"tcaVESMessageStatusTableTTLSeconds\\\\\\\":864000, \\\\\\\"tcaVESAlertsTableName\\\\\\\":\\\\\\\"TCAVESAlertsTable\\\\\\\", \\\\\\\"tcaVESAlertsTableTTLSeconds\\\\\\\":1728000 }}\\\"\\r\\n }\\r\\n },\\r\\n \\r\\n \\\"configuration\\\": {\\r\\n \\\"$class\\\": \\\"com.att.ecomp.dcae.clamp.common.MThresholdCrossingConfiguration\\\",\\r\\n \\\"subscriberContentType\\\": \\\"\\\",\\r\\n \\\"subscriberConsumerId\\\": \\\"c12\\\",\\r\\n \\\"subscriberConsumerGroup\\\": \\\"OpenDCAE-c12\\\",\\r\\n \\\"subscriberTimeoutMS\\\": \\\"-1\\\",\\r\\n \\\"subscriberMessageLimit\\\": \\\"-1\\\",\\r\\n \\\"subscriberPollingInterval\\\": \\\"20000\\\",\\r\\n \\\"publisherContentType\\\": \\\"application/json\\\",\\r\\n \\\"publisherMaxBatchSize\\\": \\\"10\\\",\\r\\n \\\"publisherMaxRecoveryQueueSize\\\": \\\"100000\\\",\\r\\n \\\"publisherPollingInterval\\\": \\\"20000\\\",\\r\\n \\\"publisherAlertWindowingTime\\\": \\\"86400\\\",\\r\\n \\\"policyName\\\": \\\"policy.dcae.configuration\\\",\\r\\n \\\"policyScope\\\": \\\"pnf=eNodeB;type=configuration\\\",\\r\\n \\\"policyVersion\\\": \\\"1.0.0\\\",\\r\\n \\\"domain\\\" : \\\"measurementsForVfScaling\\\",\\r\\n \\r\\n \\\"signatures\\\" : {\\r\\n \\t }\\r\\n\\r\\n }\\r\\n }\"]}]}", + "imageText":"CollectorTCAPolicy" +} \ No newline at end of file diff --git a/test/csit/tests/clamp/TCA/01__TCA.robot b/test/csit/tests/clamp/TCA/01__TCA.robot deleted file mode 100644 index 45f20f248..000000000 --- a/test/csit/tests/clamp/TCA/01__TCA.robot +++ /dev/null @@ -1,62 +0,0 @@ -*** Settings *** -Library Collections -Library RequestsLibrary -Library OperatingSystem -Library json - - -*** Test Cases *** -Get Requests health check ok - CreateSession clamp http://localhost:8080 - ${resp}= Get Request clamp /restservices/clds/v1/clds/healthcheck - Should Be Equal As Strings ${resp.status_code} 200 - -Put Requests to add template1 with yaml properties - ${auth}= Create List admin 5f4dcc3b5aa765d61d8327deb882cf99 - Create Session clamp http://localhost:8080 auth=${auth} - ${data}= Get Binary File ${CURDIR}${/}data${/}createTemplate1.json - &{headers}= Create Dictionary Content-Type=application/json - ${resp}= Put Request clamp /restservices/clds/v1/cldsTempate/template/template1 data=${data} headers=${headers} - Should Be Equal As Strings ${resp.status_code} 200 - -Put Requests to add template2 with yaml properties - ${auth}= Create List admin 5f4dcc3b5aa765d61d8327deb882cf99 - Create Session clamp http://localhost:8080 auth=${auth} - ${data}= Get Binary File ${CURDIR}${/}data${/}createTemplate2.json - &{headers}= Create Dictionary Content-Type=application/json - ${resp}= Put Request clamp /restservices/clds/v1/cldsTempate/template/template2 data=${data} headers=${headers} - Should Be Equal As Strings ${resp.status_code} 200 - -Get Requests verify template1 and template2 found - ${auth}= Create List admin 5f4dcc3b5aa765d61d8327deb882cf99 - Create Session clamp http://localhost:8080 auth=${auth} - ${resp}= Get Request clamp /restservices/clds/v1/cldsTempate/template-names - Should Be Equal As Strings ${resp.status_code} 200 - Should Contain Match ${resp} *template1* - Should Contain Match ${resp} *template2* - Should Not Contain Match ${resp} *template99* - -Put Requests to add Close Loop Model1 - ${auth}= Create List admin 5f4dcc3b5aa765d61d8327deb882cf99 - Create Session clamp http://localhost:8080 auth=${auth} - ${data}= Get Binary File ${CURDIR}${/}data${/}createModel1.json - &{headers}= Create Dictionary Content-Type=application/json - ${resp}= Put Request clamp /restservices/clds/v1/clds/model/Model1 data=${data} headers=${headers} - Should Be Equal As Strings ${resp.status_code} 200 - -Put Requests to add Close Loop Model2 - ${auth}= Create List admin 5f4dcc3b5aa765d61d8327deb882cf99 - Create Session clamp http://localhost:8080 auth=${auth} - ${data}= Get Binary File ${CURDIR}${/}data${/}createModel2.json - &{headers}= Create Dictionary Content-Type=application/json - ${resp}= Put Request clamp /restservices/clds/v1/clds/model/Model2 data=${data} headers=${headers} - Should Be Equal As Strings ${resp.status_code} 200 - -Get Requests verify Model1 and Model2 found - ${auth}= Create List admin 5f4dcc3b5aa765d61d8327deb882cf99 - Create Session clamp http://localhost:8080 auth=${auth} - ${resp}= Get Request clamp /restservices/clds/v1/clds/model-names - Should Be Equal As Strings ${resp.status_code} 200 - Should Contain Match ${resp} *Model1* - Should Contain Match ${resp} *Model2* - Should Not Contain Match ${resp} *Model99* diff --git a/test/csit/tests/clamp/TCA/__init__.robot b/test/csit/tests/clamp/TCA/__init__.robot deleted file mode 100644 index 5da0c75fa..000000000 --- a/test/csit/tests/clamp/TCA/__init__.robot +++ /dev/null @@ -1,2 +0,0 @@ -*** Settings *** -Documentation Clamp - TCA diff --git a/test/csit/tests/clamp/TCA/data/createModel1.json b/test/csit/tests/clamp/TCA/data/createModel1.json deleted file mode 100644 index 49ff85c28..000000000 --- a/test/csit/tests/clamp/TCA/data/createModel1.json +++ /dev/null @@ -1,8 +0,0 @@ -{ - "name": "Model1", - "controlNamePrefix": "ClosedLoop-", - "bpmnText": " SequenceFlow_0wokvsg SequenceFlow_0wokvsg SequenceFlow_0w8129u SequenceFlow_0w8129u SequenceFlow_0bdkahu SequenceFlow_0bdkahu SequenceFlow_039geog SequenceFlow_039geog ", - "propText": "{\"Collector_04kan6k\":[{\"name\":\"topicPublishes\",\"value\":\"DCAE-COLLECTOR-UCSNMP\"}],\"TCA_0laok3g\":{\"New_Set\":[{\"name\":\"tname\",\"value\":\"New_Set\"},{\"name\":\"tuuid\",\"value\":\"06663292-a9ca-te93-329f-bd12accc6bd9\"},{\"name\":\"tnfc\",\"value\":\"\"},{\"name\":\"tcaEnab\",\"value\":\"on\"},{\"name\":\"tcaPolId\",\"value\":\"\"},{\"name\":\"tcaInt\",\"value\":\"1\"},{\"name\":\"tcaSev\",\"value\":\"Normal\"},{\"name\":\"tcaVio\",\"value\":\"1\"},{\"serviceConfigurations\":[]}]},\"Policy_1u1q61z\":{}}", - "imageText": "", - "templateName": "template1" -} \ No newline at end of file diff --git a/test/csit/tests/clamp/TCA/data/createModel2.json b/test/csit/tests/clamp/TCA/data/createModel2.json deleted file mode 100644 index 6e08bc4ad..000000000 --- a/test/csit/tests/clamp/TCA/data/createModel2.json +++ /dev/null @@ -1,8 +0,0 @@ -{ - "name": "Model2", - "controlNamePrefix": "ClosedLoop-", - "bpmnText": " SequenceFlow_0wokvsg SequenceFlow_0wokvsg SequenceFlow_0w8129u SequenceFlow_0w8129u SequenceFlow_0bdkahu SequenceFlow_0bdkahu SequenceFlow_039geog SequenceFlow_039geog ", - "propText": "{\"Collector_04kan6k\":[{\"name\":\"topicPublishes\",\"value\":\"DCAE-COLLECTOR-UCSNMP\"}],\"TCA_0laok3g\":{\"TCA1\":[{\"name\":\"tname\",\"value\":\"TCA1\"},{\"name\":\"tuuid\",\"value\":\"22edf952-0c3f-t957-94e0-d5911e155aff\"},{\"name\":\"tnfc\",\"value\":\"\"},{\"name\":\"tcaEnab\",\"value\":\"on\"},{\"name\":\"tcaPol\",\"value\":\"Policy1\"},{\"name\":\"tcaPolId\",\"value\":\"0\"},{\"name\":\"tcaInt\",\"value\":\"1\"},{\"name\":\"tcaSev\",\"value\":\"Normal\"},{\"name\":\"tcaVio\",\"value\":\"1\"},{\"serviceConfigurations\":[]}]},\"Policy_1u1q61z\":{\"Policy1\":[{\"name\":\"pname\",\"value\":\"Policy1\"},{\"name\":\"pid\",\"value\":\"0\"},{\"name\":\"timeout\",\"value\":\"345\"},{\"policyConfigurations\":[[{\"name\":\"recipe\",\"value\":[\"migrate\"]},{\"name\":\"maxRetries\",\"value\":[\"3\"]},{\"name\":\"retryTimeLimit\",\"value\":[\"180\"]},{\"name\":\"_id\",\"value\":[\"Maw1TWE\"]},{\"name\":\"parentPolicy\",\"value\":[\"\"]}]]}]},\"global\":[{\"name\":\"service\",\"value\":[\"e27f3679-8d95-4ee1-a5a3-95a7e243306f\"]},{\"name\":\"vf\",\"value\":[\"6c7aaec2-59eb-41d9-8681-b7f976ab668d\"]},{\"name\":\"actionSet\",\"value\":[\"vnfRecipe\"]}]}", - "imageText": "", - "templateName": "template1" -} \ No newline at end of file diff --git a/test/csit/tests/clamp/TCA/data/createTemplate1.json b/test/csit/tests/clamp/TCA/data/createTemplate1.json deleted file mode 100644 index b6363ef9e..000000000 --- a/test/csit/tests/clamp/TCA/data/createTemplate1.json +++ /dev/null @@ -1,7 +0,0 @@ -{ - "name": "template1", - "controlNamePrefix": "ClosedLoop-", - "bpmnText": " SequenceFlow_0wokvsg SequenceFlow_0wokvsg SequenceFlow_0w8129u SequenceFlow_0w8129u SequenceFlow_0bdkahu SequenceFlow_0bdkahu SequenceFlow_039geog SequenceFlow_039geog ", - "propText": "{\"global\":[{\"name\":\"service\",\"value\":[\"tosca_definitions_version: cloudify_dsl_1_2\\r\\n\\r\\nimports:\\r\\n- http://www.getcloudify.org/spec/cloudify/3.3.1/types.yaml\\r\\n- http://127.0.0.1/1607_prod/type_files/cdap_app.yaml\\r\\n\\r\\nnode_templates:\\r\\n MTCA:\\r\\n type: dcae.nodes.cdap_app\\r\\n properties:\\r\\n service_name: \\\"cdap-mtca-central\\\"\\r\\n deployment_JSON: |-\\r\\n {\\r\\n \\\"clusterService\\\": {\\\"$ref\\\": \\\"/services/vm-cdap-cluster-central/instances/rdm2c\\\"},\\r\\n \\\"namespace\\\": \\\"MTCA\\\",\\r\\n \\\"appNames\\\": [ \\\"cdap-mtca\\\" ],\\r\\n \\\"flowNames\\\": [ \\\"cdap-mtca.TCAVESCollectorFlow\\\" ],\\r\\n \\\"workerNames\\\": [\\\"cdap-mtca.TCADMaaPMRSubscriberWorker\\\", \\\"cdap-mtca.TCADMaaPMRPublisherWorker\\\"],\\r\\n \\\"serviceNames\\\" : [],\\r\\n \\\"apps\\\": {\\r\\n \\\"cdap-mtca\\\": {\\r\\n \\\"jarFile\\\": \\\"/opt/app/cdap-apps/dcae-analytics-mtca-1.0.0.jar\\\",\\r\\n \\\"artifactName\\\": \\\"dcae-analytics-mtca\\\",\\r\\n \\\"version\\\": \\\"1.0.0\\\",\\r\\n \\\"appConfigFileContent\\\": \\\"{config:{ \\\\\\\"appName\\\\\\\":\\\\\\\"cdap-mtca\\\\\\\", \\\\\\\"appDescription\\\\\\\":\\\\\\\"DCAE Analytics Threshold Crossing Alert Application\\\\\\\", \\\\\\\"tcaSubscriberOutputStreamName\\\\\\\":\\\\\\\"TCASubscriberOutputStream\\\\\\\", \\\\\\\"thresholdCalculatorFlowletInstances\\\\\\\":2, \\\\\\\"tcaVESMessageStatusTableName\\\\\\\":\\\\\\\"TCAVESMessageStatusTable\\\\\\\", \\\\\\\"tcaVESMessageStatusTableTTLSeconds\\\\\\\":864000, \\\\\\\"tcaVESAlertsTableName\\\\\\\":\\\\\\\"TCAVESAlertsTable\\\\\\\", \\\\\\\"tcaVESAlertsTableTTLSeconds\\\\\\\":1728000 }}\\\"\\r\\n }\\r\\n },\\r\\n \\r\\n \\\"configuration\\\": {\\r\\n \\\"$class\\\": \\\"com.att.ecomp.dcae.clamp.common.MThresholdCrossingConfiguration\\\",\\r\\n \\\"subscriberContentType\\\": \\\"\\\",\\r\\n \\\"subscriberConsumerId\\\": \\\"c12\\\",\\r\\n \\\"subscriberConsumerGroup\\\": \\\"OpenDCAE-c12\\\",\\r\\n \\\"subscriberTimeoutMS\\\": \\\"-1\\\",\\r\\n \\\"subscriberMessageLimit\\\": \\\"-1\\\",\\r\\n \\\"subscriberPollingInterval\\\": \\\"20000\\\",\\r\\n \\\"publisherContentType\\\": \\\"application/json\\\",\\r\\n \\\"publisherMaxBatchSize\\\": \\\"10\\\",\\r\\n \\\"publisherMaxRecoveryQueueSize\\\": \\\"100000\\\",\\r\\n \\\"publisherPollingInterval\\\": \\\"20000\\\",\\r\\n \\\"publisherAlertWindowingTime\\\": \\\"86400\\\",\\r\\n \\\"policyName\\\": \\\"policy.dcae.configuration\\\",\\r\\n \\\"policyScope\\\": \\\"pnf=eNodeB;type=configuration\\\",\\r\\n \\\"policyVersion\\\": \\\"1.0.0\\\",\\r\\n \\\"domain\\\" : \\\"measurementsForVfScaling\\\",\\r\\n \\r\\n \\\"signatures\\\" : {\\r\\n \\t }\\r\\n\\r\\n }\\r\\n }\"]}]}", - "imageText":"CollectorTCAPolicy" -} \ No newline at end of file diff --git a/test/csit/tests/clamp/TCA/data/createTemplate2.json b/test/csit/tests/clamp/TCA/data/createTemplate2.json deleted file mode 100644 index b246fdc26..000000000 --- a/test/csit/tests/clamp/TCA/data/createTemplate2.json +++ /dev/null @@ -1,7 +0,0 @@ -{ - "name": "template2", - "controlNamePrefix": "ClosedLoop-", - "bpmnText": " SequenceFlow_0wokvsg SequenceFlow_0wokvsg SequenceFlow_0w8129u SequenceFlow_0w8129u SequenceFlow_0bdkahu SequenceFlow_0bdkahu SequenceFlow_039geog SequenceFlow_039geog ", - "propText": "{\"global\":[{\"name\":\"service\",\"value\":[\"tosca_definitions_version: cloudify_dsl_1_2\\r\\n\\r\\nimports:\\r\\n- http://www.getcloudify.org/spec/cloudify/3.3.1/types.yaml\\r\\n- http://127.0.0.1/1607_prod/type_files/cdap_app.yaml\\r\\n\\r\\nnode_templates:\\r\\n MTCA:\\r\\n type: dcae.nodes.cdap_app\\r\\n properties:\\r\\n service_name: \\\"cdap-mtca-central\\\"\\r\\n deployment_JSON: |-\\r\\n {\\r\\n \\\"clusterService\\\": {\\\"$ref\\\": \\\"/services/vm-cdap-cluster-central/instances/rdm2c\\\"},\\r\\n \\\"namespace\\\": \\\"MTCA\\\",\\r\\n \\\"appNames\\\": [ \\\"cdap-mtca\\\" ],\\r\\n \\\"flowNames\\\": [ \\\"cdap-mtca.TCAVESCollectorFlow\\\" ],\\r\\n \\\"workerNames\\\": [\\\"cdap-mtca.TCADMaaPMRSubscriberWorker\\\", \\\"cdap-mtca.TCADMaaPMRPublisherWorker\\\"],\\r\\n \\\"serviceNames\\\" : [],\\r\\n \\\"apps\\\": {\\r\\n \\\"cdap-mtca\\\": {\\r\\n \\\"jarFile\\\": \\\"/opt/app/cdap-apps/dcae-analytics-mtca-1.0.0.jar\\\",\\r\\n \\\"artifactName\\\": \\\"dcae-analytics-mtca\\\",\\r\\n \\\"version\\\": \\\"1.0.0\\\",\\r\\n \\\"appConfigFileContent\\\": \\\"{config:{ \\\\\\\"appName\\\\\\\":\\\\\\\"cdap-mtca\\\\\\\", \\\\\\\"appDescription\\\\\\\":\\\\\\\"DCAE Analytics Threshold Crossing Alert Application\\\\\\\", \\\\\\\"tcaSubscriberOutputStreamName\\\\\\\":\\\\\\\"TCASubscriberOutputStream\\\\\\\", \\\\\\\"thresholdCalculatorFlowletInstances\\\\\\\":2, \\\\\\\"tcaVESMessageStatusTableName\\\\\\\":\\\\\\\"TCAVESMessageStatusTable\\\\\\\", \\\\\\\"tcaVESMessageStatusTableTTLSeconds\\\\\\\":864000, \\\\\\\"tcaVESAlertsTableName\\\\\\\":\\\\\\\"TCAVESAlertsTable\\\\\\\", \\\\\\\"tcaVESAlertsTableTTLSeconds\\\\\\\":1728000 }}\\\"\\r\\n }\\r\\n },\\r\\n \\r\\n \\\"configuration\\\": {\\r\\n \\\"$class\\\": \\\"com.att.ecomp.dcae.clamp.common.MThresholdCrossingConfiguration\\\",\\r\\n \\\"subscriberContentType\\\": \\\"\\\",\\r\\n \\\"subscriberConsumerId\\\": \\\"c12\\\",\\r\\n \\\"subscriberConsumerGroup\\\": \\\"OpenDCAE-c12\\\",\\r\\n \\\"subscriberTimeoutMS\\\": \\\"-1\\\",\\r\\n \\\"subscriberMessageLimit\\\": \\\"-1\\\",\\r\\n \\\"subscriberPollingInterval\\\": \\\"20000\\\",\\r\\n \\\"publisherContentType\\\": \\\"application/json\\\",\\r\\n \\\"publisherMaxBatchSize\\\": \\\"10\\\",\\r\\n \\\"publisherMaxRecoveryQueueSize\\\": \\\"100000\\\",\\r\\n \\\"publisherPollingInterval\\\": \\\"20000\\\",\\r\\n \\\"publisherAlertWindowingTime\\\": \\\"86400\\\",\\r\\n \\\"policyName\\\": \\\"policy.dcae.configuration\\\",\\r\\n \\\"policyScope\\\": \\\"pnf=eNodeB;type=configuration\\\",\\r\\n \\\"policyVersion\\\": \\\"1.0.0\\\",\\r\\n \\\"domain\\\" : \\\"measurementsForVfScaling\\\",\\r\\n \\r\\n \\\"signatures\\\" : {\\r\\n \\t }\\r\\n\\r\\n }\\r\\n }\"]}]}", - "imageText":"CollectorTCAPolicy" -} \ No newline at end of file diff --git a/test/csit/tests/clamp/UIs/01__Create_TCA_template.robot b/test/csit/tests/clamp/UIs/01__Create_TCA_template.robot new file mode 100644 index 000000000..447fc8465 --- /dev/null +++ b/test/csit/tests/clamp/UIs/01__Create_TCA_template.robot @@ -0,0 +1,81 @@ +*** Settings *** +Library Collections +Library RequestsLibrary +Library OperatingSystem +Library json +Library Selenium2Library +Library XvfbRobot + + +*** Test Cases *** +Get Requests health check ok + CreateSession clamp http://localhost:8080 + ${resp}= Get Request clamp /restservices/clds/v1/clds/healthcheck + Should Be Equal As Strings ${resp.status_code} 200 + +Open Browser +# Next line is to be enabled for Headless tests only (jenkins?). To see the tests desable the line. + Start Virtual Display 1920 1080 + Open Browser http://localhost:8080/designer/index.html browser=firefox + Set Selenium Speed .2 seconds + Set Window Size 1920 1080 + ${title}= Get Title + Should Be Equal CLDS ${title} + +Bad Login to Clamp UI and Verify not logged in + Input Text locator=username text=bad_login + Input Text locator=password text=This_is_bad_password + Press Key locator=password key=\\13 + Wait Until Element Is Visible locator=username timeout=5 + Page Should Not Contain Element xpath=//*[@class="navbar-brand logo_name ng-binding"] expected=*Hello:admin* + +Good Login to Clamp UI and Verify logged in + Input Text locator=username text=admin + Input Text locator=password text=password + Press Key locator=password key=\\13 + Wait Until Element Is Visible xpath=//*[@class="navbar-brand logo_name ng-binding"] timeout=60 + Element Text Should Be xpath=//*[@class="navbar-brand logo_name ng-binding"] expected=Hello:admin + +Create Template from Menu + Wait Until Element Is Visible xpath=//*[@id="navbar"]/ul/li[1]/a timeout=60 + Click Element xpath=//*[@id="navbar"]/ul/li[1]/a + Wait Until Element Is Visible locator=Create Template timeout=60 + Click Element locator=Create Template + Input Text locator=modelName text=TCATemplate + Click Button locator=OK + +Drag and Drop Boxes for template + Wait Until Element Is Visible xpath=//*[@class="entry icon-collector-node"] timeout=60 + Drag And Drop By Offset xpath=//*[@class="entry icon-collector-node"] 280 280 + Drag And Drop By Offset xpath=//*[@class="entry icon-tca-node"] 550 280 + Drag And Drop By Offset xpath=//*[@class="entry icon-policy-node"] 800 280 + Drag And Drop By Offset xpath=//*[@class="entry icon-end-event-none"] 1000 280 + +Drag and Drop Connectors for template + Click Element xpath=//*[starts-with(@data-element-id, "StartEvent_")] + Wait Until Element Is Enabled xpath=//*[@id="js-canvas"]/div/div/div[2]/div[5]/div/div/div[2]/div + Drag And Drop xpath=//*[@id="js-canvas"]/div/div/div[2]/div[5]/div/div/div[2]/div xpath=//*[starts-with(@data-element-id, "Collector_")] + Wait Until Element Is Enabled xpath=//*[@id="js-canvas"]/div/div/div[2]/div[1]/div/div/div[3]/div + Drag And Drop xpath=//*[@id="js-canvas"]/div/div/div[2]/div[1]/div/div/div[3]/div xpath=//*[starts-with(@data-element-id, "TCA_")] + Wait Until Element Is Enabled xpath=//*[@id="js-canvas"]/div/div/div[2]/div[2]/div/div/div[3]/div + Drag And Drop xpath=//*[@id="js-canvas"]/div/div/div[2]/div[2]/div/div/div[3]/div xpath=//*[starts-with(@data-element-id, "Policy_")] + Wait Until Element Is Enabled xpath=//*[@id="js-canvas"]/div/div/div[2]/div[3]/div/div/div[3]/div + Drag And Drop xpath=//*[@id="js-canvas"]/div/div/div[2]/div[3]/div/div/div[3]/div xpath=//*[starts-with(@data-element-id, "EndEvent_")] + +Add Template properties yaml from Menu + Click Element xpath=//*[@id="navbar"]/ul/li[1]/a + Wait Until Element Is Visible locator=Template Properties timeout=60 + Click Element locator=Template Properties + ${data}= Get Binary File ${CURDIR}${/}data${/}TCA_template_properties.yml + Input Text locator=service text=${data} + Click Button locator=Close + +Save Template from Menu + Click Element xpath=//*[@id="navbar"]/ul/li[1]/a + Wait Until Element Is Visible locator=Save Template timeout=60 + Click Element locator=Save Template + Wait Until Element Is Visible xpath=//*[@id="alert_message_"] timeout=60 + Element Text Should Be xpath=//*[@id="alert_message_"] expected=Action Successful:SAVE + +Close Browser + Close Browser \ No newline at end of file diff --git a/test/csit/tests/clamp/UIs/01__Create_template.robot b/test/csit/tests/clamp/UIs/01__Create_template.robot deleted file mode 100644 index d740ac987..000000000 --- a/test/csit/tests/clamp/UIs/01__Create_template.robot +++ /dev/null @@ -1,81 +0,0 @@ -*** Settings *** -Library Collections -Library RequestsLibrary -Library OperatingSystem -Library json -Library Selenium2Library -Library XvfbRobot - - -*** Test Cases *** -Get Requests health check ok - CreateSession clamp http://localhost:8080 - ${resp}= Get Request clamp /restservices/clds/v1/clds/healthcheck - Should Be Equal As Strings ${resp.status_code} 200 - -Open Browser -# Next line is to be enabled for Headless tests only (jenkins?). To see the tests desable the line. - Start Virtual Display 1920 1080 - Open Browser http://localhost:8080/designer/index.html browser=firefox - Set Selenium Speed .2 seconds - Set Window Size 1920 1080 - ${title}= Get Title - Should Be Equal CLDS ${title} - -Bad Login to Clamp UI and Verify not logged in - Input Text locator=username text=bad_login - Input Text locator=password text=This_is_bad_password - Press Key locator=password key=\\13 - Wait Until Element Is Visible locator=username timeout=5 - Page Should Not Contain Element xpath=//*[@class="navbar-brand logo_name ng-binding"] expected=*Hello:admin* - -Good Login to Clamp UI and Verify logged in - Input Text locator=username text=admin - Input Text locator=password text=password - Press Key locator=password key=\\13 - Wait Until Element Is Visible xpath=//*[@class="navbar-brand logo_name ng-binding"] timeout=60 - Element Text Should Be xpath=//*[@class="navbar-brand logo_name ng-binding"] expected=Hello:admin - -Create Template from Menu - Wait Until Element Is Visible xpath=//*[@id="navbar"]/ul/li[1]/a timeout=60 - Click Element xpath=//*[@id="navbar"]/ul/li[1]/a - Wait Until Element Is Visible locator=Create Template timeout=60 - Click Element locator=Create Template - Input Text locator=modelName text=template - Click Button locator=OK - -Drag and Drop Boxes for template - Wait Until Element Is Visible xpath=//*[@class="entry icon-collector-node"] timeout=60 - Drag And Drop By Offset xpath=//*[@class="entry icon-collector-node"] 280 280 - Drag And Drop By Offset xpath=//*[@class="entry icon-tca-node"] 550 280 - Drag And Drop By Offset xpath=//*[@class="entry icon-policy-node"] 800 280 - Drag And Drop By Offset xpath=//*[@class="entry icon-end-event-none"] 1000 280 - -Drag and Drop Connectors for template - Click Element xpath=//*[starts-with(@data-element-id, "StartEvent_")] - Wait Until Element Is Enabled xpath=//*[@id="js-canvas"]/div/div/div[2]/div[5]/div/div/div[2]/div - Drag And Drop xpath=//*[@id="js-canvas"]/div/div/div[2]/div[5]/div/div/div[2]/div xpath=//*[starts-with(@data-element-id, "Collector_")] - Wait Until Element Is Enabled xpath=//*[@id="js-canvas"]/div/div/div[2]/div[1]/div/div/div[3]/div - Drag And Drop xpath=//*[@id="js-canvas"]/div/div/div[2]/div[1]/div/div/div[3]/div xpath=//*[starts-with(@data-element-id, "TCA_")] - Wait Until Element Is Enabled xpath=//*[@id="js-canvas"]/div/div/div[2]/div[2]/div/div/div[3]/div - Drag And Drop xpath=//*[@id="js-canvas"]/div/div/div[2]/div[2]/div/div/div[3]/div xpath=//*[starts-with(@data-element-id, "Policy_")] - Wait Until Element Is Enabled xpath=//*[@id="js-canvas"]/div/div/div[2]/div[3]/div/div/div[3]/div - Drag And Drop xpath=//*[@id="js-canvas"]/div/div/div[2]/div[3]/div/div/div[3]/div xpath=//*[starts-with(@data-element-id, "EndEvent_")] - -Add Template properties yaml from Menu - Click Element xpath=//*[@id="navbar"]/ul/li[1]/a - Wait Until Element Is Visible locator=Template Properties timeout=60 - Click Element locator=Template Properties - ${data}= Get Binary File ${CURDIR}${/}data${/}TCA_template_properties.yml - Input Text locator=service text=${data} - Click Button locator=Close - -Save Template from Menu - Click Element xpath=//*[@id="navbar"]/ul/li[1]/a - Wait Until Element Is Visible locator=Save Template timeout=60 - Click Element locator=Save Template - Wait Until Element Is Visible xpath=//*[@id="alert_message_"] timeout=60 - Element Text Should Be xpath=//*[@id="alert_message_"] expected=Action Successful:SAVE - -Close Browser - Close Browser \ No newline at end of file diff --git a/test/csit/tests/clamp/UIs/02__Create_TCA_model.robot b/test/csit/tests/clamp/UIs/02__Create_TCA_model.robot new file mode 100644 index 000000000..9f287cac7 --- /dev/null +++ b/test/csit/tests/clamp/UIs/02__Create_TCA_model.robot @@ -0,0 +1,50 @@ +*** Settings *** +Library Collections +Library RequestsLibrary +Library OperatingSystem +Library json +Library Selenium2Library +Library XvfbRobot + + +*** Test Cases *** +Get Requests health check ok + CreateSession clamp http://localhost:8080 + ${resp}= Get Request clamp /restservices/clds/v1/clds/healthcheck + Should Be Equal As Strings ${resp.status_code} 200 + +Open Browser +# Next line is to be enabled for Headless tests only (jenkins?). To see the tests desable the line. + Start Virtual Display 1920 1080 + Open Browser http://localhost:8080/designer/index.html browser=firefox + Set Selenium Speed .2 seconds + Set Window Size 1920 1080 + ${title}= Get Title + Should Be Equal CLDS ${title} + +Good Login to Clamp UI and Verify logged in + Input Text locator=username text=admin + Input Text locator=password text=password + Press Key locator=password key=\\13 + Wait Until Element Is Visible xpath=//*[@class="navbar-brand logo_name ng-binding"] timeout=60 + Element Text Should Be xpath=//*[@class="navbar-brand logo_name ng-binding"] expected=Hello:admin + +Create Model from Menu + Wait Until Element Is Visible xpath=//*[@id="navbar"]/ul/li[2]/a timeout=60 + Click Element xpath=//*[@id="navbar"]/ul/li[2]/a + Wait Until Element Is Visible locator=Create CL timeout=60 + Click Element locator=Create CL + Input Text locator=modelName text=TCAModel + Select From List By Label id=templateName TCATemplate + Click Button locator=Create + +Save Model from Menu + Wait Until Element Is Visible xpath=//*[@id="navbar"]/ul/li[2]/a timeout=60 + Click Element xpath=//*[@id="navbar"]/ul/li[2]/a + Wait Until Element Is Visible locator=Save CL timeout=60 + Click Element locator=Save CL + Wait Until Element Is Visible xpath=//*[@id="alert_message_"] timeout=60 + Element Text Should Be xpath=//*[@id="alert_message_"] expected=Action Successful:SAVE + +Close Browser + Close Browser diff --git a/test/csit/tests/clamp/UIs/02__Create_model.robot b/test/csit/tests/clamp/UIs/02__Create_model.robot deleted file mode 100644 index 979a9802e..000000000 --- a/test/csit/tests/clamp/UIs/02__Create_model.robot +++ /dev/null @@ -1,48 +0,0 @@ -*** Settings *** -Library Collections -Library RequestsLibrary -Library OperatingSystem -Library json -Library Selenium2Library -Library XvfbRobot - - -*** Test Cases *** -Get Requests health check ok - CreateSession clamp http://localhost:8080 - ${resp}= Get Request clamp /restservices/clds/v1/clds/healthcheck - Should Be Equal As Strings ${resp.status_code} 200 - -Open Browser -# Next line is to be enabled for Headless tests only (jenkins?). To see the tests desable the line. - Start Virtual Display 1920 1080 - Open Browser http://localhost:8080/designer/index.html browser=firefox - Set Selenium Speed .2 seconds - Set Window Size 1920 1080 - ${title}= Get Title - Should Be Equal CLDS ${title} - -Good Login to Clamp UI and Verify logged in - Input Text locator=username text=admin - Input Text locator=password text=password - Press Key locator=password key=\\13 - Wait Until Element Is Visible xpath=//*[@class="navbar-brand logo_name ng-binding"] timeout=60 - Element Text Should Be xpath=//*[@class="navbar-brand logo_name ng-binding"] expected=Hello:admin - -Create Model from Menu - Wait Until Element Is Visible xpath=//*[@id="navbar"]/ul/li[2]/a timeout=60 - Click Element xpath=//*[@id="navbar"]/ul/li[2]/a - Wait Until Element Is Visible locator=Create CL timeout=60 - Click Element locator=Create CL - Input Text locator=modelName text=model1 - Click Button locator=Create - -Save Model from Menu - Click Element xpath=//*[@id="navbar"]/ul/li[2]/a - Wait Until Element Is Visible locator=Save CL timeout=60 - Click Element locator=Save CL - Wait Until Element Is Visible xpath=//*[@id="alert_message_"] timeout=60 - Element Text Should Be xpath=//*[@id="alert_message_"] expected=Action Successful:SAVE - -Close Browser - Close Browser -- cgit 1.2.3-korg