botium-core 1.15.10 → 1.15.13

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (84) hide show
  1. package/dist/botium-cjs.js +91 -51
  2. package/dist/botium-cjs.js.map +1 -1
  3. package/dist/botium-es.js +91 -50
  4. package/dist/botium-es.js.map +1 -1
  5. package/package.json +35 -40
  6. package/src/BotDriver.js +1 -1
  7. package/src/Events.js +1 -3
  8. package/src/containers/GridContainer.js +0 -4
  9. package/src/mocks/BotiumMockScripting.js +3 -0
  10. package/src/scripting/Convo.js +10 -0
  11. package/src/utils/boolean.js +39 -0
  12. package/test/compiler/compilercsv.spec.js +34 -0
  13. package/test/compiler/compilermarkdown.spec.js +11 -0
  14. package/test/compiler/compilertxt.spec.js +21 -0
  15. package/test/compiler/compilerxlsx.spec.js +27 -0
  16. package/test/compiler/precompilerjson.spec.js +1 -0
  17. package/test/compiler/precompilermarkdownrasa.spec.js +1 -0
  18. package/test/connectors/pluginconnectorcontainer.spec.js +1 -0
  19. package/test/connectors/simplerest.spec.js +3 -1
  20. package/test/convo/failure.spec.js +1 -0
  21. package/test/convo/fillAndApplyScriptingMemory.spec.js +56 -0
  22. package/test/convo/partialconvo.spec.js +3 -0
  23. package/test/convo/retry.spec.js +9 -0
  24. package/test/convo/retryasserter.spec.js +9 -0
  25. package/test/convo/transcript.spec.js +33 -0
  26. package/test/convo/tree.spec.js +5 -0
  27. package/test/driver/capabilities.spec.js +16 -0
  28. package/test/helpers/capabilitiesutils.spec.js +8 -0
  29. package/test/helpers/transcriptutils.spec.js +1 -0
  30. package/test/hooks/customhooks.spec.js +3 -0
  31. package/test/logichooks/hookfromsrc.spec.js +3 -0
  32. package/test/logichooks/textfromhook.spec.js +1 -0
  33. package/test/plugins/plugins.spec.js +3 -0
  34. package/test/scripting/asserters/buttonsAsserter.spec.js +15 -0
  35. package/test/scripting/asserters/cardsAsserter.spec.js +12 -0
  36. package/test/scripting/asserters/convoStepParameters.spec.js +11 -0
  37. package/test/scripting/asserters/entitiesAsserter.spec.js +1 -0
  38. package/test/scripting/asserters/entityValuesAsserter.spec.js +7 -0
  39. package/test/scripting/asserters/formsAsserter.spec.js +10 -0
  40. package/test/scripting/asserters/intentAsserter.spec.js +4 -0
  41. package/test/scripting/asserters/intentUniqueAsserter.spec.js +2 -0
  42. package/test/scripting/asserters/jsonpathAsserter.spec.js +25 -0
  43. package/test/scripting/asserters/mediaAsserter.spec.js +20 -0
  44. package/test/scripting/asserters/responseLengthAsserter.spec.js +4 -0
  45. package/test/scripting/asserters/textAsserter.spec.js +1 -0
  46. package/test/scripting/asserters/textContainsAllAsserter.spec.js +1 -0
  47. package/test/scripting/asserters/textContainsAnyAsserter.spec.js +1 -0
  48. package/test/scripting/asserters/textEqualsAsserter.spec.js +1 -0
  49. package/test/scripting/asserters/textRegexpAllAsserter.spec.js +1 -0
  50. package/test/scripting/asserters/textRegexpAnyAsserter.spec.js +1 -0
  51. package/test/scripting/asserters/textWildcardAllAsserter.spec.js +1 -0
  52. package/test/scripting/asserters/textWildcardAnyAsserter.spec.js +1 -0
  53. package/test/scripting/asserters/textWildcardExactAllAsserter.spec.js +1 -0
  54. package/test/scripting/asserters/textWildcardExactAnyAsserter.spec.js +1 -0
  55. package/test/scripting/asserters/werAsserter.spec.js +6 -0
  56. package/test/scripting/logichooks/convos/scripting_memory_resolved_args.convo.txt +11 -0
  57. package/test/scripting/logichooks/customConditionalStepLogicHook.spec.js +2 -0
  58. package/test/scripting/logichooks/localvsglobal.spec.js +1 -0
  59. package/test/scripting/logichooks/pauseLogic.spec.js +4 -0
  60. package/test/scripting/logichooks/setClearScriptingMemory.spec.js +17 -0
  61. package/test/scripting/logichooks/updateCustom.spec.js +2 -0
  62. package/test/scripting/matching/matchingmode.spec.js +48 -0
  63. package/test/scripting/scriptingModificator.spec.js +1 -0
  64. package/test/scripting/scriptingmemory/fillScriptingMemoryFromFile.spec.js +4 -0
  65. package/test/scripting/scriptingmemory/regexp.spec.js +1 -0
  66. package/test/scripting/scriptingmemory/useScriptingMemoryForAssertion.spec.js +3 -0
  67. package/test/scripting/txt/decompile.spec.js +20 -0
  68. package/test/scripting/userinputs/buttonInputConvos.spec.js +1 -0
  69. package/test/scripting/userinputs/defaultUserInputs.spec.js +13 -0
  70. package/test/scripting/userinputs/mediaInputConvos.spec.js +10 -0
  71. package/test/scripting/utteranceexpansion/associateByIndex.spec.js +2 -0
  72. package/test/security/allowUnsafe.spec.js +5 -0
  73. package/test/utils.spec.js +2 -0
  74. package/samples/postman/Botium Agent Sample.postman_collection.json +0 -834
  75. package/samples/postman/README.md +0 -5
  76. package/samples/postman/botiumFluent.js +0 -37
  77. package/src/grid/agent/AgentWorker.js +0 -204
  78. package/src/grid/agent/agent.js +0 -96
  79. package/src/grid/agent/agentworkerpool.js +0 -58
  80. package/src/grid/agent/routes.js +0 -353
  81. package/src/grid/agent/swagger.json +0 -327
  82. package/src/grid/agent/swaggerDef.json +0 -8
  83. package/src/grid/agent/views/index.html +0 -39
  84. package/test/grid/agent/client.js +0 -65
@@ -1,834 +0,0 @@
1
- {
2
- "variables": [],
3
- "info": {
4
- "name": "Botium Agent Sample",
5
- "_postman_id": "64d37b62-50f7-8d85-a034-f21830d6afe7",
6
- "description": "",
7
- "schema": "https://schema.getpostman.com/json/collection/v2.0.0/collection.json"
8
- },
9
- "item": [
10
- {
11
- "name": "IBM Watson Conversation Sample",
12
- "description": "",
13
- "item": [
14
- {
15
- "name": "Build Agent Connection",
16
- "event": [
17
- {
18
- "listen": "test",
19
- "script": {
20
- "type": "text/javascript",
21
- "exec": [
22
- "pm.environment.set(\"worker_slot\", pm.response.json().slot);",
23
- "",
24
- "pm.test(\"Status code is 200\", function () {",
25
- " pm.response.to.have.status(200);",
26
- "});",
27
- ""
28
- ]
29
- }
30
- }
31
- ],
32
- "request": {
33
- "url": "{{BOTIUMGRIDURL}}/api/build",
34
- "method": "POST",
35
- "header": [
36
- {
37
- "key": "Content-Type",
38
- "value": "application/json",
39
- "description": ""
40
- },
41
- {
42
- "key": "BOTIUM_API_TOKEN",
43
- "value": "{{BOTIUM_API_TOKEN}}",
44
- "description": ""
45
- }
46
- ],
47
- "body": {
48
- "mode": "raw",
49
- "raw": "{\n\t\"Capabilities\": {\n\t\t\"PROJECTNAME\": \"IBM Watson Conversation Sample\",\n\t\t\"CONTAINERMODE\": \"watsonconversation\",\n\t\t\"WATSONCONVERSATION_USER\": \"0274cb6f-3680-4cf7-bd6b-71c7f447542d\",\n\t\t\"WATSONCONVERSATION_PASSWORD\": \"ZWDE5xo02sby\",\n\t\t\"WATSONCONVERSATION_WORKSPACE_ID\": \"97513bc0-c581-4bec-ac9f-ea6a8ec308a9\",\n\t\t\"WATSONCONVERSATION_COPY_WORKSPACE\": false\n\t}\n}"
50
- },
51
- "description": ""
52
- },
53
- "response": []
54
- },
55
- {
56
- "name": "Assert currentWorkers = 1",
57
- "event": [
58
- {
59
- "listen": "test",
60
- "script": {
61
- "type": "text/javascript",
62
- "exec": [
63
- "pm.test(\"Status code is 200\", function () {",
64
- " pm.response.to.have.status(200);",
65
- "});",
66
- "",
67
- "pm.test(\"currentWorkers is 0\", function () {",
68
- " var jsonData = pm.response.json();",
69
- " pm.expect(jsonData.currentWorkers).to.eql(1);",
70
- "});"
71
- ]
72
- }
73
- }
74
- ],
75
- "request": {
76
- "url": "{{BOTIUMGRIDURL}}/api/status",
77
- "method": "GET",
78
- "header": [
79
- {
80
- "key": "BOTIUM_API_TOKEN",
81
- "value": "{{BOTIUM_API_TOKEN}}"
82
- },
83
- {
84
- "key": "",
85
- "value": "",
86
- "description": "",
87
- "disabled": true
88
- }
89
- ],
90
- "body": {
91
- "mode": "raw",
92
- "raw": ""
93
- },
94
- "description": ""
95
- },
96
- "response": []
97
- },
98
- {
99
- "name": "Start container",
100
- "event": [
101
- {
102
- "listen": "test",
103
- "script": {
104
- "type": "text/javascript",
105
- "exec": [
106
- "pm.test(\"Status code is 200\", function () {",
107
- " pm.response.to.have.status(200);",
108
- "});"
109
- ]
110
- }
111
- }
112
- ],
113
- "request": {
114
- "url": "{{BOTIUMGRIDURL}}/api/start/{{worker_slot}}",
115
- "method": "POST",
116
- "header": [
117
- {
118
- "key": "BOTIUM_API_TOKEN",
119
- "value": "{{BOTIUM_API_TOKEN}}",
120
- "description": ""
121
- }
122
- ],
123
- "body": {
124
- "mode": "raw",
125
- "raw": ""
126
- },
127
- "description": ""
128
- },
129
- "response": []
130
- },
131
- {
132
- "name": "Start conversation",
133
- "event": [
134
- {
135
- "listen": "test",
136
- "script": {
137
- "type": "text/javascript",
138
- "exec": [
139
- "pm.test(\"Status code is 200\", function () {",
140
- " pm.response.to.have.status(200);",
141
- "});"
142
- ]
143
- }
144
- }
145
- ],
146
- "request": {
147
- "url": "{{BOTIUMGRIDURL}}/api/usersays/{{worker_slot}}",
148
- "method": "POST",
149
- "header": [
150
- {
151
- "key": "Content-Type",
152
- "value": "application/json",
153
- "description": ""
154
- },
155
- {
156
- "key": "BOTIUM_API_TOKEN",
157
- "value": "{{BOTIUM_API_TOKEN}}",
158
- "description": ""
159
- }
160
- ],
161
- "body": {
162
- "mode": "raw",
163
- "raw": "{\r\n \"messageText\": \"start\"\r\n}"
164
- },
165
- "description": ""
166
- },
167
- "response": []
168
- },
169
- {
170
- "name": "Wait greeting",
171
- "event": [
172
- {
173
- "listen": "test",
174
- "script": {
175
- "type": "text/javascript",
176
- "exec": [
177
- "pm.test(\"Status code is 200\", function () {",
178
- " pm.response.to.have.status(200);",
179
- "});",
180
- "",
181
- "pm.test(\"Response\", function () {",
182
- " var jsonData = pm.response.json();",
183
- " pm.expect(jsonData.messageText).to.contain('Hi. It looks like a nice drive today. What would you like me to do?');",
184
- "});"
185
- ]
186
- }
187
- }
188
- ],
189
- "request": {
190
- "url": "{{BOTIUMGRIDURL}}/api/botsays/{{worker_slot}}",
191
- "method": "POST",
192
- "header": [
193
- {
194
- "key": "BOTIUM_API_TOKEN",
195
- "value": "{{BOTIUM_API_TOKEN}}",
196
- "description": ""
197
- }
198
- ],
199
- "body": {
200
- "mode": "raw",
201
- "raw": ""
202
- },
203
- "description": ""
204
- },
205
- "response": []
206
- },
207
- {
208
- "name": "Turn on the lights",
209
- "event": [
210
- {
211
- "listen": "test",
212
- "script": {
213
- "type": "text/javascript",
214
- "exec": [
215
- "pm.test(\"Status code is 200\", function () {",
216
- " pm.response.to.have.status(200);",
217
- "});"
218
- ]
219
- }
220
- }
221
- ],
222
- "request": {
223
- "url": "{{BOTIUMGRIDURL}}/api/usersays/{{worker_slot}}",
224
- "method": "POST",
225
- "header": [
226
- {
227
- "key": "Content-Type",
228
- "value": "application/json",
229
- "description": ""
230
- },
231
- {
232
- "key": "BOTIUM_API_TOKEN",
233
- "value": "{{BOTIUM_API_TOKEN}}",
234
- "description": ""
235
- }
236
- ],
237
- "body": {
238
- "mode": "raw",
239
- "raw": "{\r\n \"messageText\": \"turn on the lights please\"\r\n}"
240
- },
241
- "description": ""
242
- },
243
- "response": []
244
- },
245
- {
246
- "name": "Wait for lights",
247
- "event": [
248
- {
249
- "listen": "test",
250
- "script": {
251
- "type": "text/javascript",
252
- "exec": [
253
- "pm.test(\"Status code is 200\", function () {",
254
- " pm.response.to.have.status(200);",
255
- "});",
256
- "",
257
- "pm.test(\"Response\", function () {",
258
- " var jsonData = pm.response.json();",
259
- " pm.expect(jsonData.messageText).to.contain('I\\'ll turn on the lights for you.');",
260
- "});"
261
- ]
262
- }
263
- }
264
- ],
265
- "request": {
266
- "url": "{{BOTIUMGRIDURL}}/api/botsays/{{worker_slot}}",
267
- "method": "POST",
268
- "header": [
269
- {
270
- "key": "BOTIUM_API_TOKEN",
271
- "value": "{{BOTIUM_API_TOKEN}}",
272
- "description": ""
273
- }
274
- ],
275
- "body": {
276
- "mode": "raw",
277
- "raw": ""
278
- },
279
- "description": ""
280
- },
281
- "response": []
282
- },
283
- {
284
- "name": "Play some jazz music",
285
- "event": [
286
- {
287
- "listen": "test",
288
- "script": {
289
- "type": "text/javascript",
290
- "exec": [
291
- "pm.test(\"Status code is 200\", function () {",
292
- " pm.response.to.have.status(200);",
293
- "});"
294
- ]
295
- }
296
- }
297
- ],
298
- "request": {
299
- "url": "{{BOTIUMGRIDURL}}/api/usersays/{{worker_slot}}",
300
- "method": "POST",
301
- "header": [
302
- {
303
- "key": "Content-Type",
304
- "value": "application/json",
305
- "description": ""
306
- },
307
- {
308
- "key": "BOTIUM_API_TOKEN",
309
- "value": "{{BOTIUM_API_TOKEN}}",
310
- "description": ""
311
- }
312
- ],
313
- "body": {
314
- "mode": "raw",
315
- "raw": "{\r\n \"messageText\": \"play some jazz music\"\r\n}"
316
- },
317
- "description": ""
318
- },
319
- "response": []
320
- },
321
- {
322
- "name": "Wait for music",
323
- "event": [
324
- {
325
- "listen": "test",
326
- "script": {
327
- "type": "text/javascript",
328
- "exec": [
329
- "pm.test(\"Status code is 200\", function () {",
330
- " pm.response.to.have.status(200);",
331
- "});",
332
- "",
333
- "pm.test(\"Response\", function () {",
334
- " var jsonData = pm.response.json();",
335
- " pm.expect(jsonData.messageText).to.contain('Great choice! Playing some jazz for you.');",
336
- "});"
337
- ]
338
- }
339
- }
340
- ],
341
- "request": {
342
- "url": "{{BOTIUMGRIDURL}}/api/botsays/{{worker_slot}}",
343
- "method": "POST",
344
- "header": [
345
- {
346
- "key": "BOTIUM_API_TOKEN",
347
- "value": "{{BOTIUM_API_TOKEN}}",
348
- "description": ""
349
- }
350
- ],
351
- "body": {
352
- "mode": "raw",
353
- "raw": ""
354
- },
355
- "description": ""
356
- },
357
- "response": []
358
- },
359
- {
360
- "name": "Stop container",
361
- "event": [
362
- {
363
- "listen": "test",
364
- "script": {
365
- "type": "text/javascript",
366
- "exec": [
367
- "pm.test(\"Status code is 200\", function () {",
368
- " pm.response.to.have.status(200);",
369
- "});"
370
- ]
371
- }
372
- }
373
- ],
374
- "request": {
375
- "url": "{{BOTIUMGRIDURL}}/api/stop/{{worker_slot}}",
376
- "method": "POST",
377
- "header": [
378
- {
379
- "key": "BOTIUM_API_TOKEN",
380
- "value": "{{BOTIUM_API_TOKEN}}",
381
- "description": ""
382
- }
383
- ],
384
- "body": {
385
- "mode": "raw",
386
- "raw": ""
387
- },
388
- "description": ""
389
- },
390
- "response": []
391
- },
392
- {
393
- "name": "Cleanup",
394
- "event": [
395
- {
396
- "listen": "test",
397
- "script": {
398
- "type": "text/javascript",
399
- "exec": [
400
- "pm.test(\"Status code is 200\", function () {",
401
- " pm.response.to.have.status(200);",
402
- "});"
403
- ]
404
- }
405
- }
406
- ],
407
- "request": {
408
- "url": "{{BOTIUMGRIDURL}}/api/clean/{{worker_slot}}",
409
- "method": "POST",
410
- "header": [
411
- {
412
- "key": "BOTIUM_API_TOKEN",
413
- "value": "{{BOTIUM_API_TOKEN}}",
414
- "description": ""
415
- }
416
- ],
417
- "body": {
418
- "mode": "raw",
419
- "raw": ""
420
- },
421
- "description": ""
422
- },
423
- "response": []
424
- },
425
- {
426
- "name": "Assert currentWorkers = 0",
427
- "event": [
428
- {
429
- "listen": "test",
430
- "script": {
431
- "type": "text/javascript",
432
- "exec": [
433
- "pm.test(\"Status code is 200\", function () {",
434
- " pm.response.to.have.status(200);",
435
- "});",
436
- "",
437
- "pm.test(\"currentWorkers is 0\", function () {",
438
- " var jsonData = pm.response.json();",
439
- " pm.expect(jsonData.currentWorkers).to.eql(0);",
440
- "});"
441
- ]
442
- }
443
- }
444
- ],
445
- "request": {
446
- "url": "{{BOTIUMGRIDURL}}/api/status",
447
- "method": "GET",
448
- "header": [
449
- {
450
- "key": "BOTIUM_API_TOKEN",
451
- "value": "{{BOTIUM_API_TOKEN}}",
452
- "description": ""
453
- }
454
- ],
455
- "body": {
456
- "mode": "raw",
457
- "raw": ""
458
- },
459
- "description": ""
460
- },
461
- "response": []
462
- }
463
- ]
464
- },
465
- {
466
- "name": "IBM Watson Scripting Sample",
467
- "description": "",
468
- "item": [
469
- {
470
- "name": "Build Agent Connection",
471
- "event": [
472
- {
473
- "listen": "test",
474
- "script": {
475
- "type": "text/javascript",
476
- "exec": [
477
- "pm.environment.set(\"worker_slot\", pm.response.json().slot);",
478
- "",
479
- "pm.test(\"Status code is 200\", function () {",
480
- " pm.response.to.have.status(200);",
481
- "});",
482
- ""
483
- ]
484
- }
485
- }
486
- ],
487
- "request": {
488
- "url": "{{BOTIUMGRIDURL}}/api/build",
489
- "method": "POST",
490
- "header": [
491
- {
492
- "key": "Content-Type",
493
- "value": "application/json",
494
- "description": ""
495
- },
496
- {
497
- "key": "BOTIUM_API_TOKEN",
498
- "value": "{{BOTIUM_API_TOKEN}}",
499
- "description": ""
500
- }
501
- ],
502
- "body": {
503
- "mode": "raw",
504
- "raw": "{\n\t\"Capabilities\": {\n\t\t\"PROJECTNAME\": \"IBM Watson Conversation Sample\",\n\t\t\"CONTAINERMODE\": \"watsonconversation\",\n\t\t\"WATSONCONVERSATION_USER\": \"0274cb6f-3680-4cf7-bd6b-71c7f447542d\",\n\t\t\"WATSONCONVERSATION_PASSWORD\": \"ZWDE5xo02sby\",\n\t\t\"WATSONCONVERSATION_WORKSPACE_ID\": \"97513bc0-c581-4bec-ac9f-ea6a8ec308a9\",\n\t\t\"WATSONCONVERSATION_COPY_WORKSPACE\": false\n\t}\n}"
505
- },
506
- "description": ""
507
- },
508
- "response": []
509
- },
510
- {
511
- "name": "Assert currentWorkers = 1",
512
- "event": [
513
- {
514
- "listen": "test",
515
- "script": {
516
- "type": "text/javascript",
517
- "exec": [
518
- "pm.test(\"Status code is 200\", function () {",
519
- " pm.response.to.have.status(200);",
520
- "});",
521
- "",
522
- "pm.test(\"currentWorkers is 0\", function () {",
523
- " var jsonData = pm.response.json();",
524
- " pm.expect(jsonData.currentWorkers).to.eql(1);",
525
- "});"
526
- ]
527
- }
528
- }
529
- ],
530
- "request": {
531
- "url": "{{BOTIUMGRIDURL}}/api/status",
532
- "method": "GET",
533
- "header": [
534
- {
535
- "key": "BOTIUM_API_TOKEN",
536
- "value": "{{BOTIUM_API_TOKEN}}",
537
- "description": ""
538
- }
539
- ],
540
- "body": {
541
- "mode": "raw",
542
- "raw": ""
543
- },
544
- "description": ""
545
- },
546
- "response": []
547
- },
548
- {
549
- "name": "Lights and Music",
550
- "event": [
551
- {
552
- "listen": "test",
553
- "script": {
554
- "type": "text/javascript",
555
- "exec": [
556
- "pm.test(\"Status code is 200\", function () {",
557
- " pm.response.to.have.status(200);",
558
- "});"
559
- ]
560
- }
561
- }
562
- ],
563
- "request": {
564
- "url": "{{BOTIUMGRIDURL}}/api/runscript/{{worker_slot}}",
565
- "method": "POST",
566
- "header": [
567
- {
568
- "key": "BOTIUM_API_TOKEN",
569
- "value": "{{BOTIUM_API_TOKEN}}",
570
- "description": ""
571
- }
572
- ],
573
- "body": {
574
- "mode": "raw",
575
- "raw": "lights and music\r\n\r\n#me\r\nstart\r\n\r\n#bot\r\nHi. It looks like a nice drive today. What would you like me to do?\r\n\r\n#me\r\nturn on the lights please\r\n\r\n#bot\r\nI'll turn on the lights for you.\r\n\r\n#me\r\nplay some jazz music\r\n\r\n#bot\r\nGreat choice! Playing some jazz for you.\r\n"
576
- },
577
- "description": ""
578
- },
579
- "response": []
580
- },
581
- {
582
- "name": "Restaurant",
583
- "event": [
584
- {
585
- "listen": "test",
586
- "script": {
587
- "type": "text/javascript",
588
- "exec": [
589
- "pm.test(\"Status code is 200\", function () {",
590
- " pm.response.to.have.status(200);",
591
- "});"
592
- ]
593
- }
594
- }
595
- ],
596
- "request": {
597
- "url": "{{BOTIUMGRIDURL}}/api/runscript/{{worker_slot}}",
598
- "method": "POST",
599
- "header": [
600
- {
601
- "key": "BOTIUM_API_TOKEN",
602
- "value": "{{BOTIUM_API_TOKEN}}",
603
- "description": ""
604
- }
605
- ],
606
- "body": {
607
- "mode": "raw",
608
- "raw": "restaurant\r\n\r\n#me\r\nhi\r\n\r\n#bot\r\nhi\r\n\r\n#me\r\nwhere is the next restauran\r\n\r\n#bot\r\nI understand you want me to find a location. I can find restaurants, gas stations and restrooms nearby.\r\n\r\n#me\r\nfind my a restaurant\r\n\r\n#bot\r\nOf course. Do you have a specific cuisine in mind?\r\n\r\n#me\r\npizza\r\n\r\n#bot\r\nSuper! I've found 5 locations for you. Which one would you like to drive to?\r\n\r\n#me\r\n1\r\n\r\n#bot\r\nSure! Restaurant 1 on the list gets great reviews.\r\n\r\n#bot\r\nWhat day/time did you want to go to the restaurant?\r\n\r\n#me\r\n10th of january\r\n\r\n#bot\r\nOK\r\n"
609
- },
610
- "description": ""
611
- },
612
- "response": []
613
- },
614
- {
615
- "name": "Cleanup",
616
- "event": [
617
- {
618
- "listen": "test",
619
- "script": {
620
- "type": "text/javascript",
621
- "exec": [
622
- "pm.test(\"Status code is 200\", function () {",
623
- " pm.response.to.have.status(200);",
624
- "});"
625
- ]
626
- }
627
- }
628
- ],
629
- "request": {
630
- "url": "{{BOTIUMGRIDURL}}/api/clean/{{worker_slot}}",
631
- "method": "POST",
632
- "header": [
633
- {
634
- "key": "BOTIUM_API_TOKEN",
635
- "value": "{{BOTIUM_API_TOKEN}}",
636
- "description": ""
637
- }
638
- ],
639
- "body": {
640
- "mode": "raw",
641
- "raw": ""
642
- },
643
- "description": ""
644
- },
645
- "response": []
646
- }
647
- ]
648
- },
649
- {
650
- "name": "Amazon Alexa Sample",
651
- "description": "",
652
- "item": [
653
- {
654
- "name": "Build Agent Connection",
655
- "event": [
656
- {
657
- "listen": "test",
658
- "script": {
659
- "type": "text/javascript",
660
- "exec": [
661
- "pm.environment.set(\"worker_slot\", pm.response.json().slot);",
662
- "",
663
- "pm.test(\"Status code is 200\", function () {",
664
- " pm.response.to.have.status(200);",
665
- "});",
666
- ""
667
- ]
668
- }
669
- }
670
- ],
671
- "request": {
672
- "url": "{{BOTIUMGRIDURL}}/api/build",
673
- "method": "POST",
674
- "header": [
675
- {
676
- "key": "Content-Type",
677
- "value": "application/json",
678
- "description": ""
679
- },
680
- {
681
- "key": "BOTIUM_API_TOKEN",
682
- "value": "{{BOTIUM_API_TOKEN}}",
683
- "description": ""
684
- }
685
- ],
686
- "body": {
687
- "mode": "raw",
688
- "raw": "{\r\n \"Capabilities\": {\r\n \"PROJECTNAME\": \"Alexa Smapi Sample\",\r\n \"CONTAINERMODE\": \"alexa-smapi\",\r\n \"ALEXA_SMAPI_SKILLID\": \"amzn1.ask.skill.28e718e6-c557-4cfa-bdb7-26935ea6451b\",\r\n \"ALEXA_SMAPI_API\": \"simulation\"\r\n }\r\n}\r\n"
689
- },
690
- "description": ""
691
- },
692
- "response": []
693
- },
694
- {
695
- "name": "Assert currentWorkers = 1",
696
- "event": [
697
- {
698
- "listen": "test",
699
- "script": {
700
- "type": "text/javascript",
701
- "exec": [
702
- "pm.test(\"Status code is 200\", function () {",
703
- " pm.response.to.have.status(200);",
704
- "});",
705
- "",
706
- "pm.test(\"currentWorkers is 0\", function () {",
707
- " var jsonData = pm.response.json();",
708
- " pm.expect(jsonData.currentWorkers).to.eql(1);",
709
- "});"
710
- ]
711
- }
712
- }
713
- ],
714
- "request": {
715
- "url": "{{BOTIUMGRIDURL}}/api/status",
716
- "method": "GET",
717
- "header": [
718
- {
719
- "key": "BOTIUM_API_TOKEN",
720
- "value": "{{BOTIUM_API_TOKEN}}",
721
- "description": ""
722
- }
723
- ],
724
- "body": {
725
- "mode": "raw",
726
- "raw": ""
727
- },
728
- "description": ""
729
- },
730
- "response": []
731
- },
732
- {
733
- "name": "TC1: Ask for help",
734
- "event": [
735
- {
736
- "listen": "test",
737
- "script": {
738
- "type": "text/javascript",
739
- "exec": [
740
- "pm.test(\"Status code is 200\", function () {",
741
- " pm.response.to.have.status(200);",
742
- "});"
743
- ]
744
- }
745
- }
746
- ],
747
- "request": {
748
- "url": "{{BOTIUMGRIDURL}}/api/runscript/{{worker_slot}}",
749
- "method": "POST",
750
- "header": [
751
- {
752
- "key": "BOTIUM_API_TOKEN",
753
- "value": "{{BOTIUM_API_TOKEN}}",
754
- "description": ""
755
- }
756
- ],
757
- "body": {
758
- "mode": "raw",
759
- "raw": "call for help\r\n\r\n#me\r\nask space facts for help\r\n\r\n#bot\r\nYou can say"
760
- },
761
- "description": ""
762
- },
763
- "response": []
764
- },
765
- {
766
- "name": "TC1: Tell me a fact",
767
- "event": [
768
- {
769
- "listen": "test",
770
- "script": {
771
- "type": "text/javascript",
772
- "exec": [
773
- "pm.test(\"Status code is 200\", function () {",
774
- " pm.response.to.have.status(200);",
775
- "});"
776
- ]
777
- }
778
- }
779
- ],
780
- "request": {
781
- "url": "{{BOTIUMGRIDURL}}/api/runscript/{{worker_slot}}",
782
- "method": "POST",
783
- "header": [
784
- {
785
- "key": "BOTIUM_API_TOKEN",
786
- "value": "{{BOTIUM_API_TOKEN}}",
787
- "description": ""
788
- }
789
- ],
790
- "body": {
791
- "mode": "raw",
792
- "raw": "tell me a fact\r\n\r\n#me\r\ntell me a space fact\r\n\r\n#bot\r\nHere's your fact\r\n\r\n#me\r\nask space facts to tell me a space trivia\r\n\r\n#bot\r\nHere's your fact"
793
- },
794
- "description": ""
795
- },
796
- "response": []
797
- },
798
- {
799
- "name": "Cleanup",
800
- "event": [
801
- {
802
- "listen": "test",
803
- "script": {
804
- "type": "text/javascript",
805
- "exec": [
806
- "pm.test(\"Status code is 200\", function () {",
807
- " pm.response.to.have.status(200);",
808
- "});"
809
- ]
810
- }
811
- }
812
- ],
813
- "request": {
814
- "url": "{{BOTIUMGRIDURL}}/api/clean/{{worker_slot}}",
815
- "method": "POST",
816
- "header": [
817
- {
818
- "key": "BOTIUM_API_TOKEN",
819
- "value": "{{BOTIUM_API_TOKEN}}",
820
- "description": ""
821
- }
822
- ],
823
- "body": {
824
- "mode": "raw",
825
- "raw": ""
826
- },
827
- "description": ""
828
- },
829
- "response": []
830
- }
831
- ]
832
- }
833
- ]
834
- }