Commit 7f51dcc0 authored by Patricia dos Santos Oliveira's avatar Patricia dos Santos Oliveira
Browse files

First demo draft with structure and run instructions

parent b968389c
Loading
Loading
Loading
Loading

Empty file added.

+44
Changes for TP/NGSI-LD/ContextInformation/Provision/Entities/CreateEntity_200.robot: 44 added lines, 0 removed lines.
Original line number Diff line number Diff line
*** Settings ***
Documentation   TP description.
Variables   ../../../../../resources/variables.py
Library     REST    ${url}
Library     JSONSchemaLibrary   .schemas/
Library     OperatingSystem

#Suite Setup 
#Suite Teardown

*** Variable ***
${endpoint}=    entities


*** Test Case ***
CreateEntity_200_MINIMAL
    [Documentation]  TP Variation description.
    [Tags]  critical
    Log To Console  "Will start Test Case CreateEntity_200_MINIMAL ..."
    #TO DO: read body from files
    Create Entity   {"id": "urn:ngsi-ld:Building:3009ef20-9f62-41f5-bd66-92f041b428b9", "type": "Building"}
    Check HTTP Status Code Is  201
    Check HTTP Response Body Json Schema Is  response.json   

*** Keywords ***
Create Entity  
    [Arguments]    ${body}    
    ${response}    POST    ${endpoint}      body=${body}
    Output    request
    Output    response
    Set Test Variable    ${response}

Check HTTP Status Code Is 
    [Arguments]    ${status}
    Log To Console  ${response}
    Should Be Equal    ${response['status']}    ${status}

Check HTTP Response Body Json Schema Is
    [Arguments]    ${input}
    Should Contain    ${response['headers']['Content-Type']}    application/json
    ${schema} =    Catenate    SEPARATOR=    ${input}    .schema.json
    Validate Json    ${schema}    ${response['body']}
    Log    Json Schema Validation OK
+6
Changes for TP/NGSI-LD/ContextInformation/Provision/Entities/CreateEntity_200_DD.robot: 6 added lines, 0 removed lines.
Original line number Diff line number Diff line
#TODO: Data Driven example


*** Test Case ***
CreateEntity_200_DD
     Log To Console  "Will start Test Case CreateEntity_200_DD..."
 No newline at end of file
Loading