blob: 8b53c24b2e09b7491320ca3a60b1084bca9c3b57 [file] [log] [blame]
Kailash Khalasi72614802018-05-02 09:21:23 -07001
2*** Settings ***
3Documentation Test Suite for XOS APIs
4Suite 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 Khalasi9302c182018-05-07 13:46:15 -060030Update {{ m.name }} UPDATE /xosapi/v1/{{ xproto_unquote(m.options.app_label) }}/{{ xproto_pluralize(m) | lower }} ${json_{{ m.name | lower}}_updated_1} ${id}
Kailash Khalasi72614802018-05-02 09:21:23 -070031 [Tags] {{ m.name }}
32
Kailash Khalasi9302c182018-05-07 13:46:15 -060033Get {{ 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}
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