Cord Api Test directory structure and template files
Change-Id: Ib584b291ec1b4286c179991f2916c6e2cf7642a9
diff --git a/src/test/cord-api/Tests/Robot-TemplateTest.txt b/src/test/cord-api/Tests/Robot-TemplateTest.txt
new file mode 100644
index 0000000..ec0f5d2
--- /dev/null
+++ b/src/test/cord-api/Tests/Robot-TemplateTest.txt
@@ -0,0 +1,51 @@
+*** Settings ***
+Documentation Test suite for Subscriber verification
+Suite Setup Read InputFile
+Test Template Verify Subscriber functionality
+Library Collections
+Library String
+Library OperatingSystem
+Library XML
+Library RequestsLibrary
+Library ../Framework/restapi/RestApiTest.py
+Library ../Framework/restapi/utils.py
+
+*** Variables ***
+${USER} admin
+${PASSWORD} admin
+${PATHFILE} ${CURDIR}/../Framework/restapi/Subscribers.json
+
+*** Test Cases *** TYPE LISTINDEX
+Test Subscriber-1 CREATEP 0
+
+Test Get_Subscriber-1
+ RETRIEVE 0
+
+Test Subscriber-2 CREATEP 1
+
+Test Get_Subscriber-2
+ RETRIEVE 1
+
+*** Keywords ***
+Read InputFile
+ ${subscriberList} = utils.jsonToList ${PATHFILE} SubscriberInfo
+ Set Suite Variable ${slist} ${subscriberList}
+
+Verify Subscriber functionality
+ [Arguments] ${type} ${listIndex}
+ Run Keyword If "${type}" == "CREATEP" Test Post Subscriber API ${listIndex}
+ Run Keyword If "${type}" == "RETRIEVE" Test Get Subscriber API ${listIndex}
+
+Test Post Subscriber API
+ [Arguments] ${listIndex}
+ ${subscriberList} = Get Variable Value ${slist}
+ ${subscriberDict}= utils.listToDict ${subscriberList} ${listIndex}
+ ${api_result}= RestApiTest.TestPost ${subscriberDict}
+ Should Be True ${api_result}
+
+Test Get Subscriber API
+ [Arguments] ${listIndex}
+ ${json_result}= RestApiTest.TestGet
+ Log ${json_result}
+ #${actual_json}= Get From Dictionary ${subscriber.json} Subscriber
+ #Dictionaries Should Be Equal ${json_result} ${actual_json}