Skip to content

Commit c79b382

Browse files
author
Fernando López
committed
Adding 104 NGSI-LD Concise for Orion-LD and refactoring steps
1 parent 7d4e418 commit c79b382

64 files changed

Lines changed: 976 additions & 274 deletions

File tree

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

features/101.Getting_Started.feature

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -18,7 +18,7 @@ Feature: Test tutorial 101.Getting Started
1818

1919
Scenario Outline: Creating Context Data
2020
When The content-type header key equal to "application/json"
21-
And the body request described in file "<file>"
21+
And I set the request body described in file "<file>"
2222
And I send a POST HTTP request to "http://localhost:1026/v2/entities"
2323
Then I receive a HTTP response with the following data
2424
| Status-Code | Location | Connection | fiware-correlator |

features/103.ngsild.CRUD_Operations_orionld.feature

Lines changed: 21 additions & 21 deletions
Original file line numberDiff line numberDiff line change
@@ -13,7 +13,7 @@ Feature: Test tutorial 103.NGSI-LD.CRUD Operations (Orion-LD)
1313
When I set the "Content-Type" header with the value "application/json"
1414
And I set the "Link" header with the value "<http://context/user-context.jsonld>; rel="http://www.w3.org/ns/json-ld#context"; type="application/ld+json""
1515
And I set the url to "http://localhost:1026/ngsi-ld/v1/entities"
16-
And the body request described in file "request103ld-01.json"
16+
And I set the request body described in file "request103ld-01.json"
1717
And I send a POST HTTP request to that url
1818
Then I receive a HTTP "201" response code
1919

@@ -27,14 +27,14 @@ Feature: Test tutorial 103.NGSI-LD.CRUD Operations (Orion-LD)
2727
When I set the "Content-Type" header with the value "application/json"
2828
And I set the "Link" header with the value "<http://context/user-context.jsonld>; rel="http://www.w3.org/ns/json-ld#context"; type="application/ld+json""
2929
And I set the url to "http://localhost:1026/ngsi-ld/v1/entities/urn:ngsi-ld:TemperatureSensor:001/attrs"
30-
And the body request described in file "request103ld-03.json"
30+
And I set the request body described in file "request103ld-03.json"
3131
And I send a POST HTTP request to that url
3232
Then I receive a HTTP "204" response code
3333

3434
Scenario: 04 - Read a Data Entity (verbose)
3535
When I set the "Link" header with the value "<http://context/user-context.jsonld>; rel="http://www.w3.org/ns/json-ld#context"; type="application/ld+json""
3636
And I set the url to "http://localhost:1026/ngsi-ld/v1/entities/urn:ngsi-ld:TemperatureSensor:001"
37-
And the params equal to "options=sysAttrs"
37+
And I set the params equal to "options=sysAttrs"
3838
And I send a GET HTTP request to that url
3939
Then I receive a HTTP "200" response code
4040

@@ -43,7 +43,7 @@ Feature: Test tutorial 103.NGSI-LD.CRUD Operations (Orion-LD)
4343
And I set the "Link" header with the value "<http://context/user-context.jsonld>; rel="http://www.w3.org/ns/json-ld#context"; type="application/ld+json""
4444
And I set the "Accept" header with the value "application/ld+json"
4545
And I set the url to "http://localhost:1026/ngsi-ld/v1/entityOperations/create"
46-
And the body request described in file "request103ld-05.json"
46+
And I set the request body described in file "request103ld-05.json"
4747
And I send a POST HTTP request to that url
4848
Then I receive a HTTP "201" response code from Orion-LD with the body equal to "response103ld-05.json"
4949

@@ -52,97 +52,97 @@ Feature: Test tutorial 103.NGSI-LD.CRUD Operations (Orion-LD)
5252
And I set the "Link" header with the value "<http://context/user-context.jsonld>; rel="http://www.w3.org/ns/json-ld#context"; type="application/ld+json""
5353
And I set the "Accept" header with the value "application/ld+json"
5454
And I set the url to "http://localhost:1026/ngsi-ld/v1/entityOperations/upsert"
55-
And the body request described in file "request103ld-06.json"
55+
And I set the request body described in file "request103ld-06.json"
5656
And I send a POST HTTP request to that url
5757
Then I receive a HTTP "204" response code
5858

5959
Scenario: 07 - Read a Data Entity (verbose)
6060
When I set the "Link" header with the value "<http://context/user-context.jsonld>; rel="http://www.w3.org/ns/json-ld#context"; type="application/ld+json""
6161
And I set the url to "http://localhost:1026/ngsi-ld/v1/entities/urn:ngsi-ld:TemperatureSensor:001"
62-
And the params equal to "options=sysAttrs"
62+
And I set the params equal to "options=sysAttrs"
6363
And I send a GET HTTP request to that url
6464
Then I receive a HTTP "200" status code from Orion-LD with the body "response103ld-07.json" and exclusions "response103ld-07.excludes"
6565

6666
Scenario: 08 - Read an Attribute from a Data Entity
6767
When I set the "Link" header with the value "<http://context/user-context.jsonld>; rel="http://www.w3.org/ns/json-ld#context"; type="application/ld+json""
6868
And I set the url to "http://localhost:1026/ngsi-ld/v1/entities/urn:ngsi-ld:TemperatureSensor:001"
69-
And the params equal to "attrs=temperature"
69+
And I set the params equal to "attrs=temperature"
7070
And I send a GET HTTP request to that url
7171
Then I receive a HTTP "200" response code from Orion-LD with the body equal to "response103ld-08.json"
7272

7373
Scenario: 09 - Read a Data Entity (key-value pairs)
7474
When I set the "Link" header with the value "<http://context/user-context.jsonld>; rel="http://www.w3.org/ns/json-ld#context"; type="application/ld+json""
7575
And I set the url to "http://localhost:1026/ngsi-ld/v1/entities/urn:ngsi-ld:TemperatureSensor:001"
7676
And I set the "Accept" header with the value "application/json"
77-
And the params equal to "options=keyValues"
77+
And I set the params equal to "options=keyValues"
7878
And I send a GET HTTP request to that url
7979
Then I receive a HTTP "200" response code from Orion-LD with the body equal to "response103ld-09.json"
8080

8181
Scenario: 10 - Read Multiple attributes values from a Data Entity
8282
When I set the "Link" header with the value "<http://context/user-context.jsonld>; rel="http://www.w3.org/ns/json-ld#context"; type="application/ld+json""
8383
And I set the "Accept" header with the value "application/json"
8484
And I set the url to "http://localhost:1026/ngsi-ld/v1/entities/urn:ngsi-ld:TemperatureSensor:001"
85-
And the params equal to "options=keyValues"
86-
And the params equal to "attrs=category,temperature"
85+
And I set the params equal to "options=keyValues"
86+
And I set the params equal to "attrs=category,temperature"
8787
And I send a GET HTTP request to that url
8888
Then I receive a HTTP "200" response code from Orion-LD with the body equal to "response103ld-10.json"
8989

9090
Scenario: 11 - List all Data Entities (verbose)
9191
When I set the "Link" header with the value "<http://context/user-context.jsonld>; rel="http://www.w3.org/ns/json-ld#context"; type="application/ld+json""
9292
And I set the url to "http://localhost:1026/ngsi-ld/v1/entities/"
93-
And the params equal to "type=TemperatureSensor"
93+
And I set the params equal to "type=TemperatureSensor"
9494
And I send a GET HTTP request to that url
9595
Then I receive a HTTP "200" response code from Orion-LD with the body equal to "response103ld-11.json"
9696

9797
Scenario: 12 - List all Data Entities (key-value pairs)
9898
When I set the "Link" header with the value "<http://context/user-context.jsonld>; rel="http://www.w3.org/ns/json-ld#context"; type="application/ld+json""
9999
And I set the url to "http://localhost:1026/ngsi-ld/v1/entities/"
100100
And I set the "Accept" header with the value "application/json"
101-
And the params equal to "type=TemperatureSensor"
102-
And the params equal to "options=keyValues"
103-
And the params equal to "attrs=temperature"
101+
And I set the params equal to "type=TemperatureSensor"
102+
And I set the params equal to "options=keyValues"
103+
And I set the params equal to "attrs=temperature"
104104
And I send a GET HTTP request to that url
105105
Then I receive a HTTP "200" response code from Orion-LD with the body equal to "response103ld-12.json"
106106

107107
Scenario: 13 - Filter Data Entities by ID
108108
When I set the "Link" header with the value "<http://context/user-context.jsonld>; rel="http://www.w3.org/ns/json-ld#context"; type="application/ld+json""
109109
And I set the "Accept" header with the value "application/json"
110110
And I set the url to "http://localhost:1026/ngsi-ld/v1/entities/"
111-
And the params equal to "id=urn:ngsi-ld:TemperatureSensor:001,urn:ngsi-ld:TemperatureSensor:002"
112-
And the params equal to "options=keyValues"
113-
And the params equal to "attrs=temperature"
111+
And I set the params equal to "id=urn:ngsi-ld:TemperatureSensor:001,urn:ngsi-ld:TemperatureSensor:002"
112+
And I set the params equal to "options=keyValues"
113+
And I set the params equal to "attrs=temperature"
114114
And I send a GET HTTP request to that url
115115
Then I receive a HTTP "200" response code from Orion-LD with the body equal to "response103ld-13.json"
116116

117117
Scenario: 14 - Overwrite the value of an Attribute value
118118
When I set the "Content-Type" header with the value "application/json"
119119
And I set the "Link" header with the value "<http://context/user-context.jsonld>; rel="http://www.w3.org/ns/json-ld#context"; type="application/ld+json""
120120
And I set the url to "http://localhost:1026/ngsi-ld/v1/entities/urn:ngsi-ld:TemperatureSensor:001/attrs/category"
121-
And the body request described in file "request103ld-14.json"
121+
And I set the request body described in file "request103ld-14.json"
122122
And I send a PATCH HTTP request to that url
123123
Then I receive a HTTP "204" response code
124124

125125
Scenario: 15 - Overwrite Multiple Attributes of a Data Entity
126126
When I set the "Content-Type" header with the value "application/json"
127127
And I set the "Link" header with the value "<http://context/user-context.jsonld>; rel="http://www.w3.org/ns/json-ld#context"; type="application/ld+json""
128128
And I set the url to "http://localhost:1026/ngsi-ld/v1/entities/urn:ngsi-ld:TemperatureSensor:001/attrs"
129-
And the body request described in file "request103ld-15.json"
129+
And I set the request body described in file "request103ld-15.json"
130130
And I send a PATCH HTTP request to that url
131131
Then I receive a HTTP "204" response code
132132

133133
Scenario: 16 - Batch Update Attributes of Multiple Data Entities
134134
When I set the "Content-Type" header with the value "application/json"
135135
And I set the "Link" header with the value "<http://context/user-context.jsonld>; rel="http://www.w3.org/ns/json-ld#context"; type="application/ld+json""
136136
And I set the url to "http://localhost:1026/ngsi-ld/v1/entityOperations/upsert?options=update"
137-
And the body request described in file "request103ld-16.json"
137+
And I set the request body described in file "request103ld-16.json"
138138
And I send a POST HTTP request to that url
139139
Then I receive a HTTP "204" response code
140140

141141
Scenario: 17 - Batch Replace Entity Data
142142
When I set the "Content-Type" header with the value "application/json"
143143
And I set the "Link" header with the value "<http://context/user-context.jsonld>; rel="http://www.w3.org/ns/json-ld#context"; type="application/ld+json""
144144
And I set the url to "http://localhost:1026/ngsi-ld/v1/entityOperations/update?options=replace"
145-
And the body request described in file "request103ld-17.json"
145+
And I set the request body described in file "request103ld-17.json"
146146
And I send a POST HTTP request to that url
147147
Then I receive a HTTP "204" response code
148148

0 commit comments

Comments
 (0)