blob: c35d3e47e31dad3ac795eb2410fb536ee1a528e6 [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
12Library HttpLibrary.HTTP
13Library ../Framework/utils/utils.py
14Library ../Framework/restApi.py
Suchitra Vemuric5ee2232018-05-02 15:43:54 -070015Resource ${TESTLIBRARY}
Kailash Khalasi72614802018-05-02 09:21:23 -070016Variables ../Properties/RestApiProperties.py
17
18*** Variables ***
19${xos_service} core
20
21*** Test Cases *** TYPE API
22{% for m in proto.messages %}
23{%- if xproto_unquote(m.options.app_label) != "core" -%}
24{%- if m.name not in ['XOSBase'] -%}
Kailash Khalasi72614802018-05-02 09:21:23 -070025{% autoescape false %}
26{% endautoescape %}
Kailash Khalasi9302c182018-05-07 13:46:15 -060027Create {{ 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 -070028 [Tags] {{ m.name }}
29
Kailash Khalasiba1f3f12018-08-28 12:28:34 -070030Update {{ 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 -070031 [Tags] {{ m.name }}
32
Kailash Khalasiba1f3f12018-08-28 12:28:34 -070033Get {{ 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 -070034 [Tags] {{ m.name }}
35
Kailash Khalasi9302c182018-05-07 13:46:15 -060036Delete {{ 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 -070037 [Tags] {{ m.name }}
Kailash Khalasi72614802018-05-02 09:21:23 -070038{% endif -%}
39{% endif -%}
40{% endfor %}
41
42*** Keywords ***
43Setup
44 Setup Tests
45
46Teardown
47 Teardown Tests