@suffolklitlab/alkiln 5.14.0 → 5.15.0

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 (35) hide show
  1. package/.github/workflows/github_server.yml +1 -1
  2. package/.github/workflows/playground.yml +2 -1
  3. package/CHANGELOG.md +29 -0
  4. package/action.yml +26 -10
  5. package/action_for_github_server/action.yml +31 -27
  6. package/docs/4_environments.md +2 -2
  7. package/docs/artifacts_folder_name.md +121 -71
  8. package/lib/docassemble/server_install.js +0 -2
  9. package/lib/docassemble/setup.js +1 -3
  10. package/lib/docassemble/takedown.js +2 -2
  11. package/lib/globals.js +10 -0
  12. package/lib/run_cucumber.js +40 -53
  13. package/lib/scope.js +32 -0
  14. package/lib/setup/TestGenerator.js +1757 -0
  15. package/lib/setup/artifacts.js +20 -0
  16. package/lib/setup/generate.js +42 -0
  17. package/lib/setup/get_Gherkin_AST.js +26 -0
  18. package/lib/setup/validate.js +89 -0
  19. package/lib/steps.js +53 -19
  20. package/lib/utils/Log.js +302 -149
  21. package/lib/utils/get_error_stacks.js +16 -0
  22. package/lib/utils/reports.js +43 -23
  23. package/lib/utils/session_vars.js +77 -57
  24. package/lib/utils/set_sources_paths.js +98 -0
  25. package/package.json +18 -7
  26. package/tests/log_codes/check_codes.sh +17 -13
  27. package/tests/log_codes/log_code_expected_instances.txt +58 -0
  28. package/tests/unit_tests/constrained_random_answers/invalid.fixtures.js +178 -0
  29. package/tests/unit_tests/constrained_random_answers/invalid.test.js +251 -0
  30. package/tests/unit_tests/constrained_random_answers/valid.fixtures.js +957 -0
  31. package/tests/unit_tests/constrained_random_answers/valid.test.js +563 -0
  32. package/tests/unit_tests/log.test.js +17 -41
  33. package/_alkiln_meta/gherkin_parsed_example.json +0 -1546
  34. package/_alkiln_meta/shift_logs.js +0 -75
  35. /package/docs/{expected_inernal_results.md → expected_internal_results.md} +0 -0
@@ -1,1546 +0,0 @@
1
- {
2
- "0": {
3
- "gherkinDocument": {
4
- "feature": {
5
- "tags": [
6
- {
7
- "location": {
8
- "line": 1,
9
- "column": 1
10
- },
11
- "name": "@random_tests",
12
- "id": "19ec6778-4be1-4ba1-921b-1c01ff4f4309"
13
- },
14
- {
15
- "location": {
16
- "line": 1,
17
- "column": 15
18
- },
19
- "name": "@success",
20
- "id": "318bf5b4-44ce-4695-a783-2993c566d53b"
21
- },
22
- {
23
- "location": {
24
- "line": 1,
25
- "column": 24
26
- },
27
- "name": "@alkiln_randomized",
28
- "id": "6208c459-2e4e-4dad-a8a2-aa61c9f53952"
29
- }
30
- ],
31
- "location": {
32
- "line": 2,
33
- "column": 1
34
- },
35
- "language": "en",
36
- "keyword": "Feature",
37
- "name": "I generate valid constrained random answers tests with ALKiln randomization",
38
- "description": "This line does not get parsed as a Scenario despite the Scenario: keyword\nThis line doesn't get added either.",
39
- "children": [
40
- {
41
- "scenario": {
42
- "id": "8e3ecf53-e4fa-4831-99f8-aec9c69e7a28",
43
- "tags": [
44
- {
45
- "location": {
46
- "line": 16,
47
- "column": 1
48
- },
49
- "name": "@temp_constrained",
50
- "id": "b34ad8de-7765-4113-89f0-fa737cddf226"
51
- },
52
- {
53
- "location": {
54
- "line": 16,
55
- "column": 19
56
- },
57
- "name": "@alkiln_randomized_generator1_scenario1_of_2",
58
- "id": "a269d749-2bd8-4026-b40a-14ec5a03a13b"
59
- }
60
- ],
61
- "location": {
62
- "line": 17,
63
- "column": 1
64
- },
65
- "keyword": "Scenario",
66
- "name": "simplest random input Steps ALKiln random test generator1_scenario1_of_2",
67
- "description": "",
68
- "steps": [
69
- {
70
- "id": "d8717f3d-fbbb-46c2-9ec7-2072a709c17d",
71
- "location": {
72
- "line": 18,
73
- "column": 3
74
- },
75
- "keyword": "Given ",
76
- "keywordType": "Context",
77
- "text": "I start the interview at \"test_kickout\""
78
- },
79
- {
80
- "id": "c4760420-c71a-4f6e-a27c-6df2a1e998f5",
81
- "location": {
82
- "line": 19,
83
- "column": 3
84
- },
85
- "keyword": "And ",
86
- "keywordType": "Conjunction",
87
- "text": "I get to any of the question ids [\"kickout screen\", \"success screen\"] with this data:",
88
- "dataTable": {
89
- "location": {
90
- "line": 20,
91
- "column": 5
92
- },
93
- "rows": [
94
- {
95
- "id": "e2855ddd-87d3-4490-a4cc-83d2a4f68579",
96
- "location": {
97
- "line": 20,
98
- "column": 5
99
- },
100
- "cells": [
101
- {
102
- "location": {
103
- "line": 20,
104
- "column": 7
105
- },
106
- "value": "var"
107
- },
108
- {
109
- "location": {
110
- "line": 20,
111
- "column": 13
112
- },
113
- "value": "value"
114
- }
115
- ]
116
- },
117
- {
118
- "id": "767664c2-a29d-46d9-b68f-687ff4c088ca",
119
- "location": {
120
- "line": 21,
121
- "column": 5
122
- },
123
- "cells": [
124
- {
125
- "location": {
126
- "line": 21,
127
- "column": 7
128
- },
129
- "value": "user_choice"
130
- },
131
- {
132
- "location": {
133
- "line": 21,
134
- "column": 21
135
- },
136
- "value": "wrong"
137
- }
138
- ]
139
- }
140
- ]
141
- }
142
- }
143
- ],
144
- "examples": []
145
- }
146
- },
147
- {
148
- "scenario": {
149
- "id": "199b3852-84ca-438d-97f9-70332aff46de",
150
- "tags": [
151
- {
152
- "location": {
153
- "line": 54,
154
- "column": 1
155
- },
156
- "name": "@temp_constrained",
157
- "id": "5692589d-b3c3-419a-a226-0f84e7faa57a"
158
- },
159
- {
160
- "location": {
161
- "line": 54,
162
- "column": 19
163
- },
164
- "name": "@alkiln_randomized_generator1_scenario2_of_2",
165
- "id": "dbaf2b15-40cc-4b01-8a3f-371b3d64e070"
166
- }
167
- ],
168
- "location": {
169
- "line": 55,
170
- "column": 1
171
- },
172
- "keyword": "Scenario",
173
- "name": "simplest random input Steps ALKiln random test generator1_scenario2_of_2",
174
- "description": "",
175
- "steps": [
176
- {
177
- "id": "c11866d0-154b-44f8-9302-82e9b27a83ad",
178
- "location": {
179
- "line": 56,
180
- "column": 3
181
- },
182
- "keyword": "Given ",
183
- "keywordType": "Context",
184
- "text": "I start the interview at \"test_kickout\""
185
- },
186
- {
187
- "id": "3f552311-e6d2-45f7-885c-09b664762a0d",
188
- "location": {
189
- "line": 57,
190
- "column": 3
191
- },
192
- "keyword": "And ",
193
- "keywordType": "Conjunction",
194
- "text": "I get to any of the question ids [\"kickout screen\", \"success screen\"] with this data:",
195
- "dataTable": {
196
- "location": {
197
- "line": 58,
198
- "column": 5
199
- },
200
- "rows": [
201
- {
202
- "id": "2246b717-2b98-4517-be8d-3b887398303f",
203
- "location": {
204
- "line": 58,
205
- "column": 5
206
- },
207
- "cells": [
208
- {
209
- "location": {
210
- "line": 58,
211
- "column": 7
212
- },
213
- "value": "var"
214
- },
215
- {
216
- "location": {
217
- "line": 58,
218
- "column": 13
219
- },
220
- "value": "value"
221
- }
222
- ]
223
- },
224
- {
225
- "id": "7b24cb27-0421-4e85-bb77-9704d97587c1",
226
- "location": {
227
- "line": 59,
228
- "column": 5
229
- },
230
- "cells": [
231
- {
232
- "location": {
233
- "line": 59,
234
- "column": 7
235
- },
236
- "value": "user_choice"
237
- },
238
- {
239
- "location": {
240
- "line": 59,
241
- "column": 21
242
- },
243
- "value": "correct"
244
- }
245
- ]
246
- }
247
- ]
248
- }
249
- }
250
- ],
251
- "examples": []
252
- }
253
- },
254
- {
255
- "scenario": {
256
- "id": "d36c26e4-33e7-45b8-a900-13fee321a178",
257
- "tags": [
258
- {
259
- "location": {
260
- "line": 92,
261
- "column": 1
262
- },
263
- "name": "@alkiln_randomized_generator2_scenario1_of_1",
264
- "id": "67663f4e-7263-4c42-bb81-7ab29a7c5343"
265
- }
266
- ],
267
- "location": {
268
- "line": 93,
269
- "column": 1
270
- },
271
- "keyword": "Scenario",
272
- "name": "Debug warning for constraints table syntax that creates missing vals ALKiln random test generator2_scenario1_of_1",
273
- "description": "",
274
- "steps": [
275
- {
276
- "id": "b9b6b270-f4e0-4964-a5e4-3e746ec19a7d",
277
- "location": {
278
- "line": 94,
279
- "column": 3
280
- },
281
- "keyword": "And ",
282
- "keywordType": "Conjunction",
283
- "text": "the max seconds for each Step is 5 seconds"
284
- },
285
- {
286
- "id": "93297bbd-38b6-4426-80d2-9affd90571fb",
287
- "location": {
288
- "line": 95,
289
- "column": 3
290
- },
291
- "keyword": "And ",
292
- "keywordType": "Conjunction",
293
- "text": "I start the interview at \"test_kickout\""
294
- },
295
- {
296
- "id": "c4ff3192-4894-4c33-b40f-f12bb3e7e7c4",
297
- "location": {
298
- "line": 96,
299
- "column": 3
300
- },
301
- "keyword": "And ",
302
- "keywordType": "Conjunction",
303
- "text": "I get to any of the question ids [\"kickout screen\", \"success screen\"] with this data:",
304
- "dataTable": {
305
- "location": {
306
- "line": 97,
307
- "column": 5
308
- },
309
- "rows": [
310
- {
311
- "id": "a5d31f13-746e-4e12-ac42-bde44e4722ca",
312
- "location": {
313
- "line": 97,
314
- "column": 5
315
- },
316
- "cells": [
317
- {
318
- "location": {
319
- "line": 97,
320
- "column": 7
321
- },
322
- "value": "var"
323
- },
324
- {
325
- "location": {
326
- "line": 97,
327
- "column": 13
328
- },
329
- "value": "value"
330
- }
331
- ]
332
- },
333
- {
334
- "id": "9815cc2b-adaa-40a0-acd7-c575313ab418",
335
- "location": {
336
- "line": 98,
337
- "column": 5
338
- },
339
- "cells": [
340
- {
341
- "location": {
342
- "line": 98,
343
- "column": 7
344
- },
345
- "value": "user_choice"
346
- },
347
- {
348
- "location": {
349
- "line": 98,
350
- "column": 21
351
- },
352
- "value": "wrong"
353
- }
354
- ]
355
- },
356
- {
357
- "id": "d5a242b0-fe23-423b-aa18-4cd10aa3b287",
358
- "location": {
359
- "line": 99,
360
- "column": 5
361
- },
362
- "cells": [
363
- {
364
- "location": {
365
- "line": 99,
366
- "column": 7
367
- },
368
- "value": "fake_var"
369
- },
370
- {
371
- "location": {
372
- "line": 99,
373
- "column": 19
374
- },
375
- "value": ""
376
- }
377
- ]
378
- }
379
- ]
380
- }
381
- }
382
- ],
383
- "examples": []
384
- }
385
- },
386
- {
387
- "scenario": {
388
- "id": "5cc1fc52-e396-488d-8089-61d5d1f83458",
389
- "tags": [
390
- {
391
- "location": {
392
- "line": 106,
393
- "column": 1
394
- },
395
- "name": "@generated_warning",
396
- "id": "c9f4d190-e93f-4460-92af-cf1348f865f2"
397
- },
398
- {
399
- "location": {
400
- "line": 106,
401
- "column": 20
402
- },
403
- "name": "@alkiln_randomized_generator3_scenario1_of_1",
404
- "id": "2188855b-105b-4f24-815d-e042360b5ceb"
405
- }
406
- ],
407
- "location": {
408
- "line": 107,
409
- "column": 1
410
- },
411
- "keyword": "Scenario",
412
- "name": "With a missing number I get a warning and 1 generated test ALKiln random test generator3_scenario1_of_1",
413
- "description": "",
414
- "steps": [
415
- {
416
- "id": "41b7b781-977f-4561-8c19-cb331ccc50bc",
417
- "location": {
418
- "line": 108,
419
- "column": 3
420
- },
421
- "keyword": "Given ",
422
- "keywordType": "Context",
423
- "text": "I start the interview at \"test_kickout\""
424
- },
425
- {
426
- "id": "703ef12e-87a6-4c74-822b-9af5ba532b02",
427
- "location": {
428
- "line": 109,
429
- "column": 3
430
- },
431
- "keyword": "Then ",
432
- "keywordType": "Outcome",
433
- "text": "ALKiln warns the author about a generator problem with:",
434
- "docString": {
435
- "location": {
436
- "line": 110,
437
- "column": 5
438
- },
439
- "content": "----- Generator file warning -----\nšŸ”Ž ALK0237 generating files WARNING [2025-01-27 21:53:21UTC]: A constrained random answers Step is missing the number of tests to generate. ALKiln will create 1 test. The Step: \"I generate not a number constrained random tests that get to [\"kickout screen\", \"success screen\"] when I pick from:\"\n-----",
440
- "delimiter": "\"\"\""
441
- }
442
- },
443
- {
444
- "id": "bcc0597a-8c01-4700-90f7-965ac23af23f",
445
- "location": {
446
- "line": 115,
447
- "column": 3
448
- },
449
- "keyword": "And ",
450
- "keywordType": "Conjunction",
451
- "text": "I get to any of the question ids [\"kickout screen\", \"success screen\"] with this data:",
452
- "dataTable": {
453
- "location": {
454
- "line": 116,
455
- "column": 5
456
- },
457
- "rows": [
458
- {
459
- "id": "a44eea8b-57df-4b63-813a-d551a5300177",
460
- "location": {
461
- "line": 116,
462
- "column": 5
463
- },
464
- "cells": [
465
- {
466
- "location": {
467
- "line": 116,
468
- "column": 7
469
- },
470
- "value": "var"
471
- },
472
- {
473
- "location": {
474
- "line": 116,
475
- "column": 13
476
- },
477
- "value": "value"
478
- }
479
- ]
480
- },
481
- {
482
- "id": "4be87526-cb7f-4a27-bdc2-3ea2db4e982e",
483
- "location": {
484
- "line": 117,
485
- "column": 5
486
- },
487
- "cells": [
488
- {
489
- "location": {
490
- "line": 117,
491
- "column": 7
492
- },
493
- "value": "user_choice"
494
- },
495
- {
496
- "location": {
497
- "line": 117,
498
- "column": 21
499
- },
500
- "value": "correct"
501
- }
502
- ]
503
- }
504
- ]
505
- }
506
- }
507
- ],
508
- "examples": []
509
- }
510
- },
511
- {
512
- "scenario": {
513
- "id": "5be7a526-fbbc-4fff-8161-343fb8b3e3ca",
514
- "tags": [
515
- {
516
- "location": {
517
- "line": 119,
518
- "column": 1
519
- },
520
- "name": "@alkiln_randomized_generator4_scenario1_of_2",
521
- "id": "fcb0bcf6-b3ae-4ea8-8dd5-79790cae8ce7"
522
- }
523
- ],
524
- "location": {
525
- "line": 120,
526
- "column": 1
527
- },
528
- "keyword": "Scenario",
529
- "name": "With too many numbers I get a warning and use the 2nd number ALKiln random test generator4_scenario1_of_2",
530
- "description": "",
531
- "steps": [
532
- {
533
- "id": "157bba2a-1d9c-4c06-bc7a-5e66986bc783",
534
- "location": {
535
- "line": 121,
536
- "column": 3
537
- },
538
- "keyword": "Given ",
539
- "keywordType": "Context",
540
- "text": "I start the interview at \"test_kickout\""
541
- },
542
- {
543
- "id": "3651674a-9bcc-4986-ac79-aaa27a405ed9",
544
- "location": {
545
- "line": 122,
546
- "column": 3
547
- },
548
- "keyword": "Then ",
549
- "keywordType": "Outcome",
550
- "text": "ALKiln warns the author about a generator problem with:",
551
- "docString": {
552
- "location": {
553
- "line": 123,
554
- "column": 5
555
- },
556
- "content": "----- Generator file warning -----\nšŸ”Ž ALK0238 generating files WARNING [2025-01-27 21:53:21UTC]: This constrained random answers Step is ambiguous because it has more than 1 number. ALKiln will use the last number the author gave (\"2\"). The Step: \nI generate 4 2 constrained random tests that get to \"kickout screen\" or \"success screen\" when I pick from:\n-----",
557
- "delimiter": "\"\"\""
558
- }
559
- },
560
- {
561
- "id": "e4d2d8b9-cf90-4fd6-8e27-1e2b6be5fed2",
562
- "location": {
563
- "line": 129,
564
- "column": 3
565
- },
566
- "keyword": "And ",
567
- "keywordType": "Conjunction",
568
- "text": "I get to any of the question ids [\"kickout screen\", \"success screen\"] with this data:",
569
- "dataTable": {
570
- "location": {
571
- "line": 130,
572
- "column": 5
573
- },
574
- "rows": [
575
- {
576
- "id": "73dfe5e6-01bb-4529-a80e-da28659b918e",
577
- "location": {
578
- "line": 130,
579
- "column": 5
580
- },
581
- "cells": [
582
- {
583
- "location": {
584
- "line": 130,
585
- "column": 7
586
- },
587
- "value": "var"
588
- },
589
- {
590
- "location": {
591
- "line": 130,
592
- "column": 13
593
- },
594
- "value": "value"
595
- }
596
- ]
597
- },
598
- {
599
- "id": "4a16f9c0-6454-43f8-af35-fb4b7bfef01e",
600
- "location": {
601
- "line": 131,
602
- "column": 5
603
- },
604
- "cells": [
605
- {
606
- "location": {
607
- "line": 131,
608
- "column": 7
609
- },
610
- "value": "user_choice"
611
- },
612
- {
613
- "location": {
614
- "line": 131,
615
- "column": 21
616
- },
617
- "value": "correct"
618
- }
619
- ]
620
- }
621
- ]
622
- }
623
- }
624
- ],
625
- "examples": []
626
- }
627
- },
628
- {
629
- "scenario": {
630
- "id": "ee5c0867-c0a9-4b96-b9b6-3d8fa4666e5d",
631
- "tags": [
632
- {
633
- "location": {
634
- "line": 133,
635
- "column": 1
636
- },
637
- "name": "@alkiln_randomized_generator4_scenario2_of_2",
638
- "id": "57a24cf9-95cf-4007-bf94-dd8e36a2c51b"
639
- }
640
- ],
641
- "location": {
642
- "line": 134,
643
- "column": 1
644
- },
645
- "keyword": "Scenario",
646
- "name": "With too many numbers I get a warning and use the 2nd number ALKiln random test generator4_scenario2_of_2",
647
- "description": "",
648
- "steps": [
649
- {
650
- "id": "fec6e427-ae45-4f1a-8522-050894c879a0",
651
- "location": {
652
- "line": 135,
653
- "column": 3
654
- },
655
- "keyword": "Given ",
656
- "keywordType": "Context",
657
- "text": "I start the interview at \"test_kickout\""
658
- },
659
- {
660
- "id": "9443055c-b988-4e44-9d2e-c6bb62f235b6",
661
- "location": {
662
- "line": 136,
663
- "column": 3
664
- },
665
- "keyword": "Then ",
666
- "keywordType": "Outcome",
667
- "text": "ALKiln warns the author about a generator problem with:",
668
- "docString": {
669
- "location": {
670
- "line": 137,
671
- "column": 5
672
- },
673
- "content": "----- Generator file warning -----\nšŸ”Ž ALK0238 generating files WARNING [2025-01-27 21:53:21UTC]: This constrained random answers Step is ambiguous because it has more than 1 number. ALKiln will use the last number the author gave (\"2\"). The Step: \nI generate 4 2 constrained random tests that get to \"kickout screen\" or \"success screen\" when I pick from:\n-----",
674
- "delimiter": "\"\"\""
675
- }
676
- },
677
- {
678
- "id": "3ea995e8-2a8f-414f-b42f-a8238059aa2b",
679
- "location": {
680
- "line": 143,
681
- "column": 3
682
- },
683
- "keyword": "And ",
684
- "keywordType": "Conjunction",
685
- "text": "I get to any of the question ids [\"kickout screen\", \"success screen\"] with this data:",
686
- "dataTable": {
687
- "location": {
688
- "line": 144,
689
- "column": 5
690
- },
691
- "rows": [
692
- {
693
- "id": "2315128e-c62f-40cb-bd32-4ca85f2e6e24",
694
- "location": {
695
- "line": 144,
696
- "column": 5
697
- },
698
- "cells": [
699
- {
700
- "location": {
701
- "line": 144,
702
- "column": 7
703
- },
704
- "value": "var"
705
- },
706
- {
707
- "location": {
708
- "line": 144,
709
- "column": 13
710
- },
711
- "value": "value"
712
- }
713
- ]
714
- },
715
- {
716
- "id": "edfbf196-b28e-42ad-a559-be297910f18a",
717
- "location": {
718
- "line": 145,
719
- "column": 5
720
- },
721
- "cells": [
722
- {
723
- "location": {
724
- "line": 145,
725
- "column": 7
726
- },
727
- "value": "user_choice"
728
- },
729
- {
730
- "location": {
731
- "line": 145,
732
- "column": 21
733
- },
734
- "value": "wrong"
735
- }
736
- ]
737
- }
738
- ]
739
- }
740
- }
741
- ],
742
- "examples": []
743
- }
744
- },
745
- {
746
- "scenario": {
747
- "id": "ad6b67a3-2e22-413b-8f0b-1b9b88568769",
748
- "tags": [
749
- {
750
- "location": {
751
- "line": 147,
752
- "column": 1
753
- },
754
- "name": "@alkiln_randomized_generator5_scenario1_of_2",
755
- "id": "b81badb3-ffcf-478a-9755-1fdf1be713da"
756
- }
757
- ],
758
- "location": {
759
- "line": 148,
760
- "column": 1
761
- },
762
- "keyword": "Scenario",
763
- "name": "I'm warned when I ask for too many unique tests ALKiln random test generator5_scenario1_of_2",
764
- "description": "",
765
- "steps": [
766
- {
767
- "id": "77750957-ee5f-4c02-bed9-bdead319c157",
768
- "location": {
769
- "line": 149,
770
- "column": 3
771
- },
772
- "keyword": "Given ",
773
- "keywordType": "Context",
774
- "text": "I start the interview at \"test_kickout\""
775
- },
776
- {
777
- "id": "7d8e0c96-36cd-4865-b92d-e0ca56fbce3e",
778
- "location": {
779
- "line": 150,
780
- "column": 3
781
- },
782
- "keyword": "Then ",
783
- "keywordType": "Outcome",
784
- "text": "ALKiln warns the author about a generator problem with:",
785
- "docString": {
786
- "location": {
787
- "line": 151,
788
- "column": 5
789
- },
790
- "content": "----- Generator file warning -----\nšŸ”Ž ALK0243 generating files WARNING [2025-01-27 21:53:21UTC]: ALKiln only managed to make 2 unique tests out of the 3 asked for given the options:\n{\n text: 'I generate 3 random tests that get to any of \"kickout screen\", \"success screen\" when I pick from these constraints:',\n rows: [\n [ 'var', 'possible_values' ],\n [ 'user_choice', 'correct;; wrong' ]\n ]\n}\n-----",
791
- "delimiter": "\"\"\""
792
- }
793
- },
794
- {
795
- "id": "ccf0e66d-5649-4372-83aa-f1a77639607c",
796
- "location": {
797
- "line": 163,
798
- "column": 3
799
- },
800
- "keyword": "And ",
801
- "keywordType": "Conjunction",
802
- "text": "I get to any of the question ids [\"kickout screen\", \"success screen\"] with this data:",
803
- "dataTable": {
804
- "location": {
805
- "line": 164,
806
- "column": 5
807
- },
808
- "rows": [
809
- {
810
- "id": "274ce747-e8fa-4671-bef2-cc8bde4cf9f5",
811
- "location": {
812
- "line": 164,
813
- "column": 5
814
- },
815
- "cells": [
816
- {
817
- "location": {
818
- "line": 164,
819
- "column": 7
820
- },
821
- "value": "var"
822
- },
823
- {
824
- "location": {
825
- "line": 164,
826
- "column": 13
827
- },
828
- "value": "value"
829
- }
830
- ]
831
- },
832
- {
833
- "id": "4ff58aaa-cc3a-4182-99c5-bc0d00493d5b",
834
- "location": {
835
- "line": 165,
836
- "column": 5
837
- },
838
- "cells": [
839
- {
840
- "location": {
841
- "line": 165,
842
- "column": 7
843
- },
844
- "value": "user_choice"
845
- },
846
- {
847
- "location": {
848
- "line": 165,
849
- "column": 21
850
- },
851
- "value": "correct"
852
- }
853
- ]
854
- }
855
- ]
856
- }
857
- }
858
- ],
859
- "examples": []
860
- }
861
- },
862
- {
863
- "scenario": {
864
- "id": "b76763c2-a63f-4b92-9365-1dd4e217fb42",
865
- "tags": [
866
- {
867
- "location": {
868
- "line": 167,
869
- "column": 1
870
- },
871
- "name": "@alkiln_randomized_generator5_scenario2_of_2",
872
- "id": "f0f6223c-0ae5-4c9b-bdaa-b1c02c405005"
873
- }
874
- ],
875
- "location": {
876
- "line": 168,
877
- "column": 1
878
- },
879
- "keyword": "Scenario",
880
- "name": "I'm warned when I ask for too many unique tests ALKiln random test generator5_scenario2_of_2",
881
- "description": "",
882
- "steps": [
883
- {
884
- "id": "1adf3249-6307-45df-b50f-fa656f21d965",
885
- "location": {
886
- "line": 169,
887
- "column": 3
888
- },
889
- "keyword": "Given ",
890
- "keywordType": "Context",
891
- "text": "I start the interview at \"test_kickout\""
892
- },
893
- {
894
- "id": "8d462dfe-093c-401e-8fe5-08393cb0f919",
895
- "location": {
896
- "line": 170,
897
- "column": 3
898
- },
899
- "keyword": "Then ",
900
- "keywordType": "Outcome",
901
- "text": "ALKiln warns the author about a generator problem with:",
902
- "docString": {
903
- "location": {
904
- "line": 171,
905
- "column": 5
906
- },
907
- "content": "----- Generator file warning -----\nšŸ”Ž ALK0243 generating files WARNING [2025-01-27 21:53:21UTC]: ALKiln only managed to make 2 unique tests out of the 3 asked for given the options:\n{\n text: 'I generate 3 random tests that get to any of \"kickout screen\", \"success screen\" when I pick from these constraints:',\n rows: [\n [ 'var', 'possible_values' ],\n [ 'user_choice', 'correct;; wrong' ]\n ]\n}\n-----",
908
- "delimiter": "\"\"\""
909
- }
910
- },
911
- {
912
- "id": "4081dc68-a87d-4afe-a6ae-a7805d4ef870",
913
- "location": {
914
- "line": 183,
915
- "column": 3
916
- },
917
- "keyword": "And ",
918
- "keywordType": "Conjunction",
919
- "text": "I get to any of the question ids [\"kickout screen\", \"success screen\"] with this data:",
920
- "dataTable": {
921
- "location": {
922
- "line": 184,
923
- "column": 5
924
- },
925
- "rows": [
926
- {
927
- "id": "59733c3d-c7ce-41b7-8bd5-43c7bcf6f37b",
928
- "location": {
929
- "line": 184,
930
- "column": 5
931
- },
932
- "cells": [
933
- {
934
- "location": {
935
- "line": 184,
936
- "column": 7
937
- },
938
- "value": "var"
939
- },
940
- {
941
- "location": {
942
- "line": 184,
943
- "column": 13
944
- },
945
- "value": "value"
946
- }
947
- ]
948
- },
949
- {
950
- "id": "c7a90b59-d6f2-4067-a3a0-87d706c8dc1d",
951
- "location": {
952
- "line": 185,
953
- "column": 5
954
- },
955
- "cells": [
956
- {
957
- "location": {
958
- "line": 185,
959
- "column": 7
960
- },
961
- "value": "user_choice"
962
- },
963
- {
964
- "location": {
965
- "line": 185,
966
- "column": 21
967
- },
968
- "value": "wrong"
969
- }
970
- ]
971
- }
972
- ]
973
- }
974
- }
975
- ],
976
- "examples": []
977
- }
978
- }
979
- ]
980
- },
981
- "comments": [
982
- {
983
- "location": {
984
- "line": 7,
985
- "column": 1
986
- },
987
- "text": "# TODO: Double or triple up on what we test in one test. These adds a lot of"
988
- },
989
- {
990
- "location": {
991
- "line": 8,
992
- "column": 1
993
- },
994
- "text": "# time to tests (to visit a new interview each time), which is unavoidable"
995
- },
996
- {
997
- "location": {
998
- "line": 9,
999
- "column": 1
1000
- },
1001
- "text": "# with only one constraints Step allowed in each Scenario"
1002
- },
1003
- {
1004
- "location": {
1005
- "line": 10,
1006
- "column": 1
1007
- },
1008
- "text": "# Discuss: Should one Scenario failure fail the whole file? Signs point to yes."
1009
- },
1010
- {
1011
- "location": {
1012
- "line": 12,
1013
- "column": 1
1014
- },
1015
- "text": "# Note: In here we test Scenarios that create extra artifacts in generated"
1016
- },
1017
- {
1018
- "location": {
1019
- "line": 13,
1020
- "column": 1
1021
- },
1022
- "text": "# like warnings. Tests here are also in unit tests."
1023
- },
1024
- {
1025
- "location": {
1026
- "line": 15,
1027
- "column": 1
1028
- },
1029
- "text": "# One normal test"
1030
- },
1031
- {
1032
- "location": {
1033
- "line": 23,
1034
- "column": 1
1035
- },
1036
- "text": "#### Discuss: Do we need different behavior for fully empty row than for empty"
1037
- },
1038
- {
1039
- "location": {
1040
- "line": 24,
1041
- "column": 1
1042
- },
1043
- "text": "#### column option? Hold off on this for now"
1044
- },
1045
- {
1046
- "location": {
1047
- "line": 25,
1048
- "column": 1
1049
- },
1050
- "text": "#### TODO: Both unit and integration tests"
1051
- },
1052
- {
1053
- "location": {
1054
- "line": 26,
1055
- "column": 1
1056
- },
1057
- "text": "###Scenario: random answers table rows are empty"
1058
- },
1059
- {
1060
- "location": {
1061
- "line": 27,
1062
- "column": 1
1063
- },
1064
- "text": "### Given the final Scenario status should be \"failed\""
1065
- },
1066
- {
1067
- "location": {
1068
- "line": 28,
1069
- "column": 1
1070
- },
1071
- "text": "### And the max seconds for each Step is 5 seconds"
1072
- },
1073
- {
1074
- "location": {
1075
- "line": 29,
1076
- "column": 1
1077
- },
1078
- "text": "### And I start the interview at \"test_kickout\""
1079
- },
1080
- {
1081
- "location": {
1082
- "line": 30,
1083
- "column": 1
1084
- },
1085
- "text": "### And I generate 1 random test that get to any of [\"kickout screen\", \"success screen\"] when I use these constraints:"
1086
- },
1087
- {
1088
- "location": {
1089
- "line": 31,
1090
- "column": 1
1091
- },
1092
- "text": "### | var | possible_values |"
1093
- },
1094
- {
1095
- "location": {
1096
- "line": 32,
1097
- "column": 1
1098
- },
1099
- "text": "### | | |"
1100
- },
1101
- {
1102
- "location": {
1103
- "line": 33,
1104
- "column": 1
1105
- },
1106
- "text": "###"
1107
- },
1108
- {
1109
- "location": {
1110
- "line": 34,
1111
- "column": 1
1112
- },
1113
- "text": "#### Discuss: Should empty var columns have warnings/errors? They're valid table"
1114
- },
1115
- {
1116
- "location": {
1117
- "line": 35,
1118
- "column": 1
1119
- },
1120
- "text": "#### rows. If not, are these tests necessary? Hold off on this for now."
1121
- },
1122
- {
1123
- "location": {
1124
- "line": 36,
1125
- "column": 1
1126
- },
1127
- "text": "#### TODO: Both unit and integration tests"
1128
- },
1129
- {
1130
- "location": {
1131
- "line": 37,
1132
- "column": 1
1133
- },
1134
- "text": "###Scenario: random answers table is missing a var name"
1135
- },
1136
- {
1137
- "location": {
1138
- "line": 38,
1139
- "column": 1
1140
- },
1141
- "text": "### Given the final Scenario status should be \"failed\""
1142
- },
1143
- {
1144
- "location": {
1145
- "line": 39,
1146
- "column": 1
1147
- },
1148
- "text": "### And the max seconds for each Step is 5 seconds"
1149
- },
1150
- {
1151
- "location": {
1152
- "line": 40,
1153
- "column": 1
1154
- },
1155
- "text": "### And I start the interview at \"test_kickout\""
1156
- },
1157
- {
1158
- "location": {
1159
- "line": 41,
1160
- "column": 1
1161
- },
1162
- "text": "### And I generate 1 random test that get to any of [\"kickout screen\", \"success screen\"] when I use these constraints:"
1163
- },
1164
- {
1165
- "location": {
1166
- "line": 42,
1167
- "column": 1
1168
- },
1169
- "text": "### | var | possible_values |"
1170
- },
1171
- {
1172
- "location": {
1173
- "line": 43,
1174
- "column": 1
1175
- },
1176
- "text": "### | | correct;; wrong |"
1177
- },
1178
- {
1179
- "location": {
1180
- "line": 46,
1181
- "column": 1
1182
- },
1183
- "text": "# ====================="
1184
- },
1185
- {
1186
- "location": {
1187
- "line": 47,
1188
- "column": 1
1189
- },
1190
- "text": "# Generate debug warnings for users"
1191
- },
1192
- {
1193
- "location": {
1194
- "line": 48,
1195
- "column": 1
1196
- },
1197
- "text": "# Discuss: Should we have author warnings that are only in the debug logs? "
1198
- },
1199
- {
1200
- "location": {
1201
- "line": 49,
1202
- "column": 1
1203
- },
1204
- "text": "# These would be warnings for tests that aren't invalid, but may (or may"
1205
- },
1206
- {
1207
- "location": {
1208
- "line": 50,
1209
- "column": 1
1210
- },
1211
- "text": "# not) have unexpected behavior. Should they have a different icon and"
1212
- },
1213
- {
1214
- "location": {
1215
- "line": 51,
1216
- "column": 1
1217
- },
1218
- "text": "# keyword?"
1219
- },
1220
- {
1221
- "location": {
1222
- "line": 52,
1223
- "column": 1
1224
- },
1225
- "text": "# ====================="
1226
- },
1227
- {
1228
- "location": {
1229
- "line": 61,
1230
- "column": 1
1231
- },
1232
- "text": "#### Discuss: Do we need different behavior for fully empty row than for empty"
1233
- },
1234
- {
1235
- "location": {
1236
- "line": 62,
1237
- "column": 1
1238
- },
1239
- "text": "#### column option? Hold off on this for now"
1240
- },
1241
- {
1242
- "location": {
1243
- "line": 63,
1244
- "column": 1
1245
- },
1246
- "text": "#### TODO: Both unit and integration tests"
1247
- },
1248
- {
1249
- "location": {
1250
- "line": 64,
1251
- "column": 1
1252
- },
1253
- "text": "###Scenario: random answers table rows are empty"
1254
- },
1255
- {
1256
- "location": {
1257
- "line": 65,
1258
- "column": 1
1259
- },
1260
- "text": "### Given the final Scenario status should be \"failed\""
1261
- },
1262
- {
1263
- "location": {
1264
- "line": 66,
1265
- "column": 1
1266
- },
1267
- "text": "### And the max seconds for each Step is 5 seconds"
1268
- },
1269
- {
1270
- "location": {
1271
- "line": 67,
1272
- "column": 1
1273
- },
1274
- "text": "### And I start the interview at \"test_kickout\""
1275
- },
1276
- {
1277
- "location": {
1278
- "line": 68,
1279
- "column": 1
1280
- },
1281
- "text": "### And I generate 1 random test that get to any of [\"kickout screen\", \"success screen\"] when I use these constraints:"
1282
- },
1283
- {
1284
- "location": {
1285
- "line": 69,
1286
- "column": 1
1287
- },
1288
- "text": "### | var | possible_values |"
1289
- },
1290
- {
1291
- "location": {
1292
- "line": 70,
1293
- "column": 1
1294
- },
1295
- "text": "### | | |"
1296
- },
1297
- {
1298
- "location": {
1299
- "line": 71,
1300
- "column": 1
1301
- },
1302
- "text": "###"
1303
- },
1304
- {
1305
- "location": {
1306
- "line": 72,
1307
- "column": 1
1308
- },
1309
- "text": "#### Discuss: Should empty var columns have warnings/errors? They're valid table"
1310
- },
1311
- {
1312
- "location": {
1313
- "line": 73,
1314
- "column": 1
1315
- },
1316
- "text": "#### rows. If not, are these tests necessary? Hold off on this for now."
1317
- },
1318
- {
1319
- "location": {
1320
- "line": 74,
1321
- "column": 1
1322
- },
1323
- "text": "#### TODO: Both unit and integration tests"
1324
- },
1325
- {
1326
- "location": {
1327
- "line": 75,
1328
- "column": 1
1329
- },
1330
- "text": "###Scenario: random answers table is missing a var name"
1331
- },
1332
- {
1333
- "location": {
1334
- "line": 76,
1335
- "column": 1
1336
- },
1337
- "text": "### Given the final Scenario status should be \"failed\""
1338
- },
1339
- {
1340
- "location": {
1341
- "line": 77,
1342
- "column": 1
1343
- },
1344
- "text": "### And the max seconds for each Step is 5 seconds"
1345
- },
1346
- {
1347
- "location": {
1348
- "line": 78,
1349
- "column": 1
1350
- },
1351
- "text": "### And I start the interview at \"test_kickout\""
1352
- },
1353
- {
1354
- "location": {
1355
- "line": 79,
1356
- "column": 1
1357
- },
1358
- "text": "### And I generate 1 random test that get to any of [\"kickout screen\", \"success screen\"] when I use these constraints:"
1359
- },
1360
- {
1361
- "location": {
1362
- "line": 80,
1363
- "column": 1
1364
- },
1365
- "text": "### | var | possible_values |"
1366
- },
1367
- {
1368
- "location": {
1369
- "line": 81,
1370
- "column": 1
1371
- },
1372
- "text": "### | | correct;; wrong |"
1373
- },
1374
- {
1375
- "location": {
1376
- "line": 84,
1377
- "column": 1
1378
- },
1379
- "text": "# ====================="
1380
- },
1381
- {
1382
- "location": {
1383
- "line": 85,
1384
- "column": 1
1385
- },
1386
- "text": "# Generate debug warnings for users"
1387
- },
1388
- {
1389
- "location": {
1390
- "line": 86,
1391
- "column": 1
1392
- },
1393
- "text": "# Discuss: Should we have author warnings that are only in the debug logs? "
1394
- },
1395
- {
1396
- "location": {
1397
- "line": 87,
1398
- "column": 1
1399
- },
1400
- "text": "# These would be warnings for tests that aren't invalid, but may (or may"
1401
- },
1402
- {
1403
- "location": {
1404
- "line": 88,
1405
- "column": 1
1406
- },
1407
- "text": "# not) have unexpected behavior. Should they have a different icon and"
1408
- },
1409
- {
1410
- "location": {
1411
- "line": 89,
1412
- "column": 1
1413
- },
1414
- "text": "# keyword?"
1415
- },
1416
- {
1417
- "location": {
1418
- "line": 90,
1419
- "column": 1
1420
- },
1421
- "text": "# ====================="
1422
- },
1423
- {
1424
- "location": {
1425
- "line": 102,
1426
- "column": 1
1427
- },
1428
- "text": "# ====================="
1429
- },
1430
- {
1431
- "location": {
1432
- "line": 103,
1433
- "column": 1
1434
- },
1435
- "text": "# Generate warnings Steps"
1436
- },
1437
- {
1438
- "location": {
1439
- "line": 104,
1440
- "column": 1
1441
- },
1442
- "text": "# ====================="
1443
- }
1444
- ],
1445
- "uri": "docassemble/ALKilnTests/data/sources/_alkiln_generated/1_1738014801898.feature"
1446
- },
1447
- "pickle": {
1448
- "id": "67df345a-3087-4b4c-bb34-5a57d489af1c",
1449
- "uri": "docassemble/ALKilnTests/data/sources/_alkiln_generated/1_1738014801898.feature",
1450
- "astNodeIds": [
1451
- "5cc1fc52-e396-488d-8089-61d5d1f83458"
1452
- ],
1453
- "tags": [
1454
- {
1455
- "name": "@random_tests",
1456
- "astNodeId": "19ec6778-4be1-4ba1-921b-1c01ff4f4309"
1457
- },
1458
- {
1459
- "name": "@success",
1460
- "astNodeId": "318bf5b4-44ce-4695-a783-2993c566d53b"
1461
- },
1462
- {
1463
- "name": "@alkiln_randomized",
1464
- "astNodeId": "6208c459-2e4e-4dad-a8a2-aa61c9f53952"
1465
- },
1466
- {
1467
- "name": "@generated_warning",
1468
- "astNodeId": "c9f4d190-e93f-4460-92af-cf1348f865f2"
1469
- },
1470
- {
1471
- "name": "@alkiln_randomized_generator3_scenario1_of_1",
1472
- "astNodeId": "2188855b-105b-4f24-815d-e042360b5ceb"
1473
- }
1474
- ],
1475
- "name": "With a missing number I get a warning and 1 generated test ALKiln random test generator3_scenario1_of_1",
1476
- "language": "en",
1477
- "steps": [
1478
- {
1479
- "id": "5cac31d0-fac8-46cd-be30-838a99e92ce9",
1480
- "text": "I start the interview at \"test_kickout\"",
1481
- "type": "Context",
1482
- "astNodeIds": [
1483
- "41b7b781-977f-4561-8c19-cb331ccc50bc"
1484
- ]
1485
- },
1486
- {
1487
- "id": "cb1475c4-d408-4e45-a70a-ee032d15015f",
1488
- "text": "ALKiln warns the author about a generator problem with:",
1489
- "type": "Outcome",
1490
- "argument": {
1491
- "docString": {
1492
- "content": "----- Generator file warning -----\nšŸ”Ž ALK0237 generating files WARNING [2025-01-27 21:53:21UTC]: A constrained random answers Step is missing the number of tests to generate. ALKiln will create 1 test. The Step: \"I generate not a number constrained random tests that get to [\"kickout screen\", \"success screen\"] when I pick from:\"\n-----"
1493
- }
1494
- },
1495
- "astNodeIds": [
1496
- "703ef12e-87a6-4c74-822b-9af5ba532b02"
1497
- ]
1498
- },
1499
- {
1500
- "id": "3ae33f68-4a53-4aa1-97e4-0e4430017300",
1501
- "text": "I get to any of the question ids [\"kickout screen\", \"success screen\"] with this data:",
1502
- "type": "Outcome",
1503
- "argument": {
1504
- "dataTable": {
1505
- "rows": [
1506
- {
1507
- "cells": [
1508
- {
1509
- "value": "var"
1510
- },
1511
- {
1512
- "value": "value"
1513
- }
1514
- ]
1515
- },
1516
- {
1517
- "cells": [
1518
- {
1519
- "value": "user_choice"
1520
- },
1521
- {
1522
- "value": "correct"
1523
- }
1524
- ]
1525
- }
1526
- ]
1527
- }
1528
- },
1529
- "astNodeIds": [
1530
- "bcc0597a-8c01-4700-90f7-965ac23af23f"
1531
- ]
1532
- }
1533
- ]
1534
- },
1535
- "pickleStep": {
1536
- "id": "5cac31d0-fac8-46cd-be30-838a99e92ce9",
1537
- "text": "I start the interview at \"test_kickout\"",
1538
- "type": "Context",
1539
- "astNodeIds": [
1540
- "41b7b781-977f-4561-8c19-cb331ccc50bc"
1541
- ]
1542
- },
1543
- "testCaseStartedId": "36f56ef8-bb94-4bf3-a590-b10198ff970f",
1544
- "testStepId": "7aeb644d-6fc6-473d-a4f8-b61b1e71b07c"
1545
- }
1546
- }