Presentation is loading. Please wait.

Presentation is loading. Please wait.

Function Test Framework

Similar presentations


Presentation on theme: "Function Test Framework"— Presentation transcript:

1 Function Test Framework
VNF VNF TEST SCRIPTS TELNET LIBRARY ?? (NOT DONE) OPEN-O Robot Framework RPC VNF SSH LIBRARY ?? (NOT DONE) REST LIBRARY (DONE) VNF Developed a REST library to easily write REST requests using the framework generated Keywords. (Details: Next Slides) REST Library replaces the variables and sends the request and validates the response and returns the required value back to the robot framework user. Similarly we need to develop Telnet and SSH Libraries ? What are the requirements?? VNF

2 Keywords – REST Library
Send REST and Get Value (Test File, Return Variable) Send the rest operation and get the return value or any desired value. Test File contains the request and expected output. Replace value and Send REST (Test File, Map of Variables and Values) Replace the variables in Test File and send the rest request.

3 Expected Response (JSON Schema)
SAMPLE TEST FILE { "request": { "uri": " "method": "post", "headers": { "Content-Type": "application/json" }, "json": "name":"DCController12", "vendor": "huawei", "version": "V200R001C00", "description": "eeee", "type": "openstack", "url": " "userName": "admin", "password": "password", "domain": "domain", "tenant": "admin" } "response": { "status": 201, "json": { "type": "object", "properties": { "sdnControllerId": { "type": "string" "required": ["sdnControllerId"] Request Header & URL Request Data Expected Response (JSON Schema)

4 SAMPLE TEST CASE Library Remote http://127.0.0.1:8271
Library Collections *** Variables *** ${dc_controller_create} jsoninput/create_input.json ${dc_controller_delete} jsoninput/delete.json ${dc_controller_update} jsoninput/update.json ${dc_controller_getbyid} jsoninput/getbyid.json ${dc_controller_getall} jsoninput/getall.json *** Test Cases *** Create Controller [Documentation] Create controller and get controllerId ${id} = Send REST and Get Value ${dc_controller_create} sdnControllerId Set Suite Variable ${id} Update Controller [Documentation] Update Controller information ${updmap}= Create Dictionary sdnControllerId=${id} Replace value and Send REST ${dc_controller_update} ${updmap} Set Suite Variable ${updmap} Get Controller By Id [Documentation] Get Controller information by controller Id Replace value and Send REST ${dc_controller_getbyid} ${updmap} Get All Controllers [Documentation] Get All Controller Information in ESR database ${getall}= Create Dictionary null=null Replace value and Send REST ${dc_controller_getall} ${getall} Delete Controller By Id [Documentation] Delete controller information by Id ${delmap}= Create Dictionary sdnControllerId=${id} Replace value and Send REST ${dc_controller_delete} ${delmap}


Download ppt "Function Test Framework"

Similar presentations


Ads by Google