From 460b4806813d4abbcb8d379f9297a41d6e519c4b Mon Sep 17 00:00:00 2001 From: subhash kumar singh Date: Thu, 8 Oct 2020 18:13:40 +0530 Subject: [PATCH] Automation of nodeb state API Automate test cases for nodeb state API using following test case. Change-Id: I62ba35859fcca3688b04e16ecf29c026b293fad8 ------------------------------------------------------------------------------ Get NodeB state | PASS | ------------------------------------------------------------------------------ Issue-ID: RIC-643 Signed-off-by: subhash kumar singh Change-Id: I71693a23b636b5159a2d08c96c5f439342e257b6 --- .../Tests/Get_NodeB_State/Get_NodeB_State.robot | 63 ++++++++++++++++++++++ Automation/Tests/Get_NodeB_State/__init__.robot | 24 +++++++++ Automation/Tests/Resource/Keywords.robot | 5 ++ Automation/Tests/Resource/resource.robot | 1 + 4 files changed, 93 insertions(+) create mode 100644 Automation/Tests/Get_NodeB_State/Get_NodeB_State.robot create mode 100644 Automation/Tests/Get_NodeB_State/__init__.robot diff --git a/Automation/Tests/Get_NodeB_State/Get_NodeB_State.robot b/Automation/Tests/Get_NodeB_State/Get_NodeB_State.robot new file mode 100644 index 0000000..6a3662e --- /dev/null +++ b/Automation/Tests/Get_NodeB_State/Get_NodeB_State.robot @@ -0,0 +1,63 @@ +############################################################################## +# +# Copyright (c) 2020 Samsung Electronics Co., Ltd. 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. +# +############################################################################## +# +# This source code is part of the near-RT RIC (RAN Intelligent Controller) +# platform project (RICP). +# + + +*** Settings *** +Variables ../Scripts/variables.py +Resource ../Resource/resource.robot +Resource ../Resource/Keywords.robot +Library OperatingSystem +Library ../Scripts/log_scripts.py +Library REST ${url} + + +*** Variables *** +${url} ${e2mgr_address} + + +*** Test Cases *** + +Get NodeB state + Sleep 2s + Add eNb Request + Sleep 2s + Get NodeB state request + Integer response status 200 + String response body inventoryName ${enb_ran_name} + String response body connectionStatus DISCONNECTED + String response body globalNbId plmnId def + String response body globalNbId nbId abc + +prepare logs for tests + Remove log files + Save logs + + + + + + + + + + + diff --git a/Automation/Tests/Get_NodeB_State/__init__.robot b/Automation/Tests/Get_NodeB_State/__init__.robot new file mode 100644 index 0000000..8edaad6 --- /dev/null +++ b/Automation/Tests/Get_NodeB_State/__init__.robot @@ -0,0 +1,24 @@ +############################################################################## +# +# Copyright (c) 2020 Samsung Electronics Co., Ltd. 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. +# +############################################################################## +# +# This source code is part of the near-RT RIC (RAN Intelligent Controller) +# platform project (RICP). +# + +*** Settings *** +Documentation Get_NodeB_State diff --git a/Automation/Tests/Resource/Keywords.robot b/Automation/Tests/Resource/Keywords.robot index 19e5b18..552f4ab 100644 --- a/Automation/Tests/Resource/Keywords.robot +++ b/Automation/Tests/Resource/Keywords.robot @@ -44,6 +44,11 @@ Add eNb Request Sleep 1s POST ${enb_url} ${request} +Get NodeB state request + [Arguments] ${request}=${nodeb_state_url} + Sleep 1s + GET ${request} + Delete eNb Request Sleep 1s DELETE ${enb_url}/${enb_ran_name} diff --git a/Automation/Tests/Resource/resource.robot b/Automation/Tests/Resource/resource.robot index f570b3b..453b236 100644 --- a/Automation/Tests/Resource/resource.robot +++ b/Automation/Tests/Resource/resource.robot @@ -34,6 +34,7 @@ ${set_general_configuration} /v1/nodeb/parameters ${set_general_configuration_body} {"enableRic":false} ${update_gnb_url} /v1/nodeb/gnb/${ranName} ${enb_url} /v1/nodeb/enb +${nodeb_state_url} /v1/nodeb/states/${enb_ran_name} ${update_gnb_body} {"servedNrCells":[{"servedNrCellInformation":{"cellId":"abcd","choiceNrMode":{"fdd":{}},"nrMode":1,"nrPci":1,"servedPlmns":["whatever"]},"nrNeighbourInfos":[{"nrCgi":"one","choiceNrMode":{"fdd":{}},"nrMode":1,"nrPci":1}]}]} ${update_gnb_body_notvalid} {"servedNrCells":[{"servedNrCellInformation":{"choiceNrMode":{"fdd":{}},"nrMode":1,"nrPci":1,"servedPlmns":["whatever"]},"nrNeighbourInfos":[{"nrCgi":"whatever","choiceNrMode":{"fdd":{}},"nrMode":1,"nrPci":1}]}]} ${add_enb_request_body} {"ranName":"${enb_ran_name}","globalNbId":{"nbId":"abc","plmnId":"def"},"port":1234,"enb":{"enbType":3,"guGroupIds":["ghi"],"servedCells":[{"broadcastPlmns":["jkl"],"cellId":"mnop","choiceEutraMode":{"fdd":{"dlearFcn":1,"ulearFcn":1},"tdd":{"additionalSpecialSubframeExtensionInfo":{"additionalSpecialSubframePatternsExtension":1,"cyclicPrefixDl":1,"cyclicPrefixUl":1},"additionalSpecialSubframeInfo":{"additionalSpecialSubframePatterns":1,"cyclicPrefixDl":1,"cyclicPrefixUl":1},"earFcn":4,"specialSubframeInfo":{"specialSubframePatterns":1,"cyclicPrefixDl":1,"cyclicPrefixUl":1}}},"eutraMode":1,"csgId":"string","mbmsServiceAreaIdentities":["sds"],"mbsfnSubframeInfos":[{"radioframeAllocationOffset":3,"subframeAllocation":"jhg"}],"multibandInfos":[4],"neighbourInfos":[{"earFcn":4,"ecgi":"klj","pci":5,"tac":"wew"}],"pci":2,"prachConfiguration":{"highSpeedFlag":true,"prachConfigurationIndex":5,"prachFrequencyOffset":6,"rootSequenceIndex":7,"zeroCorrelationZoneConfiguration":6},"tac":"asd","additionalCellInformation":{"cellLatitude":1,"cellLongitude":1,"antennaHeight":1,"antennaAzimuthDirection":2,"antennaTiltAngle":3,"antennaMaxTransmit":4,"antennaMaxGain":5,"sectorId":6}},{"broadcastPlmns":["jkl"],"cellId":"qrst","choiceEutraMode":{"fdd":{"dlearFcn":4,"ulearFcn":2},"tdd":{"additionalSpecialSubframeExtensionInfo":{"additionalSpecialSubframePatternsExtension":1,"cyclicPrefixDl":1,"cyclicPrefixUl":1},"additionalSpecialSubframeInfo":{"additionalSpecialSubframePatterns":1,"cyclicPrefixDl":1,"cyclicPrefixUl":1},"earFcn":4,"specialSubframeInfo":{"specialSubframePatterns":1,"cyclicPrefixDl":1,"cyclicPrefixUl":1}}},"eutraMode":1,"csgId":"string","mbmsServiceAreaIdentities":["sds"],"mbsfnSubframeInfos":[{"radioframeAllocationOffset":5,"subframeAllocation":"jhg"}],"multibandInfos":[4],"neighbourInfos":[{"earFcn":2,"ecgi":"klj","pci":4,"tac":"wew"}],"pci":3,"prachConfiguration":{"highSpeedFlag":true,"prachConfigurationIndex":4,"prachFrequencyOffset":3,"rootSequenceIndex":3,"zeroCorrelationZoneConfiguration":2},"tac":"asd","additionalCellInformation":{"cellLatitude":3,"cellLongitude":3,"antennaHeight":3,"antennaAzimuthDirection":3,"antennaTiltAngle":4,"antennaMaxTransmit":4,"antennaMaxGain":5,"sectorId":5}}]}} -- 2.16.6