You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy file name to clipboardExpand all lines: features/602.ngsild.RelationshipsAndDataModels_Orion-LD.feature
+21-8Lines changed: 21 additions & 8 deletions
Original file line number
Diff line number
Diff line change
@@ -120,8 +120,11 @@ Feature: Test tutorial 602 Linked Data: Relationships and Data Models (Orion-LD)
120
120
#
121
121
Scenario: [8] FIND THE IDS OF ALL SHELF UNITS IN A STORE
122
122
When I send GET HTTP request to Orion-LD at "http://localhost:1026/ngsi-ld/v1/entities/"
123
-
And With header 'Accept$application/json$Link$<https://fiware.github.io/tutorials.Step-by-Step/tutorials-context.jsonld>; rel="http://www.w3.org/ns/json-ld#context"; type="application/ld+json"'
124
-
And With parameters "type$Shelf$options$keyValues$attrs$locatedIn"
123
+
And I set header Accept to application/json
124
+
And I set header Link to <https://fiware.github.io/tutorials.Step-by-Step/tutorials-context.jsonld>; rel="http://www.w3.org/ns/json-ld#context"; type="application/ld+json"
125
+
And the params equal to "type=Shelf"
126
+
And the params equal to "options=keyValues"
127
+
And the params equal to "attrs=locatedIn"
125
128
Then I receive from Orion-LD "200" response code with the body equal to "response602-08.json"
126
129
127
130
@@ -147,8 +150,10 @@ Feature: Test tutorial 602 Linked Data: Relationships and Data Models (Orion-LD)
147
150
#
148
151
Scenario: [10] FINDING ALL SHELF UNITS FOUND WITHIN A STORE
149
152
When I send GET HTTP request to Orion-LD at "http://localhost:1026/ngsi-ld/v1/entities/urn:ngsi-ld:Building:store001"
150
-
And With header 'Accept$application/json$Link$<https://fiware.github.io/tutorials.Step-by-Step/tutorials-context.jsonld>; rel="http://www.w3.org/ns/json-ld#context"; type="application/ld+json"'
151
-
And With parameters "options$keyValues$attrs$furniture"
153
+
And I set header Accept to application/json
154
+
And I set header Link to <https://fiware.github.io/tutorials.Step-by-Step/tutorials-context.jsonld>; rel="http://www.w3.org/ns/json-ld#context"; type="application/ld+json"
155
+
And the params equal to "options=keyValues"
156
+
And the params equal to "attrs=furniture"
152
157
Then I receive from Orion-LD "200" response code with the body equal to "response602-10.json"
153
158
154
159
@@ -174,8 +179,12 @@ Feature: Test tutorial 602 Linked Data: Relationships and Data Models (Orion-LD)
174
179
#
175
180
Scenario: [12] FINDING ALL SHELF UNITS FOUND WITHIN A STORE
176
181
When I send GET HTTP request to Orion-LD at "http://localhost:1026/ngsi-ld/v1/entities/"
177
-
And With header 'Accept$application/json$Link$<https://fiware.github.io/tutorials.Step-by-Step/tutorials-context.jsonld>; rel="http://www.w3.org/ns/json-ld#context"; type="application/ld+json"'
178
-
And With parameters "type$StockOrder$q$orderedProduct=="urn:ngsi-ld:Product:001"$attrs$requestedFor$options$keyValues"
182
+
And I set header Accept to application/json
183
+
And I set header Link to <https://fiware.github.io/tutorials.Step-by-Step/tutorials-context.jsonld>; rel="http://www.w3.org/ns/json-ld#context"; type="application/ld+json"
184
+
And the params equal to "type=StockOrder"
185
+
And the params equal to "q=orderedProduct=="urn:ngsi-ld:Product:001""
186
+
And the params equal to "attrs=requestedFor"
187
+
And the params equal to "options=keyValues"
179
188
Then I receive from Orion-LD "200" response code with the body equal to "response602-12.json"
180
189
181
190
@@ -184,8 +193,12 @@ Feature: Test tutorial 602 Linked Data: Relationships and Data Models (Orion-LD)
184
193
#
185
194
Scenario: [13] FIND ALL PRODUCTS SOLD IN A STORE
186
195
When I send GET HTTP request to Orion-LD at "http://localhost:1026/ngsi-ld/v1/entities/"
187
-
And With header 'Accept$application/json$Link$<https://fiware.github.io/tutorials.Step-by-Step/tutorials-context.jsonld>; rel="http://www.w3.org/ns/json-ld#context"; type="application/ld+json"'
188
-
And With parameters "type$StockOrder$q$requestedFor=="urn:ngsi-ld:Building:store001"$attrs$orderedProduct$options$keyValues"
196
+
And I set header Accept to application/json
197
+
And I set header Link to <https://fiware.github.io/tutorials.Step-by-Step/tutorials-context.jsonld>; rel="http://www.w3.org/ns/json-ld#context"; type="application/ld+json"
198
+
And the params equal to "type=StockOrder"
199
+
And the params equal to "q=requestedFor=="urn:ngsi-ld:Building:store001""
200
+
And the params equal to "attrs=orderedProduct"
201
+
And the params equal to "options=keyValues"
189
202
Then I receive from Orion-LD "200" response code with the body equal to "response602-13.json"
Copy file name to clipboardExpand all lines: features/602.ngsild.RelationshipsAndDataModels_Scorpio.feature
+68-42Lines changed: 68 additions & 42 deletions
Original file line number
Diff line number
Diff line change
@@ -27,10 +27,12 @@ Feature: Test tutorial 602 Linked Data: Relationships and Data Models (Scorpio)
27
27
# 2) attribute 'name' expected first, instead it is second after attribute 'https://schema.org/address'
28
28
#
29
29
Scenario: [1] DISPLAY ALL entities of a given type (BUILDINGS)
30
-
When I send GET HTTP request to Scorpio at "http://localhost:1026/ngsi-ld/v1/entities"
31
-
And With header 'NA$NA'
32
-
And With parameters "type$https://uri.fiware.org/ns/data-models#Building$options$keyValues"
33
-
Then I receive from Scorpio "200" response code with the body equal to "response602-01.json"
30
+
When I prepare a GET HTTP request for "obtaining an entity data" to "http://localhost:1026/ngsi-ld/v1/entities"
31
+
And I set header Accept to application/ld+json
32
+
And the params equal to "type=https://uri.fiware.org/ns/data-models#Building"
33
+
And the params equal to "options=keyValues"
34
+
And I perform the request
35
+
Then I receive from Scorpio "200" response code with the body equal to "response602-01-list.json"
34
36
35
37
36
38
#
@@ -39,9 +41,11 @@ Feature: Test tutorial 602 Linked Data: Relationships and Data Models (Scorpio)
39
41
# 1) attribute 'name' expected first, instead it is last
40
42
#
41
43
Scenario: [2] DISPLAY ALL entities of a given type (PRODUCT)
42
-
When I send GET HTTP request to Scorpio at "http://localhost:1026/ngsi-ld/v1/entities"
43
-
And With header 'Link$<https://fiware.github.io/tutorials.Step-by-Step/tutorials-context.jsonld>; rel="http://www.w3.org/ns/json-ld#context"; type="application/ld+json"'
44
-
And With parameters "type$https://fiware.github.io/tutorials.Step-by-Step/schema/Product$options$keyValues"
44
+
When I prepare a GET HTTP request for "obtaining entities data" to "http://localhost:1026/ngsi-ld/v1/entities"
45
+
And I set header Link to <http://context/user-context.jsonld>; rel="http://www.w3.org/ns/json-ld#context"; type="application/ld+json"
46
+
And the params equal to "type=https://fiware.github.io/tutorials.Step-by-Step/schema/Product"
47
+
And the params equal to "options=keyValues"
48
+
And I perform the request
45
49
Then I receive from Scorpio "200" response code with the body equal to "response602-02.json"
46
50
47
51
@@ -51,9 +55,11 @@ Feature: Test tutorial 602 Linked Data: Relationships and Data Models (Scorpio)
51
55
# 1) attribute 'name' expected first, instead it is second after 'maxCapacity' attribute
52
56
#
53
57
Scenario: [3] DISPLAY ALL entities of a given type (SHELF)
54
-
When I send GET HTTP request to Scorpio at "http://localhost:1026/ngsi-ld/v1/entities"
55
-
And With header 'Link$<https://fiware.github.io/tutorials.Step-by-Step/tutorials-context.jsonld>; rel="http://www.w3.org/ns/json-ld#context"; type="application/ld+json"'
56
-
And With parameters "type$Shelf$options$keyValues"
58
+
When I prepare a GET HTTP request for "obtaining entities data" to "http://localhost:1026/ngsi-ld/v1/entities"
59
+
And I set header Link to <http://context/user-context.jsonld>; rel="http://www.w3.org/ns/json-ld#context"; type="application/ld+json"
60
+
And the params equal to "type=Shelf"
61
+
And the params equal to "options=keyValues"
62
+
And I perform the request
57
63
Then I receive from Scorpio "200" response code with the body equal to "response602-03.json"
58
64
59
65
@@ -63,23 +69,24 @@ Feature: Test tutorial 602 Linked Data: Relationships and Data Models (Scorpio)
63
69
# 1) attributes order completely mixed-up. Expected: name, maxCapacity, location, Current: location, maxCapacity, name
64
70
#
65
71
Scenario: [4] OBTAIN SHELF INFORMATION
66
-
When I send GET HTTP request to Scorpio at "http://localhost:1026/ngsi-ld/v1/entities/urn:ngsi-ld:Shelf:unit001/"
67
-
And With header 'Link$<https://fiware.github.io/tutorials.Step-by-Step/tutorials-context.jsonld>; rel="http://www.w3.org/ns/json-ld#context"; type="application/ld+json"'
68
-
And With parameters "options$keyValues"
72
+
When I prepare a GET HTTP request for "obtaining an entity data" to "http://localhost:1026/ngsi-ld/v1/entities/urn:ngsi-ld:Shelf:unit001"
73
+
And I set header Link to <http://context/user-context.jsonld>; rel="http://www.w3.org/ns/json-ld#context"; type="application/ld+json"
74
+
And the params equal to "options=keyValues"
75
+
And I perform the request
69
76
Then I receive from Scorpio "200" response code with the body equal to "response602-04.json"
70
77
71
78
72
79
#
73
80
# Request 5
74
81
#
75
82
Scenario Outline: [5] ADDING 1-1 RELATIONSHIPS
76
-
When I send POST HTTP request to Scorpio at"http://localhost:1026/ngsi-ld/v1/entities/urn:ngsi-ld:Shelf:unit001/attrs"
77
-
# And With the post header "fiware-servicepath": " /"
78
-
And With the post header "NA": "NA"
79
-
And With the body request described in an Scorpio file "<file>"
83
+
When I prepare a POST HTTP request for "creating an entity" to"http://localhost:1026/ngsi-ld/v1/entities/urn:ngsi-ld:Shelf:unit001/attrs"
84
+
And I set header Content-Type to application/ld+json
85
+
And I set the body request as described in <file>
86
+
And I perform the request
80
87
Then I receive a HTTP response with the following Scorpio data
Scenario: [7] FIND THE STORE IN WHICH A SPECIFIC SHELF IS LOCATED
115
-
When I send GET HTTP request to Scorpio at "http://localhost:1026/ngsi-ld/v1/entities/urn:ngsi-ld:Shelf:unit001/"
116
-
And With header 'Link$<https://fiware.github.io/tutorials.Step-by-Step/tutorials-context.jsonld>; rel="http://www.w3.org/ns/json-ld#context"; type="application/ld+json"'
117
-
And With parameters "attrs$locatedIn$options$keyValues"
122
+
When I prepare a GET HTTP request for "obtaining an entity data" to "http://localhost:1026/ngsi-ld/v1/entities/urn:ngsi-ld:Shelf:unit001"
123
+
And I set header Link to <http://context/user-context.jsonld>; rel="http://www.w3.org/ns/json-ld#context"; type="application/ld+json"
124
+
And I set header Accept to application/ld+json
125
+
And the params equal to "attrs=locatedIn"
126
+
And the params equal to "options=keyValues"
127
+
And I perform the request
118
128
Then I receive from Scorpio "200" response code with the body equal to "response602-07.json"
119
129
120
130
@@ -123,21 +133,25 @@ Feature: Test tutorial 602 Linked Data: Relationships and Data Models (Scorpio)
123
133
#
124
134
Scenario: [8] FIND THE IDS OF ALL SHELF UNITS IN A STORE
125
135
When I send GET HTTP request to Scorpio at "http://localhost:1026/ngsi-ld/v1/entities/"
126
-
And With header 'Accept$application/json$Link$<https://fiware.github.io/tutorials.Step-by-Step/tutorials-context.jsonld>; rel="http://www.w3.org/ns/json-ld#context"; type="application/ld+json"'
127
-
And With parameters "type$Shelf$options$keyValues$attrs$locatedIn"
136
+
And I set header Accept to application/json
137
+
And I set header Link to <https://fiware.github.io/tutorials.Step-by-Step/tutorials-context.jsonld>; rel="http://www.w3.org/ns/json-ld#context"; type="application/ld+json"
138
+
And the params equal to "type=Shelf"
139
+
And the params equal to "options=keyValues"
140
+
And the params equal to "attrs=locatedIn"
128
141
Then I receive from Scorpio "200" response code with the body equal to "response602-08.json"
129
142
130
143
131
144
#
132
145
# Request 9
133
146
#
134
147
Scenario Outline: [9] ADDING 1-MANY RELATIONSHIP
135
-
When I send POST HTTP request to Scorpio at "http://localhost:1026/ngsi-ld/v1/entities/urn:ngsi-ld:Building:store001/attrs"
136
-
And With the post header "NA": "NA"
137
-
And With the body request described in an Scorpio file "<file>"
148
+
When I prepare a POST HTTP request for "adding new attribute" to "http://localhost:1026/ngsi-ld/v1/entities/urn:ngsi-ld:Building:store001/attrs"
149
+
And I set header Content-Type to application/ld+json
150
+
And I set the body request as described in <file>
151
+
And I perform the request
138
152
Then I receive a HTTP response with the following Scorpio data
@@ -149,18 +163,21 @@ Feature: Test tutorial 602 Linked Data: Relationships and Data Models (Scorpio)
149
163
#
150
164
Scenario: [10] FINDING ALL SHELF UNITS FOUND WITHIN A STORE
151
165
When I send GET HTTP request to Scorpio at "http://localhost:1026/ngsi-ld/v1/entities/urn:ngsi-ld:Building:store001"
152
-
And With header 'Accept$application/json$Link$<https://fiware.github.io/tutorials.Step-by-Step/tutorials-context.jsonld>; rel="http://www.w3.org/ns/json-ld#context"; type="application/ld+json"'
153
-
And With parameters "options$keyValues$attrs$furniture"
166
+
And I set header Accept to application/json
167
+
And I set header Link to <https://fiware.github.io/tutorials.Step-by-Step/tutorials-context.jsonld>; rel="http://www.w3.org/ns/json-ld#context"; type="application/ld+json"
168
+
And the params equal to "options=keyValues"
169
+
And the params equal to "attrs=furniture"
154
170
Then I receive from Scorpio "200" response code with the body equal to "response602-10.json"
@@ -175,8 +192,12 @@ Feature: Test tutorial 602 Linked Data: Relationships and Data Models (Scorpio)
175
192
#
176
193
Scenario: [12] FINDING ALL SHELF UNITS FOUND WITHIN A STORE
177
194
When I send GET HTTP request to Scorpio at "http://localhost:1026/ngsi-ld/v1/entities/"
178
-
And With header 'Accept$application/json$Link$<https://fiware.github.io/tutorials.Step-by-Step/tutorials-context.jsonld>; rel="http://www.w3.org/ns/json-ld#context"; type="application/ld+json"'
179
-
And With parameters "type$StockOrder$q$orderedProduct=="urn:ngsi-ld:Product:001"$attrs$requestedFor$options$keyValues"
195
+
And I set header Accept to application/json
196
+
And I set header Link to <https://fiware.github.io/tutorials.Step-by-Step/tutorials-context.jsonld>; rel="http://www.w3.org/ns/json-ld#context"; type="application/ld+json"
197
+
And the params equal to "type=StockOrder"
198
+
And the params equal to "q=orderedProduct=="urn:ngsi-ld:Product:001""
199
+
And the params equal to "attrs=requestedFor"
200
+
And the params equal to "options=keyValues"
180
201
Then I receive from Scorpio "200" response code with the body equal to "response602-12.json"
181
202
182
203
@@ -185,8 +206,12 @@ Feature: Test tutorial 602 Linked Data: Relationships and Data Models (Scorpio)
185
206
#
186
207
Scenario: [13] FIND ALL PRODUCTS SOLD IN A STORE
187
208
When I send GET HTTP request to Scorpio at "http://localhost:1026/ngsi-ld/v1/entities/"
188
-
And With header 'Accept$application/json$Link$<https://fiware.github.io/tutorials.Step-by-Step/tutorials-context.jsonld>; rel="http://www.w3.org/ns/json-ld#context"; type="application/ld+json"'
189
-
And With parameters "type$StockOrder$q$requestedFor=="urn:ngsi-ld:Building:store001"$attrs$orderedProduct$options$keyValues"
209
+
And I set header Accept to application/json
210
+
And I set header Link to <https://fiware.github.io/tutorials.Step-by-Step/tutorials-context.jsonld>; rel="http://www.w3.org/ns/json-ld#context"; type="application/ld+json"
211
+
And the params equal to "type=StockOrder"
212
+
And the params equal to "q=requestedFor=="urn:ngsi-ld:Building:store001""
213
+
And the params equal to "attrs=orderedProduct"
214
+
And the params equal to "options=keyValues"
190
215
Then I receive from Scorpio "200" response code with the body equal to "response602-13.json"
191
216
192
217
@@ -200,7 +225,8 @@ Feature: Test tutorial 602 Linked Data: Relationships and Data Models (Scorpio)
200
225
# current attributes order: type, requestedFor, requestedBy, orderedProduct, stockCount, orderDate
201
226
#
202
227
Scenario: [14] OBTAIN STOCK ORDER
203
-
When I send GET HTTP request to Scorpio at "http://localhost:1026/ngsi-ld/v1/entities/urn:ngsi-ld:StockOrder:001"
204
-
And With header 'NA$NA'
205
-
And With parameters "options$keyValues"
206
-
Then I receive from Scorpio "200" response code with the body equal to "response602-14.json"
228
+
When I prepare a GET HTTP request for "obtaining an entity data" to "http://localhost:1026/ngsi-ld/v1/entities/urn:ngsi-ld:StockOrder:001"
229
+
And I set header Accept to application/ld+json
230
+
And the params equal to "options=keyValues"
231
+
And I perform the request
232
+
Then I receive from Scorpio "200" response code with the body equal to "response602-14-list.json"
0 commit comments