blob: af9a668466fe4c75de6863e5cebf4dc8758736ef [file] [log] [blame]
Kailash Khalasi72614802018-05-02 09:21:23 -07001
2*** Settings ***
Kailash Khalasiad9acf52018-07-12 10:06:06 -07003Documentation Test Suite for XOS Service APIs
Kailash Khalasi72614802018-05-02 09:21:23 -07004Suite Setup Setup
5Suite Teardown Teardown
6Test Template Verify API Functionality
7Library Collections
8Library String
9Library OperatingSystem
10Library XML
11Library RequestsLibrary
Zack Williams821c5022020-01-15 15:11:46 -070012Library CORDRobot
13Library ImportResource resources=CORDRobot
Suchitra Vemuric5ee2232018-05-02 15:43:54 -070014Resource ${TESTLIBRARY}
Kailash Khalasi72614802018-05-02 09:21:23 -070015Variables ../Properties/RestApiProperties.py
16
17*** Variables ***
18${xos_service} core
19
20*** Test Cases *** TYPE API
21{% for m in proto.messages %}
22{%- if xproto_unquote(m.options.app_label) != "core" -%}
23{%- if m.name not in ['XOSBase'] -%}
Kailash Khalasi72614802018-05-02 09:21:23 -070024{% autoescape false %}
25{% endautoescape %}
Kailash Khalasi9302c182018-05-07 13:46:15 -060026Create {{ m.name }} CREATE /xosapi/v1/{{ xproto_unquote(m.options.app_label) }}/{{ xproto_pluralize(m) | lower }} ${json_{{ m.name | lower}}_1}
Kailash Khalasi72614802018-05-02 09:21:23 -070027 [Tags] {{ m.name }}
28
Kailash Khalasiba1f3f12018-08-28 12:28:34 -070029Update {{ m.name }} UPDATE /xosapi/v1/{{ xproto_unquote(m.options.app_label) }}/{{ xproto_pluralize(m) | lower }} ${json_{{ m.name | lower}}_amend_1} ${id}
Kailash Khalasi72614802018-05-02 09:21:23 -070030 [Tags] {{ m.name }}
31
Kailash Khalasiba1f3f12018-08-28 12:28:34 -070032Get {{ m.name }} RETRIEVE /xosapi/v1/{{ xproto_unquote(m.options.app_label) }}/{{ xproto_pluralize(m) | lower }} ${json_{{ m.name | lower}}_amend_1} ${id} ${json_{{ m.name | lower}}_amend_key}
Kailash Khalasi72614802018-05-02 09:21:23 -070033 [Tags] {{ m.name }}
34
Kailash Khalasi9302c182018-05-07 13:46:15 -060035Delete {{ m.name }} DELETE /xosapi/v1/{{ xproto_unquote(m.options.app_label) }}/{{ xproto_pluralize(m) | lower }} data_id=${id}
Kailash Khalasi72614802018-05-02 09:21:23 -070036 [Tags] {{ m.name }}
Kailash Khalasi72614802018-05-02 09:21:23 -070037{% endif -%}
38{% endif -%}
39{% endfor %}
40
41*** Keywords ***
42Setup
43 Setup Tests
44
45Teardown
46 Teardown Tests