testit-js-commons 5.0.3 → 5.0.4

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/lib/adapters-api/dist/ApiClient.js +6 -5
  2. package/lib/adapters-api/dist/api/AttachmentsApi.js +5 -5
  3. package/lib/adapters-api/dist/api/AutoTestsApi.js +11 -11
  4. package/lib/adapters-api/dist/api/ConfigurationsApi.js +1 -1
  5. package/lib/adapters-api/dist/api/ParametersApi.js +3 -3
  6. package/lib/adapters-api/dist/api/ProjectAttributesApi.js +6 -6
  7. package/lib/adapters-api/dist/api/ProjectSectionsApi.js +1 -1
  8. package/lib/adapters-api/dist/api/ProjectWorkItemsApi.js +1 -1
  9. package/lib/adapters-api/dist/api/ProjectsApi.js +4 -4
  10. package/lib/adapters-api/dist/api/SectionsApi.js +2 -2
  11. package/lib/adapters-api/dist/api/TestResultsApi.js +3 -3
  12. package/lib/adapters-api/dist/api/TestRunsApi.js +8 -8
  13. package/lib/adapters-api/dist/api/WorkItemsApi.js +3 -3
  14. package/lib/adapters-api/dist/api/WorkflowsApi.js +1 -1
  15. package/lib/adapters-api/dist/index.js +3 -3
  16. package/lib/adapters-api/dist/model/AttachmentPutModelAutoTestStepResultsModel.js +1 -1
  17. package/lib/adapters-api/dist/model/AutoTestStepResult.js +1 -1
  18. package/lib/adapters-api/dist/model/AutoTestStepResultUpdateRequest.js +1 -1
  19. package/lib/adapters-api/dist/model/CreateEmptyTestRunApiModel.js +2 -2
  20. package/lib/adapters-api/dist/model/CustomAttributeApiResult.js +2 -2
  21. package/lib/adapters-api/dist/model/{CustomAttributeGetModel.js → CustomAttributeModel.js} +89 -39
  22. package/lib/adapters-api/dist/model/CustomAttributePutModel.js +1 -1
  23. package/lib/adapters-api/dist/model/LabelApiModel.js +4 -15
  24. package/lib/adapters-api/dist/model/TestResultResponse.js +18 -4
  25. package/lib/adapters-api/dist/model/UpdateEmptyTestRunApiModel.js +1 -1
  26. package/lib/adapters-api/index.d.ts +40 -196
  27. package/lib/common/utils/tms-load-test-run-debug.d.ts +2 -0
  28. package/lib/common/utils/tms-load-test-run-debug.js +6 -0
  29. package/lib/services/syncstorage/syncstorage.runner.js +5 -4
  30. package/lib/services/syncstorage/syncstorage.runner.test.js +16 -0
  31. package/lib/services/testruns/testruns.handler.d.ts +2 -2
  32. package/lib/services/testruns/testruns.handler.js +12 -2
  33. package/lib/services/testruns/testruns.service.js +22 -9
  34. package/lib/sync-storage/dist/ApiClient.js +3 -0
  35. package/package.json +1 -1
@@ -69,7 +69,7 @@ declare module 'adapters-api/api/AttachmentsApi' {
69
69
  }): Promise<any>;
70
70
  /**
71
71
  * Upload new attachment file
72
- * File size is restricted to 1 GB (1 073 741 824 bytes)
72
+ * File size is restricted to 50 MB (52 428 800 bytes)
73
73
  * @param {Object} opts Optional parameters
74
74
  * @param {File} [file]
75
75
  * @return {Promise} a {@link https://www.promisejs.org/|Promise}, with an object containing data of type {@link module:model/AttachmentModel} and HTTP response
@@ -77,7 +77,7 @@ declare module 'adapters-api/api/AttachmentsApi' {
77
77
  adaptersAttachmentsPostWithHttpInfo(opts: Object): Promise<any>;
78
78
  /**
79
79
  * Upload new attachment file
80
- * File size is restricted to 1 GB (1 073 741 824 bytes)
80
+ * File size is restricted to 50 MB (52 428 800 bytes)
81
81
  * @param {Object} opts Optional parameters
82
82
  * @param {File} opts.file
83
83
  * @return {Promise} a {@link https://www.promisejs.org/|Promise}, with data of type {@link module:model/AttachmentModel}
@@ -581,7 +581,7 @@ declare module 'adapters-api/api/ProjectAttributesApi' {
581
581
  * @param {String} [searchField] Property name for searching
582
582
  * @param {String} [searchValue] Value for searching
583
583
  * @param {module:model/ProjectAttributesFilterModel} [projectAttributesFilterModel]
584
- * @return {Promise} a {@link https://www.promisejs.org/|Promise}, with an object containing data of type {@link Array.<module:model/CustomAttributeGetModel>} and HTTP response
584
+ * @return {Promise} a {@link https://www.promisejs.org/|Promise}, with an object containing data of type {@link Array.<module:model/CustomAttributeModel>} and HTTP response
585
585
  */
586
586
  adaptersProjectsProjectIdAttributesSearchPostWithHttpInfo(projectId: string, opts: Object): Promise<any>;
587
587
  /**
@@ -594,7 +594,7 @@ declare module 'adapters-api/api/ProjectAttributesApi' {
594
594
  * @param {String} opts.searchField Property name for searching
595
595
  * @param {String} opts.searchValue Value for searching
596
596
  * @param {module:model/ProjectAttributesFilterModel} opts.projectAttributesFilterModel
597
- * @return {Promise} a {@link https://www.promisejs.org/|Promise}, with data of type {@link Array.<module:model/CustomAttributeGetModel>}
597
+ * @return {Promise} a {@link https://www.promisejs.org/|Promise}, with data of type {@link Array.<module:model/CustomAttributeModel>}
598
598
  */
599
599
  adaptersProjectsProjectIdAttributesSearchPost(projectId: string, opts: {
600
600
  skip: number;
@@ -1552,7 +1552,7 @@ declare module 'adapters-api/index' {
1552
1552
  import CreateStepApiModel from 'adapters-api/model/CreateStepApiModel';
1553
1553
  import CreateWorkItemApiModel from 'adapters-api/model/CreateWorkItemApiModel';
1554
1554
  import CustomAttributeApiResult from 'adapters-api/model/CustomAttributeApiResult';
1555
- import CustomAttributeGetModel from 'adapters-api/model/CustomAttributeGetModel';
1555
+ import CustomAttributeModel from 'adapters-api/model/CustomAttributeModel';
1556
1556
  import CustomAttributeOptionApiResult from 'adapters-api/model/CustomAttributeOptionApiResult';
1557
1557
  import CustomAttributeOptionModel from 'adapters-api/model/CustomAttributeOptionModel';
1558
1558
  import CustomAttributePutModel from 'adapters-api/model/CustomAttributePutModel';
@@ -1876,10 +1876,10 @@ declare module 'adapters-api/index' {
1876
1876
  */
1877
1877
  CustomAttributeApiResult,
1878
1878
  /**
1879
- * The CustomAttributeGetModel model constructor.
1880
- * @property {module:model/CustomAttributeGetModel}
1879
+ * The CustomAttributeModel model constructor.
1880
+ * @property {module:model/CustomAttributeModel}
1881
1881
  */
1882
- CustomAttributeGetModel,
1882
+ CustomAttributeModel,
1883
1883
  /**
1884
1884
  * The CustomAttributeOptionApiResult model constructor.
1885
1885
  * @property {module:model/CustomAttributeOptionApiResult}
@@ -2543,11 +2543,6 @@ declare module 'adapters-api/model/AttachmentApiResult' {
2543
2543
  * @param name {String} Name of the attachment file
2544
2544
  */
2545
2545
  constructor(id: string, fileId: string, type: string, size: number, name: string);
2546
- id: string;
2547
- fileId?: string;
2548
- type?: string;
2549
- size?: number;
2550
- name?: string;
2551
2546
  /**
2552
2547
  * Initializes the fields of this object.
2553
2548
  * This method is used by the constructors of any subclasses, in order to implement multiple inheritance (mix-ins).
@@ -2658,7 +2653,6 @@ declare module 'adapters-api/model/AttachmentPutModel' {
2658
2653
  * @param id {String} Unique ID of the attachment
2659
2654
  */
2660
2655
  constructor(id: string);
2661
- id: string;
2662
2656
  /**
2663
2657
  * Initializes the fields of this object.
2664
2658
  * This method is used by the constructors of any subclasses, in order to implement multiple inheritance (mix-ins).
@@ -2710,16 +2704,6 @@ declare module 'adapters-api/model/AttachmentPutModelAutoTestStepResultsModel' {
2710
2704
  * @alias module:model/AttachmentPutModelAutoTestStepResultsModel
2711
2705
  */
2712
2706
  constructor();
2713
- title?: string;
2714
- description?: string | null;
2715
- info?: string | null;
2716
- startedOn?: Date;
2717
- completedOn?: Date;
2718
- duration?: number;
2719
- outcome?: string;
2720
- stepResults?: AttachmentPutModelAutoTestStepResultsModel[];
2721
- attachments?: Array<{ id: string }>;
2722
- parameters?: { [key: string]: string };
2723
2707
  /**
2724
2708
  * Initializes the fields of this object.
2725
2709
  * This method is used by the constructors of any subclasses, in order to implement multiple inheritance (mix-ins).
@@ -2881,23 +2865,6 @@ declare module 'adapters-api/model/AutoTestApiResult' {
2881
2865
  * @param globalId {Number}
2882
2866
  */
2883
2867
  constructor(id: string, projectId: string, name: string, isFlaky: boolean, globalId: number);
2884
- id: string;
2885
- projectId?: string;
2886
- externalId?: string | null;
2887
- name?: string | null;
2888
- namespace?: string | null;
2889
- classname?: string | null;
2890
- steps?: any[];
2891
- setup?: any[];
2892
- teardown?: any[];
2893
- title?: string | null;
2894
- description?: string | null;
2895
- isFlaky?: boolean;
2896
- externalKey?: string | null;
2897
- globalId?: number;
2898
- links?: any[];
2899
- labels?: any[];
2900
- tags?: string[];
2901
2868
  /**
2902
2869
  * Initializes the fields of this object.
2903
2870
  * This method is used by the constructors of any subclasses, in order to implement multiple inheritance (mix-ins).
@@ -3004,22 +2971,6 @@ declare module 'adapters-api/model/AutoTestCreateApiModel' {
3004
2971
  * @param name {String} Name of the autotest
3005
2972
  */
3006
2973
  constructor(projectId: string, externalId: string, name: string);
3007
- projectId: string;
3008
- externalId: string;
3009
- externalKey?: string;
3010
- name: string;
3011
- namespace?: string;
3012
- classname?: string;
3013
- title?: string;
3014
- description?: string;
3015
- isFlaky?: boolean;
3016
- steps?: unknown;
3017
- setup?: unknown;
3018
- teardown?: unknown;
3019
- shouldCreateWorkItem?: boolean;
3020
- labels?: unknown;
3021
- links?: any[];
3022
- tags?: unknown;
3023
2974
  /**
3024
2975
  * Initializes the fields of this object.
3025
2976
  * This method is used by the constructors of any subclasses, in order to implement multiple inheritance (mix-ins).
@@ -3071,17 +3022,6 @@ declare module 'adapters-api/model/AutoTestFilterApiModel' {
3071
3022
  * @alias module:model/AutoTestFilterApiModel
3072
3023
  */
3073
3024
  constructor();
3074
- projectIds?: string[];
3075
- externalIds?: string[];
3076
- globalIds?: number[];
3077
- name?: string;
3078
- isFlaky?: boolean;
3079
- isDeleted?: boolean;
3080
- namespace?: string;
3081
- className?: string;
3082
- externalKey?: string;
3083
- tags?: string[];
3084
- excludeTags?: string[];
3085
3025
  /**
3086
3026
  * Initializes the fields of this object.
3087
3027
  * This method is used by the constructors of any subclasses, in order to implement multiple inheritance (mix-ins).
@@ -3297,24 +3237,6 @@ declare module 'adapters-api/model/AutoTestResultsForTestRunModel' {
3297
3237
  * @param autoTestExternalId {String} Specifies the external ID of the autotest, which was specified when the test run was created.
3298
3238
  */
3299
3239
  constructor(configurationId: string, autoTestExternalId: string);
3300
- configurationId: string;
3301
- autoTestExternalId: string;
3302
- links?: any[];
3303
- failureReasonNames?: unknown;
3304
- outcome?: unknown;
3305
- statusCode?: string | null;
3306
- statusType?: string | null;
3307
- message?: string | null;
3308
- traces?: string | null;
3309
- startedOn?: Date;
3310
- completedOn?: Date;
3311
- duration?: number;
3312
- attachments?: Array<{ id: string }>;
3313
- parameters?: { [key: string]: string };
3314
- properties?: { [key: string]: string };
3315
- stepResults?: any[];
3316
- setupResults?: any[];
3317
- teardownResults?: any[];
3318
3240
  /**
3319
3241
  * Initializes the fields of this object.
3320
3242
  * This method is used by the constructors of any subclasses, in order to implement multiple inheritance (mix-ins).
@@ -3366,8 +3288,6 @@ declare module 'adapters-api/model/AutoTestSearchApiModel' {
3366
3288
  * @alias module:model/AutoTestSearchApiModel
3367
3289
  */
3368
3290
  constructor();
3369
- filter?: any;
3370
- includes?: any;
3371
3291
  /**
3372
3292
  * Initializes the fields of this object.
3373
3293
  * This method is used by the constructors of any subclasses, in order to implement multiple inheritance (mix-ins).
@@ -3416,9 +3336,6 @@ declare module 'adapters-api/model/AutoTestSearchIncludeApiModel' {
3416
3336
  * @alias module:model/AutoTestSearchIncludeApiModel
3417
3337
  */
3418
3338
  constructor();
3419
- includeSteps?: boolean;
3420
- includeLinks?: boolean;
3421
- includeLabels?: boolean;
3422
3339
  /**
3423
3340
  * Initializes the fields of this object.
3424
3341
  * This method is used by the constructors of any subclasses, in order to implement multiple inheritance (mix-ins).
@@ -3624,9 +3541,6 @@ declare module 'adapters-api/model/AutoTestStepModel' {
3624
3541
  * @param title {String} Step name.
3625
3542
  */
3626
3543
  constructor(title: string);
3627
- title: string;
3628
- description?: string | null;
3629
- steps?: AutoTestStepModel[];
3630
3544
  /**
3631
3545
  * Initializes the fields of this object.
3632
3546
  * This method is used by the constructors of any subclasses, in order to implement multiple inheritance (mix-ins).
@@ -4091,7 +4005,7 @@ declare module 'adapters-api/model/CreateEmptyTestRunApiModel' {
4091
4005
  /**
4092
4006
  * Constructs a new <code>CreateEmptyTestRunApiModel</code>.
4093
4007
  * @alias module:model/CreateEmptyTestRunApiModel
4094
- * @param projectId {String} Project unique identifier This property is to link test run with a project
4008
+ * @param projectId {String} Project unique identifier This property is to link test run with a project
4095
4009
  */
4096
4010
  constructor(projectId: string);
4097
4011
  /**
@@ -4407,7 +4321,7 @@ declare module 'adapters-api/model/CustomAttributeApiResult' {
4407
4321
  * Constructs a new <code>CustomAttributeApiResult</code>.
4408
4322
  * @alias module:model/CustomAttributeApiResult
4409
4323
  * @param id {String} Unique ID of the attribute
4410
- * @param options {Array.<module:model/CustomAttributeOptionApiResult>} Collection of the attribute options Available for attributes of type `options` and `multiple options` only
4324
+ * @param options {Array.<module:model/CustomAttributeOptionApiResult>} Collection of the attribute options Available for attributes of type `options` and `multiple options` only
4411
4325
  * @param type {module:model/CustomAttributeType} Type of the attribute
4412
4326
  * @param isDeleted {Boolean} Indicates if the attribute is deleted
4413
4327
  * @param name {String} Name of the attribute
@@ -4443,7 +4357,7 @@ declare module 'adapters-api/model/CustomAttributeApiResult' {
4443
4357
  export default CustomAttributeApiResult;
4444
4358
 
4445
4359
  }
4446
- declare module 'adapters-api/model/CustomAttributeGetModel' {
4360
+ declare module 'adapters-api/model/CustomAttributeModel' {
4447
4361
  /**
4448
4362
  * API
4449
4363
  * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator)
@@ -4457,49 +4371,52 @@ declare module 'adapters-api/model/CustomAttributeGetModel' {
4457
4371
  *
4458
4372
  */
4459
4373
  /**
4460
- * The CustomAttributeGetModel model module.
4461
- * @module model/CustomAttributeGetModel
4374
+ * The CustomAttributeModel model module.
4375
+ * @module model/CustomAttributeModel
4462
4376
  * @version 1.0.0
4463
4377
  */
4464
- class CustomAttributeGetModel {
4465
- /**
4466
- * Constructs a new <code>CustomAttributeGetModel</code>.
4467
- * @alias module:model/CustomAttributeGetModel
4468
- * @param id {String} Unique ID of the attribute
4469
- * @param options {Array.<module:model/CustomAttributeOptionModel>} Collection of the attribute options
4470
- * @param type {module:model/CustomAttributeTypesEnum} Type of the attribute
4471
- * @param isDeleted {Boolean} Indicates if the attribute is deleted
4378
+ class CustomAttributeModel {
4379
+ /**
4380
+ * Constructs a new <code>CustomAttributeModel</code>.
4381
+ * @alias module:model/CustomAttributeModel
4382
+ * @param id {String} Unique ID of the attribute.
4383
+ * @param type {module:model/CustomAttributeTypesEnum} Type of the attribute.
4384
+ * @param options {Array.<module:model/CustomAttributeOptionModel>} Collection of the attribute options.
4385
+ * @param targets {Array.<String>} Collection of the attribute targets. Defines where the attribute can be used (e.g., TestCases, AutoTestCases, TestPlans).
4386
+ * @param isReadOnly {Boolean} Indicates if the attribute is read-only.
4387
+ * @param isDeleted {Boolean} Indicates if the attribute is deleted.
4388
+ * @param isSystem {Boolean} Indicates if the attribute is system.
4472
4389
  * @param name {String} Name of the attribute
4473
4390
  * @param isEnabled {Boolean} Indicates if the attribute is enabled
4474
- * @param isRequired {Boolean} Indicates if the attribute is mandatory to specify
4391
+ * @param isRequired {Boolean} Indicates if the attribute value is mandatory to specify
4475
4392
  * @param isGlobal {Boolean} Indicates if the attribute is available across all projects
4476
4393
  */
4477
- constructor(id: string, options: Array<any>, type: module, isDeleted: boolean, name: string, isEnabled: boolean, isRequired: boolean, isGlobal: boolean);
4394
+ constructor(id: string, type: module, options: Array<any>, targets: Array<string>, isReadOnly: boolean, isDeleted: boolean, isSystem: boolean, name: string, isEnabled: boolean, isRequired: boolean, isGlobal: boolean);
4478
4395
  /**
4479
4396
  * Initializes the fields of this object.
4480
4397
  * This method is used by the constructors of any subclasses, in order to implement multiple inheritance (mix-ins).
4481
4398
  * Only for internal use.
4482
4399
  */
4483
- static initialize(obj: any, id: any, options: any, type: any, isDeleted: any, name: any, isEnabled: any, isRequired: any, isGlobal: any): void;
4400
+ static initialize(obj: any, id: any, type: any, options: any, targets: any, isReadOnly: any, isDeleted: any, isSystem: any, name: any, isEnabled: any, isRequired: any, isGlobal: any): void;
4484
4401
  /**
4485
- * Constructs a <code>CustomAttributeGetModel</code> from a plain JavaScript object, optionally creating a new instance.
4402
+ * Constructs a <code>CustomAttributeModel</code> from a plain JavaScript object, optionally creating a new instance.
4486
4403
  * Copies all relevant properties from <code>data</code> to <code>obj</code> if supplied or a new instance if not.
4487
4404
  * @param {Object} data The plain JavaScript object bearing properties of interest.
4488
- * @param {module:model/CustomAttributeGetModel} obj Optional instance to populate.
4489
- * @return {module:model/CustomAttributeGetModel} The populated <code>CustomAttributeGetModel</code> instance.
4405
+ * @param {module:model/CustomAttributeModel} obj Optional instance to populate.
4406
+ * @return {module:model/CustomAttributeModel} The populated <code>CustomAttributeModel</code> instance.
4490
4407
  */
4491
4408
  static constructFromObject(data: Object, obj: module): module;
4492
4409
  /**
4493
- * Validates the JSON data with respect to <code>CustomAttributeGetModel</code>.
4410
+ * Validates the JSON data with respect to <code>CustomAttributeModel</code>.
4494
4411
  * @param {Object} data The plain JavaScript object bearing properties of interest.
4495
- * @return {boolean} to indicate whether the JSON data is valid with respect to <code>CustomAttributeGetModel</code>.
4412
+ * @return {boolean} to indicate whether the JSON data is valid with respect to <code>CustomAttributeModel</code>.
4496
4413
  */
4497
4414
  static validateJSON(data: Object): boolean;
4498
4415
  }
4499
- namespace CustomAttributeGetModel {
4416
+ namespace CustomAttributeModel {
4500
4417
  var RequiredProperties: string[];
4501
4418
  }
4502
- export default CustomAttributeGetModel;
4419
+ export default CustomAttributeModel;
4503
4420
 
4504
4421
  }
4505
4422
  declare module 'adapters-api/model/CustomAttributeOptionApiResult' {
@@ -5295,15 +5212,14 @@ declare module 'adapters-api/model/LabelApiModel' {
5295
5212
  * Constructs a new <code>LabelApiModel</code>.
5296
5213
  * @alias module:model/LabelApiModel
5297
5214
  * @param name {String} Name of the label
5298
- * @param globalId {Number} Global ID of the label
5299
5215
  */
5300
- constructor(name: string, globalId: number);
5216
+ constructor(name: string);
5301
5217
  /**
5302
5218
  * Initializes the fields of this object.
5303
5219
  * This method is used by the constructors of any subclasses, in order to implement multiple inheritance (mix-ins).
5304
5220
  * Only for internal use.
5305
5221
  */
5306
- static initialize(obj: any, name: any, globalId: any): void;
5222
+ static initialize(obj: any, name: any): void;
5307
5223
  /**
5308
5224
  * Constructs a <code>LabelApiModel</code> from a plain JavaScript object, optionally creating a new instance.
5309
5225
  * Copies all relevant properties from <code>data</code> to <code>obj</code> if supplied or a new instance if not.
@@ -5351,8 +5267,6 @@ declare module 'adapters-api/model/LabelApiResult' {
5351
5267
  * @param globalId {Number} Global ID of the label
5352
5268
  */
5353
5269
  constructor(name: string, globalId: number);
5354
- name: string;
5355
- globalId?: number;
5356
5270
  /**
5357
5271
  * Initializes the fields of this object.
5358
5272
  * This method is used by the constructors of any subclasses, in order to implement multiple inheritance (mix-ins).
@@ -5459,12 +5373,6 @@ declare module 'adapters-api/model/LinkApiResult' {
5459
5373
  * @param type {module:model/LinkType} Specifies the type of the link.
5460
5374
  */
5461
5375
  constructor(url: string, type: module);
5462
- id?: string | null;
5463
- title?: string | null;
5464
- url: string;
5465
- description?: string | null;
5466
- type?: string | null;
5467
- hasInfo?: boolean;
5468
5376
  /**
5469
5377
  * Initializes the fields of this object.
5470
5378
  * This method is used by the constructors of any subclasses, in order to implement multiple inheritance (mix-ins).
@@ -5626,11 +5534,6 @@ declare module 'adapters-api/model/LinkPostModel' {
5626
5534
  * @param hasInfo {Boolean}
5627
5535
  */
5628
5536
  constructor(url: string, type: module, hasInfo: boolean);
5629
- title?: string | null;
5630
- url: string;
5631
- description?: string | null;
5632
- type?: string | null;
5633
- hasInfo?: boolean;
5634
5537
  /**
5635
5538
  * Initializes the fields of this object.
5636
5539
  * This method is used by the constructors of any subclasses, in order to implement multiple inheritance (mix-ins).
@@ -5685,12 +5588,6 @@ declare module 'adapters-api/model/LinkPutModel' {
5685
5588
  * @param hasInfo {Boolean}
5686
5589
  */
5687
5590
  constructor(url: string, type: module, hasInfo: boolean);
5688
- id?: string | null;
5689
- title?: string | null;
5690
- url: string;
5691
- description?: string | null;
5692
- type?: string | null;
5693
- hasInfo?: boolean;
5694
5591
  /**
5695
5592
  * Initializes the fields of this object.
5696
5593
  * This method is used by the constructors of any subclasses, in order to implement multiple inheritance (mix-ins).
@@ -7259,15 +7156,16 @@ declare module 'adapters-api/model/TestResultResponse' {
7259
7156
  * @param id {String}
7260
7157
  * @param failureClassIds {Array.<String>}
7261
7158
  * @param configurationId {String}
7159
+ * @param testPointId {String}
7262
7160
  * @param testRunId {String}
7263
7161
  */
7264
- constructor(id: string, failureClassIds: Array<string>, configurationId: string, testRunId: string);
7162
+ constructor(id: string, failureClassIds: Array<string>, configurationId: string, testPointId: string, testRunId: string);
7265
7163
  /**
7266
7164
  * Initializes the fields of this object.
7267
7165
  * This method is used by the constructors of any subclasses, in order to implement multiple inheritance (mix-ins).
7268
7166
  * Only for internal use.
7269
7167
  */
7270
- static initialize(obj: any, id: any, failureClassIds: any, configurationId: any, testRunId: any): void;
7168
+ static initialize(obj: any, id: any, failureClassIds: any, configurationId: any, testPointId: any, testRunId: any): void;
7271
7169
  /**
7272
7170
  * Constructs a <code>TestResultResponse</code> from a plain JavaScript object, optionally creating a new instance.
7273
7171
  * Copies all relevant properties from <code>data</code> to <code>obj</code> if supplied or a new instance if not.
@@ -7313,18 +7211,6 @@ declare module 'adapters-api/model/TestResultsFilterApiModel' {
7313
7211
  * @alias module:model/TestResultsFilterApiModel
7314
7212
  */
7315
7213
  constructor();
7316
- configurationIds?: string[];
7317
- outcomes?: unknown;
7318
- statusCodes?: string[];
7319
- statusTypes?: string[];
7320
- namespace?: string;
7321
- className?: string;
7322
- autoTestGlobalIds?: number[];
7323
- autoTestTags?: string[];
7324
- excludeAutoTestTags?: string[];
7325
- name?: string;
7326
- duration?: unknown;
7327
- testRunIds?: string[];
7328
7214
  /**
7329
7215
  * Initializes the fields of this object.
7330
7216
  * This method is used by the constructors of any subclasses, in order to implement multiple inheritance (mix-ins).
@@ -7384,22 +7270,6 @@ declare module 'adapters-api/model/TestResultShortResponse' {
7384
7270
  * @param rerunCompletedCount {Number} Run count
7385
7271
  */
7386
7272
  constructor(id: string, name: string, autoTestTags: Array<string>, testRunId: string, configurationId: string, configurationName: string, status: module, resultReasons: Array<any>, links: Array<any>, attachments: Array<any>, rerunCompletedCount: number);
7387
- id?: string;
7388
- name?: string;
7389
- autotestExternalId?: string;
7390
- autoTestTags?: string[];
7391
- testRunId?: string;
7392
- configurationId?: string;
7393
- configurationName?: string;
7394
- outcome?: unknown;
7395
- status?: unknown;
7396
- resultReasons?: unknown;
7397
- comment?: string | null;
7398
- duration?: number;
7399
- links?: unknown;
7400
- attachments?: unknown;
7401
- rerunCompletedCount?: number;
7402
- autoTest?: { externalId?: string | null };
7403
7273
  /**
7404
7274
  * Initializes the fields of this object.
7405
7275
  * This method is used by the constructors of any subclasses, in order to implement multiple inheritance (mix-ins).
@@ -7506,21 +7376,6 @@ declare module 'adapters-api/model/TestResultUpdateRequest' {
7506
7376
  * @alias module:model/TestResultUpdateRequest
7507
7377
  */
7508
7378
  constructor();
7509
- failureClassIds?: string[];
7510
- outcome?: string;
7511
- statusCode?: string | null;
7512
- statusType?: string | null;
7513
- comment?: string | null;
7514
- links?: any[];
7515
- stepResults?: any[];
7516
- attachments?: Array<{ id: string }>;
7517
- durationInMs?: number;
7518
- duration?: number;
7519
- stepComments?: unknown;
7520
- setupResults?: any[];
7521
- teardownResults?: any[];
7522
- message?: string | null;
7523
- trace?: string | null;
7524
7379
  /**
7525
7380
  * Initializes the fields of this object.
7526
7381
  * This method is used by the constructors of any subclasses, in order to implement multiple inheritance (mix-ins).
@@ -7576,17 +7431,6 @@ declare module 'adapters-api/model/TestRunApiResult' {
7576
7431
  * @param tags {Array.<String>} Collection of tags associated with the test run
7577
7432
  */
7578
7433
  constructor(id: string, name: string, stateName: module, status: module, attachments: Array<any>, links: Array<any>, tags: Array<string>);
7579
- id: string;
7580
- name: string;
7581
- stateName: string;
7582
- status?: unknown;
7583
- attachments?: any[];
7584
- links?: any[];
7585
- tags?: string[];
7586
- startedOn?: Date;
7587
- completedOn?: Date;
7588
- description?: string | null;
7589
- launchSource?: string | null;
7590
7434
  /**
7591
7435
  * Initializes the fields of this object.
7592
7436
  * This method is used by the constructors of any subclasses, in order to implement multiple inheritance (mix-ins).
@@ -8859,4 +8703,4 @@ declare module 'adapters-api/model/WorkItemTypeModel' {
8859
8703
  declare module 'adapters-api' {
8860
8704
  import main = require('adapters-api/index');
8861
8705
  export = main;
8862
- }
8706
+ }
@@ -1,2 +1,4 @@
1
1
  export declare function isTmsLoadTestRunDebug(): boolean;
2
+ /** Trace sync-storage adapter calls only when `TMS_DEBUG_SYNC_STORAGE=1` (not plain LOG_LEVEL=debug). */
3
+ export declare function isSyncStorageDebug(): boolean;
2
4
  export declare function logTmsLoadTestRun(message: string, data?: Record<string, unknown>): void;
@@ -4,6 +4,7 @@ var __importDefault = (this && this.__importDefault) || function (mod) {
4
4
  };
5
5
  Object.defineProperty(exports, "__esModule", { value: true });
6
6
  exports.isTmsLoadTestRunDebug = isTmsLoadTestRunDebug;
7
+ exports.isSyncStorageDebug = isSyncStorageDebug;
7
8
  exports.logTmsLoadTestRun = logTmsLoadTestRun;
8
9
  /** Trace loadTestRun / result POST with `LOG_LEVEL=debug` or `TMS_DEBUG_LOAD_TEST_RUN=1`. */
9
10
  const logger_1 = __importDefault(require("../../logger"));
@@ -14,6 +15,11 @@ function isTmsLoadTestRunDebug() {
14
15
  const v = process.env.TMS_DEBUG_LOAD_TEST_RUN;
15
16
  return v === "1" || (v === null || v === void 0 ? void 0 : v.toLowerCase()) === "true";
16
17
  }
18
+ /** Trace sync-storage adapter calls only when `TMS_DEBUG_SYNC_STORAGE=1` (not plain LOG_LEVEL=debug). */
19
+ function isSyncStorageDebug() {
20
+ const v = process.env.TMS_DEBUG_SYNC_STORAGE;
21
+ return v === "1" || (v === null || v === void 0 ? void 0 : v.toLowerCase()) === "true";
22
+ }
17
23
  function logTmsLoadTestRun(message, data) {
18
24
  if (!isTmsLoadTestRunDebug()) {
19
25
  return;
@@ -111,7 +111,7 @@ class SyncStorageRunner {
111
111
  sendInProgressTestResult(model) {
112
112
  return __awaiter(this, void 0, void 0, function* () {
113
113
  if (!this.running || !this.isMaster || this.alreadyInProgress || this.inProgressPublishing) {
114
- if ((0, utils_1.isTmsLoadTestRunDebug)()) {
114
+ if ((0, utils_1.isSyncStorageDebug)()) {
115
115
  logger_1.default.debug("[syncstorage] skip in-progress cut publish", {
116
116
  reason: {
117
117
  notRunning: !this.running,
@@ -126,7 +126,7 @@ class SyncStorageRunner {
126
126
  }
127
127
  if (!model.projectId || !model.autoTestExternalId || !model.statusCode || !model.statusType) {
128
128
  logger_1.default.warn("Sync storage in-progress payload is incomplete; skipping publish.");
129
- if ((0, utils_1.isTmsLoadTestRunDebug)()) {
129
+ if ((0, utils_1.isSyncStorageDebug)()) {
130
130
  logger_1.default.debug("[syncstorage] incomplete in-progress cut payload", {
131
131
  hasProjectId: Boolean(model.projectId),
132
132
  hasAutoTestExternalId: Boolean(model.autoTestExternalId),
@@ -147,7 +147,7 @@ class SyncStorageRunner {
147
147
  });
148
148
  yield this.withRetry(() => __awaiter(this, void 0, void 0, function* () { return this.testResultsApi.inProgressTestResultPost(this.testRunId, request); }), SyncStorageRunner.RETRY_COUNT);
149
149
  this.alreadyInProgress = true;
150
- if ((0, utils_1.isTmsLoadTestRunDebug)()) {
150
+ if ((0, utils_1.isSyncStorageDebug)()) {
151
151
  logger_1.default.debug("[syncstorage] alreadyInProgress set", {
152
152
  workerPid: this.workerPid,
153
153
  autoTestExternalId: model.autoTestExternalId,
@@ -161,7 +161,7 @@ class SyncStorageRunner {
161
161
  }
162
162
  catch (error) {
163
163
  logger_1.default.warn(`Sync storage in-progress publish failed: ${error}`);
164
- if ((0, utils_1.isTmsLoadTestRunDebug)()) {
164
+ if ((0, utils_1.isSyncStorageDebug)()) {
165
165
  logger_1.default.debug("[syncstorage] in-progress cut publish failed", {
166
166
  workerPid: this.workerPid,
167
167
  autoTestExternalId: model.autoTestExternalId,
@@ -233,6 +233,7 @@ class SyncStorageRunner {
233
233
  "--baseURL", this.baseUrl,
234
234
  "--privateToken", this.config.privateToken,
235
235
  ];
236
+ // Do not inherit stdout/stderr: sync-storage binary logs stay silent unless TMS_DEBUG_SYNC_STORAGE=1 adapter traces.
236
237
  this.syncStorageProcess = (0, child_process_1.spawn)(executablePath, command, {
237
238
  cwd: (0, path_1.join)(process.cwd(), "build", ".caches"),
238
239
  stdio: "ignore",
@@ -10,6 +10,9 @@ var __awaiter = (this && this.__awaiter) || function (thisArg, _arguments, P, ge
10
10
  };
11
11
  Object.defineProperty(exports, "__esModule", { value: true });
12
12
  const syncstorage_runner_1 = require("./syncstorage.runner");
13
+ const child_process_1 = require("child_process");
14
+ jest.mock("child_process", () => (Object.assign(Object.assign({}, jest.requireActual("child_process")), { spawn: jest.fn(() => ({})) })));
15
+ const spawnMock = child_process_1.spawn;
13
16
  function makeConfig() {
14
17
  return {
15
18
  url: "http://localhost:8080",
@@ -22,6 +25,19 @@ function makeConfig() {
22
25
  };
23
26
  }
24
27
  describe("SyncStorageRunner", () => {
28
+ beforeEach(() => {
29
+ spawnMock.mockClear();
30
+ delete process.env.TMS_DEBUG_SYNC_STORAGE;
31
+ });
32
+ it("should spawn local process with stdio ignored", () => __awaiter(void 0, void 0, void 0, function* () {
33
+ const runner = new syncstorage_runner_1.SyncStorageRunner("run-1", makeConfig());
34
+ const internal = runner;
35
+ internal.prepareExecutable = jest.fn().mockResolvedValue("/bin/syncstorage");
36
+ internal.waitForStartup = jest.fn().mockResolvedValue(true);
37
+ internal.delay = jest.fn().mockResolvedValue(undefined);
38
+ yield internal.startLocalProcess();
39
+ expect(spawnMock).toHaveBeenCalledWith("/bin/syncstorage", expect.arrayContaining(["--testRunId", "run-1"]), expect.objectContaining({ stdio: "ignore" }));
40
+ }));
25
41
  it("should mark runner as active and resolve master status after start", () => __awaiter(void 0, void 0, void 0, function* () {
26
42
  const runner = new syncstorage_runner_1.SyncStorageRunner("run-1", makeConfig());
27
43
  const internal = runner;
@@ -1,4 +1,4 @@
1
1
  export declare class TestRunErrorHandler {
2
- static handleErrorStartTestRun(err: any, message?: string): void;
3
- static handleErrorCompletedTestRun(err: any, message?: string): void;
2
+ static handleErrorStartTestRun(err: unknown, message?: string): void;
3
+ static handleErrorCompletedTestRun(err: unknown, message?: string): void;
4
4
  }
@@ -4,13 +4,23 @@ var __importDefault = (this && this.__importDefault) || function (mod) {
4
4
  };
5
5
  Object.defineProperty(exports, "__esModule", { value: true });
6
6
  exports.TestRunErrorHandler = void 0;
7
+ const utils_1 = require("../../common/utils");
7
8
  const logger_1 = __importDefault(require("../../logger"));
9
+ function logTestRunHttpError(action, err, message = "") {
10
+ var _a;
11
+ const e = (0, utils_1.unwrapHttpError)(err);
12
+ const status = e ? (0, utils_1.getHttpStatus)(e) : undefined;
13
+ const code = e ? (0, utils_1.getNetworkErrorCode)(e) : undefined;
14
+ const body = (_a = err === null || err === void 0 ? void 0 : err.body) !== null && _a !== void 0 ? _a : e === null || e === void 0 ? void 0 : e.body;
15
+ const detail = message || (err instanceof Error ? err.message : String(err));
16
+ logger_1.default.error(`Failed ${action}. Message: ${detail}. status=${status !== null && status !== void 0 ? status : "n/a"} code=${code !== null && code !== void 0 ? code : "n/a"}`, body !== null && body !== void 0 ? body : err);
17
+ }
8
18
  class TestRunErrorHandler {
9
19
  static handleErrorStartTestRun(err, message = "") {
10
- logger_1.default.error(`HttpError ${err.statusCode}. Failed start test run in system. Message: ${message}. Error body:\n`, err.body);
20
+ logTestRunHttpError("start test run in system", err, message);
11
21
  }
12
22
  static handleErrorCompletedTestRun(err, message = "") {
13
- logger_1.default.error(`HttpError ${err.statusCode}. Failed completed test run in system. Message: ${message}. Error body:\n`, err.body);
23
+ logTestRunHttpError("complete test run in system", err, message);
14
24
  }
15
25
  }
16
26
  exports.TestRunErrorHandler = TestRunErrorHandler;
@@ -71,15 +71,12 @@ class TestRunsService extends common_1.BaseService {
71
71
  }
72
72
  getTestRun(testRunId) {
73
73
  return __awaiter(this, void 0, void 0, function* () {
74
- return yield this._client
75
- .adaptersTestRunsIdGet(testRunId)
74
+ return yield (0, utils_1.withHttpRetry)(() => __awaiter(this, void 0, void 0, function* () {
75
+ const response = yield this._client.adaptersTestRunsIdGet(testRunId);
76
76
  // @ts-ignore
77
- .then((response) => {
78
77
  const data = (response === null || response === void 0 ? void 0 : response.body) || response;
79
- return data;
80
- })
81
- // @ts-ignore
82
- .then((run) => this._converter.toLocalTestRun(run));
78
+ return this._converter.toLocalTestRun(data);
79
+ }), { label: `getTestRun:${testRunId}` });
83
80
  });
84
81
  }
85
82
  updateTestRun(testRun) {
@@ -121,8 +118,24 @@ class TestRunsService extends common_1.BaseService {
121
118
  return __awaiter(this, void 0, void 0, function* () {
122
119
  try {
123
120
  const testRun = yield this.getTestRun(testRunId);
124
- if (testRun.stateName === "NotStarted") {
125
- yield this._client.adaptersTestRunsIdStartPost(testRunId);
121
+ if (testRun.stateName !== "NotStarted") {
122
+ return;
123
+ }
124
+ try {
125
+ yield (0, utils_1.withHttpRetry)(() => this._client.adaptersTestRunsIdStartPost(testRunId), {
126
+ label: `startTestRun:${testRunId}`,
127
+ });
128
+ }
129
+ catch (err) {
130
+ const refreshed = yield this.getTestRun(testRunId);
131
+ if (refreshed.stateName !== "NotStarted") {
132
+ logger_1.default.debug("[testruns] startTestRun skipped: run already started", {
133
+ testRunId,
134
+ stateName: refreshed.stateName,
135
+ });
136
+ return;
137
+ }
138
+ throw err;
126
139
  }
127
140
  }
128
141
  catch (err) {