Commit 85d42fbe authored by Hoang Tran's avatar Hoang Tran

added test description and modified automated_iut of libcoap client for fetch_02 and patch_02

parent 7a8dd0d8
Pipeline #2952 passed with stage
in 0 seconds
......@@ -353,8 +353,10 @@ stimuli_to_libcoap_cli_call = {
"TD_COAP_LINK_09_step_01": (get, {"base_url": default_coap_server_base_url, "resource": "/.well-known/core?ct=40"}),
# CoAP FETCH test cases stimuli
"TD_COAP_FETCH_01_step_01": (fetch, {"base_url": default_coap_server_base_url, "resource": "/fetchable", "content_format":"application/json", "accept_option":"application/json"}),
"TD_COAP_FETCH_02_step_01": (fetch, {"base_url": default_coap_server_base_url, "resource": "/fetchable", "content_format":"application/json", "accept_option":"application/json", "confirmable":False}),
# CoAP PATCH test cases stimuli
"TD_COAP_PATCH_01_step_01": (patch, {"base_url": default_coap_server_base_url, "resource": "/patchable", "content_format": 51}),
"TD_COAP_PATCH_02_step_01": (patch, {"base_url": default_coap_server_base_url, "resource": "/patchable", "content_format": 51, "confirmable":False}),
}
aux_stimuli_to_libcoap_cli_call = {
......@@ -386,9 +388,9 @@ class AutomatedLibcoapClient(AutomatedIUT):
# BLOCK_01/BLOCK_06 are not yet implemented because the CLI do not allow to do early negotiation.
implemented_testcases_list += ['TD_COAP_BLOCK_%02d' % tc for tc in range(2, 6)]
# Fetch
implemented_testcases_list += ['TD_COAP_FETCH_%02d' % tc for tc in range(1, 2)]
implemented_testcases_list += ['TD_COAP_FETCH_%02d' % tc for tc in range(1, 3)]
# Patch
implemented_testcases_list += ['TD_COAP_PATCH_%02d' % tc for tc in range(1, 2)]
implemented_testcases_list += ['TD_COAP_PATCH_%02d' % tc for tc in range(1, 3)]
component_id = 'automated_iut-coap_client-libcoap'
node = 'coap_client'
......
......@@ -1467,7 +1467,57 @@ sequence:
node: coap_client
description:
- 'Client displays the response'
--- !testcase
testcase_id: TD_COAP_FETCH_02
uri : http://doc.f-interop.eu/tests/TD_COAP_FETCH_02
configuration: COAP_CFG_01
objective: Perform FETCH transaction(NON mode)
pre_conditions:
- Server offers a resource /fetchable which exists in application/json format, has at least a key called "foo" with value different from "null " and handles FETCH
- An example of resource that could be provided by the Server
- - {"x-coord":256,"y-coord":45,"foo":["bar","baz"]}
notes:
references: '[FETCH PATCH] 1.1, 1.4, 2.1, 2.3, 2.6'
sequence:
- step_id: TD_COAP_FETCH_02_step_01
type: stimuli
node : coap_client
description:
- "Client is requested to send a non-confirmable FETCH request with a non-empty payload to server's resource"
- step_id: TD_COAP_FETCH_02_step_02
type: check
description:
- 'The request sent by the client contains:'
- - Type = 1(CON)
- Code = 5(FETCH)
- Client-generated Message ID (* CMID)
- Client-generated Token (* CTOK)
- Uri-Path option "fetchable"
- Content-format option, the value should be 50(application/json)
- Accept option, the value should be 50(application/json)
- Payload = a list of keys with at least a key called "foo"
- step_id: TD_COAP_FETCH_02_step_03
type: check
description:
- 'Server sends response containing:'
- - Type = 1(NON)
- Code = 2.05(Content)
- Server-generated Message ID (* SMID)
- Token = CTOK
- Content-format = same as Accept option found in the step 2
- Payload = Content of the resources which are corresponding to the requested keys
- step_id: TD_COAP_FETCH_02_step_04
type: verify
node: coap_client
description:
- 'Client displays the response'
--- !testcase
testcase_id: TD_COAP_PATCH_01
......@@ -1504,7 +1554,7 @@ sequence:
type : verify
node : coap_server
description:
- Server displays received information
- Server displays and updates the information
- step_id: TD_COAP_PATCH_01_step_04
type: check
......@@ -1520,3 +1570,60 @@ sequence:
node: coap_client
description:
- 'Client displays the received response'
- 'Server updated the content of the resource'
--- !testcase
testcase_id: TD_COAP_PATCH_02
uri : http://doc.f-interop.eu/tests/TD_COAP_PATCH_02
objective: Perform PATCH transaction(NON mode)
configuration: COAP_CFG_01
references: '[FETCH PATCH] 1.2, 1.4, 3.2, 3.3'
pre_conditions:
- Server offers already available resource /patchable or accepts creation of new resource on /patchable that handles PATCH
- An example of resource in format JSON that could be provided by the Server
- - {"x-coord":256,"y-coord":45,"foo":["bar","baz"]}
notes:
sequence:
- step_id: TD_COAP_PATCH_02_step_01
type: stimuli
node : coap_client
description:
- "Client is requested to send a non-confirmable PATCH request with a non-empty payload to server's resource"
- step_id: TD_COAP_PATCH_02_step_02
type: check
description:
- 'The request sent by the client contains:'
- - Type = 1 (NON)
- Code = 6 (PATCH)
- Client-generated Message ID (* CMID)
- Client-generated Token (* CTOK)
- Uri-Path option "patchable"
- Content-format option
- Non-empty Payload
- step_id : TD_COAP_PATCH_02_step_03
type : verify
node : coap_server
description:
- Server displays and updates the information
- step_id: TD_COAP_PATCH_02_step_04
type: check
description:
- 'Server sends response containing:'
- - Type = 1 (NON)
- Code = 2.04 (Changed) or 2.01 (Created)
- Server-generated Message ID (* SMID)
- Token = CTOK
- Content-format option if payload non-empty
- Empty or non-empty Payload
- step_id: TD_COAP_PATCH_02_step_05
type: verify
node: coap_client
description:
- 'Client displays the received response'
- 'Server updated the content of the resource'
\ No newline at end of file
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment