blob: a4db86075e5e9be2a29b700d874fe97bb7c86801 [file] [log] [blame]
*** Settings ***
Documentation Test Suite for XOS APIs
Suite Setup Setup
Suite Teardown Teardown
Test Template Verify API Functionality
Library Collections
Library String
Library OperatingSystem
Library XML
Library RequestsLibrary
Library HttpLibrary.HTTP
Library ../Framework/utils/utils.py
Library ../Framework/restApi.py
Resource ${TESTLIBRARY}
Variables ../Properties/RestApiProperties.py
*** Variables ***
${xos_service} core
*** Test Cases *** TYPE API
{% for m in proto.messages %}
{%- if xproto_unquote(m.options.app_label) != "core" -%}
{%- if m.name not in ['XOSBase'] -%}
{% autoescape false %}
{% endautoescape %}
Create {{ m.name }} CREATE /xosapi/v1/{{ xproto_unquote(m.options.app_label) }}/{{ xproto_pluralize(m) | lower}} ${json_{{ m.name | lower}}_1}
[Tags] {{ m.name }}
Update {{ m.name }} UPDATE /xosapi/v1/{{ xproto_unquote(m.options.app_label) }}/{{ xproto_pluralize(m) | lower}} ${json_{{ m.name | lower}}_updated_1} ${id}
[Tags] {{ m.name }}
Get {{ m.name }} RETRIEVE /xosapi/v1/{{ xproto_unquote(m.options.app_label) }}/{{ xproto_pluralize(m) | lower}} ${json_{{ m.name | lower}}_updated_1} ${id} ${json_{{ m.name | lower}}_updated_key}
[Tags] {{ m.name }}
Delete {{ m.name }} DELETE /xosapi/v1/{{ xproto_unquote(m.options.app_label) }}/{{ xproto_pluralize(m) | lower}} data_id=${id}
[Tags] {{ m.name }}
{% endif -%}
{% endif -%}
{% endfor %}
*** Keywords ***
Setup
Setup Tests
Teardown
Teardown Tests