testit-js-commons 5.0.4 → 5.0.5-TMS-5.8
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.
- package/lib/adapters-api/dist/ApiClient.js +5 -6
- package/lib/adapters-api/dist/api/AttachmentsApi.js +5 -5
- package/lib/adapters-api/dist/api/AutoTestsApi.js +11 -11
- package/lib/adapters-api/dist/api/ConfigurationsApi.js +1 -1
- package/lib/adapters-api/dist/api/ParametersApi.js +3 -3
- package/lib/adapters-api/dist/api/ProjectAttributesApi.js +6 -6
- package/lib/adapters-api/dist/api/ProjectSectionsApi.js +1 -1
- package/lib/adapters-api/dist/api/ProjectWorkItemsApi.js +1 -1
- package/lib/adapters-api/dist/api/ProjectsApi.js +4 -4
- package/lib/adapters-api/dist/api/SectionsApi.js +2 -2
- package/lib/adapters-api/dist/api/TestResultsApi.js +3 -3
- package/lib/adapters-api/dist/api/TestRunsApi.js +8 -8
- package/lib/adapters-api/dist/api/WorkItemsApi.js +3 -3
- package/lib/adapters-api/dist/api/WorkflowsApi.js +1 -1
- package/lib/adapters-api/dist/index.js +3 -3
- package/lib/adapters-api/dist/model/AttachmentPutModelAutoTestStepResultsModel.js +1 -1
- package/lib/adapters-api/dist/model/AutoTestStepResult.js +1 -1
- package/lib/adapters-api/dist/model/AutoTestStepResultUpdateRequest.js +1 -1
- package/lib/adapters-api/dist/model/CreateEmptyTestRunApiModel.js +2 -2
- package/lib/adapters-api/dist/model/CustomAttributeApiResult.js +2 -2
- package/lib/adapters-api/dist/model/{CustomAttributeModel.js → CustomAttributeGetModel.js} +39 -89
- package/lib/adapters-api/dist/model/CustomAttributePutModel.js +1 -1
- package/lib/adapters-api/dist/model/LabelApiModel.js +15 -4
- package/lib/adapters-api/dist/model/TestResultResponse.js +4 -18
- package/lib/adapters-api/dist/model/UpdateEmptyTestRunApiModel.js +1 -1
- package/lib/adapters-api/index.d.ts +196 -40
- package/lib/common/utils/tms-load-test-run-debug.d.ts +0 -2
- package/lib/common/utils/tms-load-test-run-debug.js +0 -6
- package/lib/services/attachments/attachments.service.d.ts +1 -0
- package/lib/services/attachments/attachments.service.js +10 -2
- package/lib/services/syncstorage/syncstorage.runner.js +5 -6
- package/lib/services/syncstorage/syncstorage.runner.test.js +0 -16
- package/lib/services/testresults/testresults.converter.d.ts +5 -4
- package/lib/services/testresults/testresults.converter.js +8 -0
- package/lib/services/testresults/testresults.service.js +18 -1
- package/lib/services/testruns/testruns.converter.d.ts +3 -0
- package/lib/services/testruns/testruns.converter.js +12 -0
- package/lib/services/testruns/testruns.converter.test.d.ts +1 -0
- package/lib/services/testruns/testruns.converter.test.js +30 -0
- package/lib/services/testruns/testruns.handler.d.ts +2 -2
- package/lib/services/testruns/testruns.handler.js +2 -12
- package/lib/services/testruns/testruns.service.d.ts +5 -2
- package/lib/services/testruns/testruns.service.js +67 -46
- package/lib/services/testruns/testruns.service.test.d.ts +1 -0
- package/lib/services/testruns/testruns.service.test.js +83 -0
- package/lib/services/testruns/testruns.type.d.ts +2 -0
- package/lib/strategy/base.strategy.d.ts +1 -0
- package/lib/strategy/base.strategy.js +6 -0
- package/lib/strategy/strategy.type.d.ts +1 -0
- package/lib/strategy/zero.strategy.js +1 -1
- package/lib/sync-storage/dist/ApiClient.js +0 -3
- 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
|
|
72
|
+
* File size is restricted to 1 GB (1 073 741 824 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
|
|
80
|
+
* File size is restricted to 1 GB (1 073 741 824 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/
|
|
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
|
|
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/
|
|
597
|
+
* @return {Promise} a {@link https://www.promisejs.org/|Promise}, with data of type {@link Array.<module:model/CustomAttributeGetModel>}
|
|
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
|
|
1555
|
+
import CustomAttributeGetModel from 'adapters-api/model/CustomAttributeGetModel';
|
|
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
|
|
1880
|
-
* @property {module:model/
|
|
1879
|
+
* The CustomAttributeGetModel model constructor.
|
|
1880
|
+
* @property {module:model/CustomAttributeGetModel}
|
|
1881
1881
|
*/
|
|
1882
|
-
|
|
1882
|
+
CustomAttributeGetModel,
|
|
1883
1883
|
/**
|
|
1884
1884
|
* The CustomAttributeOptionApiResult model constructor.
|
|
1885
1885
|
* @property {module:model/CustomAttributeOptionApiResult}
|
|
@@ -2543,6 +2543,11 @@ 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;
|
|
2546
2551
|
/**
|
|
2547
2552
|
* Initializes the fields of this object.
|
|
2548
2553
|
* This method is used by the constructors of any subclasses, in order to implement multiple inheritance (mix-ins).
|
|
@@ -2653,6 +2658,7 @@ declare module 'adapters-api/model/AttachmentPutModel' {
|
|
|
2653
2658
|
* @param id {String} Unique ID of the attachment
|
|
2654
2659
|
*/
|
|
2655
2660
|
constructor(id: string);
|
|
2661
|
+
id: string;
|
|
2656
2662
|
/**
|
|
2657
2663
|
* Initializes the fields of this object.
|
|
2658
2664
|
* This method is used by the constructors of any subclasses, in order to implement multiple inheritance (mix-ins).
|
|
@@ -2704,6 +2710,16 @@ declare module 'adapters-api/model/AttachmentPutModelAutoTestStepResultsModel' {
|
|
|
2704
2710
|
* @alias module:model/AttachmentPutModelAutoTestStepResultsModel
|
|
2705
2711
|
*/
|
|
2706
2712
|
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 };
|
|
2707
2723
|
/**
|
|
2708
2724
|
* Initializes the fields of this object.
|
|
2709
2725
|
* This method is used by the constructors of any subclasses, in order to implement multiple inheritance (mix-ins).
|
|
@@ -2865,6 +2881,23 @@ declare module 'adapters-api/model/AutoTestApiResult' {
|
|
|
2865
2881
|
* @param globalId {Number}
|
|
2866
2882
|
*/
|
|
2867
2883
|
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[];
|
|
2868
2901
|
/**
|
|
2869
2902
|
* Initializes the fields of this object.
|
|
2870
2903
|
* This method is used by the constructors of any subclasses, in order to implement multiple inheritance (mix-ins).
|
|
@@ -2971,6 +3004,22 @@ declare module 'adapters-api/model/AutoTestCreateApiModel' {
|
|
|
2971
3004
|
* @param name {String} Name of the autotest
|
|
2972
3005
|
*/
|
|
2973
3006
|
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;
|
|
2974
3023
|
/**
|
|
2975
3024
|
* Initializes the fields of this object.
|
|
2976
3025
|
* This method is used by the constructors of any subclasses, in order to implement multiple inheritance (mix-ins).
|
|
@@ -3022,6 +3071,17 @@ declare module 'adapters-api/model/AutoTestFilterApiModel' {
|
|
|
3022
3071
|
* @alias module:model/AutoTestFilterApiModel
|
|
3023
3072
|
*/
|
|
3024
3073
|
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[];
|
|
3025
3085
|
/**
|
|
3026
3086
|
* Initializes the fields of this object.
|
|
3027
3087
|
* This method is used by the constructors of any subclasses, in order to implement multiple inheritance (mix-ins).
|
|
@@ -3237,6 +3297,24 @@ declare module 'adapters-api/model/AutoTestResultsForTestRunModel' {
|
|
|
3237
3297
|
* @param autoTestExternalId {String} Specifies the external ID of the autotest, which was specified when the test run was created.
|
|
3238
3298
|
*/
|
|
3239
3299
|
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[];
|
|
3240
3318
|
/**
|
|
3241
3319
|
* Initializes the fields of this object.
|
|
3242
3320
|
* This method is used by the constructors of any subclasses, in order to implement multiple inheritance (mix-ins).
|
|
@@ -3288,6 +3366,8 @@ declare module 'adapters-api/model/AutoTestSearchApiModel' {
|
|
|
3288
3366
|
* @alias module:model/AutoTestSearchApiModel
|
|
3289
3367
|
*/
|
|
3290
3368
|
constructor();
|
|
3369
|
+
filter?: any;
|
|
3370
|
+
includes?: any;
|
|
3291
3371
|
/**
|
|
3292
3372
|
* Initializes the fields of this object.
|
|
3293
3373
|
* This method is used by the constructors of any subclasses, in order to implement multiple inheritance (mix-ins).
|
|
@@ -3336,6 +3416,9 @@ declare module 'adapters-api/model/AutoTestSearchIncludeApiModel' {
|
|
|
3336
3416
|
* @alias module:model/AutoTestSearchIncludeApiModel
|
|
3337
3417
|
*/
|
|
3338
3418
|
constructor();
|
|
3419
|
+
includeSteps?: boolean;
|
|
3420
|
+
includeLinks?: boolean;
|
|
3421
|
+
includeLabels?: boolean;
|
|
3339
3422
|
/**
|
|
3340
3423
|
* Initializes the fields of this object.
|
|
3341
3424
|
* This method is used by the constructors of any subclasses, in order to implement multiple inheritance (mix-ins).
|
|
@@ -3541,6 +3624,9 @@ declare module 'adapters-api/model/AutoTestStepModel' {
|
|
|
3541
3624
|
* @param title {String} Step name.
|
|
3542
3625
|
*/
|
|
3543
3626
|
constructor(title: string);
|
|
3627
|
+
title: string;
|
|
3628
|
+
description?: string | null;
|
|
3629
|
+
steps?: AutoTestStepModel[];
|
|
3544
3630
|
/**
|
|
3545
3631
|
* Initializes the fields of this object.
|
|
3546
3632
|
* This method is used by the constructors of any subclasses, in order to implement multiple inheritance (mix-ins).
|
|
@@ -4005,7 +4091,7 @@ declare module 'adapters-api/model/CreateEmptyTestRunApiModel' {
|
|
|
4005
4091
|
/**
|
|
4006
4092
|
* Constructs a new <code>CreateEmptyTestRunApiModel</code>.
|
|
4007
4093
|
* @alias module:model/CreateEmptyTestRunApiModel
|
|
4008
|
-
* @param projectId {String} Project unique identifier
|
|
4094
|
+
* @param projectId {String} Project unique identifier This property is to link test run with a project
|
|
4009
4095
|
*/
|
|
4010
4096
|
constructor(projectId: string);
|
|
4011
4097
|
/**
|
|
@@ -4321,7 +4407,7 @@ declare module 'adapters-api/model/CustomAttributeApiResult' {
|
|
|
4321
4407
|
* Constructs a new <code>CustomAttributeApiResult</code>.
|
|
4322
4408
|
* @alias module:model/CustomAttributeApiResult
|
|
4323
4409
|
* @param id {String} Unique ID of the attribute
|
|
4324
|
-
* @param options {Array.<module:model/CustomAttributeOptionApiResult>} Collection of the attribute options
|
|
4410
|
+
* @param options {Array.<module:model/CustomAttributeOptionApiResult>} Collection of the attribute options Available for attributes of type `options` and `multiple options` only
|
|
4325
4411
|
* @param type {module:model/CustomAttributeType} Type of the attribute
|
|
4326
4412
|
* @param isDeleted {Boolean} Indicates if the attribute is deleted
|
|
4327
4413
|
* @param name {String} Name of the attribute
|
|
@@ -4357,7 +4443,7 @@ declare module 'adapters-api/model/CustomAttributeApiResult' {
|
|
|
4357
4443
|
export default CustomAttributeApiResult;
|
|
4358
4444
|
|
|
4359
4445
|
}
|
|
4360
|
-
declare module 'adapters-api/model/
|
|
4446
|
+
declare module 'adapters-api/model/CustomAttributeGetModel' {
|
|
4361
4447
|
/**
|
|
4362
4448
|
* API
|
|
4363
4449
|
* No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator)
|
|
@@ -4371,52 +4457,49 @@ declare module 'adapters-api/model/CustomAttributeModel' {
|
|
|
4371
4457
|
*
|
|
4372
4458
|
*/
|
|
4373
4459
|
/**
|
|
4374
|
-
* The
|
|
4375
|
-
* @module model/
|
|
4460
|
+
* The CustomAttributeGetModel model module.
|
|
4461
|
+
* @module model/CustomAttributeGetModel
|
|
4376
4462
|
* @version 1.0.0
|
|
4377
4463
|
*/
|
|
4378
|
-
class
|
|
4379
|
-
/**
|
|
4380
|
-
* Constructs a new <code>
|
|
4381
|
-
* @alias module:model/
|
|
4382
|
-
* @param id {String} Unique ID of the attribute
|
|
4383
|
-
* @param
|
|
4384
|
-
* @param
|
|
4385
|
-
* @param
|
|
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.
|
|
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
|
|
4389
4472
|
* @param name {String} Name of the attribute
|
|
4390
4473
|
* @param isEnabled {Boolean} Indicates if the attribute is enabled
|
|
4391
|
-
* @param isRequired {Boolean} Indicates if the attribute
|
|
4474
|
+
* @param isRequired {Boolean} Indicates if the attribute is mandatory to specify
|
|
4392
4475
|
* @param isGlobal {Boolean} Indicates if the attribute is available across all projects
|
|
4393
4476
|
*/
|
|
4394
|
-
constructor(id: string,
|
|
4477
|
+
constructor(id: string, options: Array<any>, type: module, isDeleted: boolean, name: string, isEnabled: boolean, isRequired: boolean, isGlobal: boolean);
|
|
4395
4478
|
/**
|
|
4396
4479
|
* Initializes the fields of this object.
|
|
4397
4480
|
* This method is used by the constructors of any subclasses, in order to implement multiple inheritance (mix-ins).
|
|
4398
4481
|
* Only for internal use.
|
|
4399
4482
|
*/
|
|
4400
|
-
static initialize(obj: any, id: any,
|
|
4483
|
+
static initialize(obj: any, id: any, options: any, type: any, isDeleted: any, name: any, isEnabled: any, isRequired: any, isGlobal: any): void;
|
|
4401
4484
|
/**
|
|
4402
|
-
* Constructs a <code>
|
|
4485
|
+
* Constructs a <code>CustomAttributeGetModel</code> from a plain JavaScript object, optionally creating a new instance.
|
|
4403
4486
|
* Copies all relevant properties from <code>data</code> to <code>obj</code> if supplied or a new instance if not.
|
|
4404
4487
|
* @param {Object} data The plain JavaScript object bearing properties of interest.
|
|
4405
|
-
* @param {module:model/
|
|
4406
|
-
* @return {module:model/
|
|
4488
|
+
* @param {module:model/CustomAttributeGetModel} obj Optional instance to populate.
|
|
4489
|
+
* @return {module:model/CustomAttributeGetModel} The populated <code>CustomAttributeGetModel</code> instance.
|
|
4407
4490
|
*/
|
|
4408
4491
|
static constructFromObject(data: Object, obj: module): module;
|
|
4409
4492
|
/**
|
|
4410
|
-
* Validates the JSON data with respect to <code>
|
|
4493
|
+
* Validates the JSON data with respect to <code>CustomAttributeGetModel</code>.
|
|
4411
4494
|
* @param {Object} data The plain JavaScript object bearing properties of interest.
|
|
4412
|
-
* @return {boolean} to indicate whether the JSON data is valid with respect to <code>
|
|
4495
|
+
* @return {boolean} to indicate whether the JSON data is valid with respect to <code>CustomAttributeGetModel</code>.
|
|
4413
4496
|
*/
|
|
4414
4497
|
static validateJSON(data: Object): boolean;
|
|
4415
4498
|
}
|
|
4416
|
-
namespace
|
|
4499
|
+
namespace CustomAttributeGetModel {
|
|
4417
4500
|
var RequiredProperties: string[];
|
|
4418
4501
|
}
|
|
4419
|
-
export default
|
|
4502
|
+
export default CustomAttributeGetModel;
|
|
4420
4503
|
|
|
4421
4504
|
}
|
|
4422
4505
|
declare module 'adapters-api/model/CustomAttributeOptionApiResult' {
|
|
@@ -5212,14 +5295,15 @@ declare module 'adapters-api/model/LabelApiModel' {
|
|
|
5212
5295
|
* Constructs a new <code>LabelApiModel</code>.
|
|
5213
5296
|
* @alias module:model/LabelApiModel
|
|
5214
5297
|
* @param name {String} Name of the label
|
|
5298
|
+
* @param globalId {Number} Global ID of the label
|
|
5215
5299
|
*/
|
|
5216
|
-
constructor(name: string);
|
|
5300
|
+
constructor(name: string, globalId: number);
|
|
5217
5301
|
/**
|
|
5218
5302
|
* Initializes the fields of this object.
|
|
5219
5303
|
* This method is used by the constructors of any subclasses, in order to implement multiple inheritance (mix-ins).
|
|
5220
5304
|
* Only for internal use.
|
|
5221
5305
|
*/
|
|
5222
|
-
static initialize(obj: any, name: any): void;
|
|
5306
|
+
static initialize(obj: any, name: any, globalId: any): void;
|
|
5223
5307
|
/**
|
|
5224
5308
|
* Constructs a <code>LabelApiModel</code> from a plain JavaScript object, optionally creating a new instance.
|
|
5225
5309
|
* Copies all relevant properties from <code>data</code> to <code>obj</code> if supplied or a new instance if not.
|
|
@@ -5267,6 +5351,8 @@ declare module 'adapters-api/model/LabelApiResult' {
|
|
|
5267
5351
|
* @param globalId {Number} Global ID of the label
|
|
5268
5352
|
*/
|
|
5269
5353
|
constructor(name: string, globalId: number);
|
|
5354
|
+
name: string;
|
|
5355
|
+
globalId?: number;
|
|
5270
5356
|
/**
|
|
5271
5357
|
* Initializes the fields of this object.
|
|
5272
5358
|
* This method is used by the constructors of any subclasses, in order to implement multiple inheritance (mix-ins).
|
|
@@ -5373,6 +5459,12 @@ declare module 'adapters-api/model/LinkApiResult' {
|
|
|
5373
5459
|
* @param type {module:model/LinkType} Specifies the type of the link.
|
|
5374
5460
|
*/
|
|
5375
5461
|
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;
|
|
5376
5468
|
/**
|
|
5377
5469
|
* Initializes the fields of this object.
|
|
5378
5470
|
* This method is used by the constructors of any subclasses, in order to implement multiple inheritance (mix-ins).
|
|
@@ -5534,6 +5626,11 @@ declare module 'adapters-api/model/LinkPostModel' {
|
|
|
5534
5626
|
* @param hasInfo {Boolean}
|
|
5535
5627
|
*/
|
|
5536
5628
|
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;
|
|
5537
5634
|
/**
|
|
5538
5635
|
* Initializes the fields of this object.
|
|
5539
5636
|
* This method is used by the constructors of any subclasses, in order to implement multiple inheritance (mix-ins).
|
|
@@ -5588,6 +5685,12 @@ declare module 'adapters-api/model/LinkPutModel' {
|
|
|
5588
5685
|
* @param hasInfo {Boolean}
|
|
5589
5686
|
*/
|
|
5590
5687
|
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;
|
|
5591
5694
|
/**
|
|
5592
5695
|
* Initializes the fields of this object.
|
|
5593
5696
|
* This method is used by the constructors of any subclasses, in order to implement multiple inheritance (mix-ins).
|
|
@@ -7156,16 +7259,15 @@ declare module 'adapters-api/model/TestResultResponse' {
|
|
|
7156
7259
|
* @param id {String}
|
|
7157
7260
|
* @param failureClassIds {Array.<String>}
|
|
7158
7261
|
* @param configurationId {String}
|
|
7159
|
-
* @param testPointId {String}
|
|
7160
7262
|
* @param testRunId {String}
|
|
7161
7263
|
*/
|
|
7162
|
-
constructor(id: string, failureClassIds: Array<string>, configurationId: string,
|
|
7264
|
+
constructor(id: string, failureClassIds: Array<string>, configurationId: string, testRunId: string);
|
|
7163
7265
|
/**
|
|
7164
7266
|
* Initializes the fields of this object.
|
|
7165
7267
|
* This method is used by the constructors of any subclasses, in order to implement multiple inheritance (mix-ins).
|
|
7166
7268
|
* Only for internal use.
|
|
7167
7269
|
*/
|
|
7168
|
-
static initialize(obj: any, id: any, failureClassIds: any, configurationId: any,
|
|
7270
|
+
static initialize(obj: any, id: any, failureClassIds: any, configurationId: any, testRunId: any): void;
|
|
7169
7271
|
/**
|
|
7170
7272
|
* Constructs a <code>TestResultResponse</code> from a plain JavaScript object, optionally creating a new instance.
|
|
7171
7273
|
* Copies all relevant properties from <code>data</code> to <code>obj</code> if supplied or a new instance if not.
|
|
@@ -7211,6 +7313,18 @@ declare module 'adapters-api/model/TestResultsFilterApiModel' {
|
|
|
7211
7313
|
* @alias module:model/TestResultsFilterApiModel
|
|
7212
7314
|
*/
|
|
7213
7315
|
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[];
|
|
7214
7328
|
/**
|
|
7215
7329
|
* Initializes the fields of this object.
|
|
7216
7330
|
* This method is used by the constructors of any subclasses, in order to implement multiple inheritance (mix-ins).
|
|
@@ -7270,6 +7384,22 @@ declare module 'adapters-api/model/TestResultShortResponse' {
|
|
|
7270
7384
|
* @param rerunCompletedCount {Number} Run count
|
|
7271
7385
|
*/
|
|
7272
7386
|
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 };
|
|
7273
7403
|
/**
|
|
7274
7404
|
* Initializes the fields of this object.
|
|
7275
7405
|
* This method is used by the constructors of any subclasses, in order to implement multiple inheritance (mix-ins).
|
|
@@ -7376,6 +7506,21 @@ declare module 'adapters-api/model/TestResultUpdateRequest' {
|
|
|
7376
7506
|
* @alias module:model/TestResultUpdateRequest
|
|
7377
7507
|
*/
|
|
7378
7508
|
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;
|
|
7379
7524
|
/**
|
|
7380
7525
|
* Initializes the fields of this object.
|
|
7381
7526
|
* This method is used by the constructors of any subclasses, in order to implement multiple inheritance (mix-ins).
|
|
@@ -7431,6 +7576,17 @@ declare module 'adapters-api/model/TestRunApiResult' {
|
|
|
7431
7576
|
* @param tags {Array.<String>} Collection of tags associated with the test run
|
|
7432
7577
|
*/
|
|
7433
7578
|
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;
|
|
7434
7590
|
/**
|
|
7435
7591
|
* Initializes the fields of this object.
|
|
7436
7592
|
* This method is used by the constructors of any subclasses, in order to implement multiple inheritance (mix-ins).
|
|
@@ -8703,4 +8859,4 @@ declare module 'adapters-api/model/WorkItemTypeModel' {
|
|
|
8703
8859
|
declare module 'adapters-api' {
|
|
8704
8860
|
import main = require('adapters-api/index');
|
|
8705
8861
|
export = main;
|
|
8706
|
-
}
|
|
8862
|
+
}
|
|
@@ -1,4 +1,2 @@
|
|
|
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;
|
|
4
2
|
export declare function logTmsLoadTestRun(message: string, data?: Record<string, unknown>): void;
|
|
@@ -4,7 +4,6 @@ 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;
|
|
8
7
|
exports.logTmsLoadTestRun = logTmsLoadTestRun;
|
|
9
8
|
/** Trace loadTestRun / result POST with `LOG_LEVEL=debug` or `TMS_DEBUG_LOAD_TEST_RUN=1`. */
|
|
10
9
|
const logger_1 = __importDefault(require("../../logger"));
|
|
@@ -15,11 +14,6 @@ function isTmsLoadTestRunDebug() {
|
|
|
15
14
|
const v = process.env.TMS_DEBUG_LOAD_TEST_RUN;
|
|
16
15
|
return v === "1" || (v === null || v === void 0 ? void 0 : v.toLowerCase()) === "true";
|
|
17
16
|
}
|
|
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
|
-
}
|
|
23
17
|
function logTmsLoadTestRun(message, data) {
|
|
24
18
|
if (!isTmsLoadTestRunDebug()) {
|
|
25
19
|
return;
|
|
@@ -5,6 +5,7 @@ export declare class AttachmentsService extends BaseService implements IAttachme
|
|
|
5
5
|
protected readonly config: AdapterConfig;
|
|
6
6
|
protected _client: any;
|
|
7
7
|
constructor(config: AdapterConfig);
|
|
8
|
+
private safeAttachmentFileName;
|
|
8
9
|
uploadTextAttachment(content: string | Buffer, filename?: string): Promise<Attachment[]>;
|
|
9
10
|
uploadAttachments(paths: string[]): Promise<Attachment[]>;
|
|
10
11
|
}
|
|
@@ -51,6 +51,7 @@ const AdaptersApi = require("../../adapters-api/dist/index");
|
|
|
51
51
|
const common_1 = require("../../common");
|
|
52
52
|
const buffer_1 = require("buffer");
|
|
53
53
|
const fs = __importStar(require("fs"));
|
|
54
|
+
const path_1 = require("path");
|
|
54
55
|
const logger_1 = __importDefault(require("../../logger"));
|
|
55
56
|
const UPLOAD_RETRY_OPTIONS = { maxAttempts: 5, delayMs: 500, backoff: true };
|
|
56
57
|
/** Minimum HTTP timeout for attachment POST (ms); reduces false timeouts on slow TLS. */
|
|
@@ -66,13 +67,20 @@ class AttachmentsService extends common_1.BaseService {
|
|
|
66
67
|
const t = this._client.apiClient.timeout;
|
|
67
68
|
this._client.apiClient.timeout = Math.max(typeof t === "number" ? t : 60000, UPLOAD_CLIENT_TIMEOUT_MS);
|
|
68
69
|
}
|
|
70
|
+
safeAttachmentFileName(filename) {
|
|
71
|
+
if (!filename) {
|
|
72
|
+
return common_1.Utils.generateFileName();
|
|
73
|
+
}
|
|
74
|
+
const lastSegment = filename.replace(/\\/g, "/").split("/").filter(Boolean).pop();
|
|
75
|
+
return lastSegment || common_1.Utils.generateFileName();
|
|
76
|
+
}
|
|
69
77
|
uploadTextAttachment(content, filename) {
|
|
70
78
|
return __awaiter(this, void 0, void 0, function* () {
|
|
71
79
|
const bufferContent = typeof content === "string" ? buffer_1.Buffer.from(content, "utf-8") : content;
|
|
72
|
-
const fileName =
|
|
80
|
+
const fileName = this.safeAttachmentFileName(filename);
|
|
73
81
|
try {
|
|
74
82
|
const tempDir = common_1.Utils.createTempDir();
|
|
75
|
-
const tempFilePath =
|
|
83
|
+
const tempFilePath = (0, path_1.join)(tempDir, fileName);
|
|
76
84
|
try {
|
|
77
85
|
fs.writeFileSync(tempFilePath, bufferContent);
|
|
78
86
|
logger_1.default.debug("[attachments] upload text", { fileName, bytes: bufferContent.length });
|
|
@@ -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.
|
|
114
|
+
if ((0, utils_1.isTmsLoadTestRunDebug)()) {
|
|
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.
|
|
129
|
+
if ((0, utils_1.isTmsLoadTestRunDebug)()) {
|
|
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.
|
|
150
|
+
if ((0, utils_1.isTmsLoadTestRunDebug)()) {
|
|
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.
|
|
164
|
+
if ((0, utils_1.isTmsLoadTestRunDebug)()) {
|
|
165
165
|
logger_1.default.debug("[syncstorage] in-progress cut publish failed", {
|
|
166
166
|
workerPid: this.workerPid,
|
|
167
167
|
autoTestExternalId: model.autoTestExternalId,
|
|
@@ -233,7 +233,6 @@ 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.
|
|
237
236
|
this.syncStorageProcess = (0, child_process_1.spawn)(executablePath, command, {
|
|
238
237
|
cwd: (0, path_1.join)(process.cwd(), "build", ".caches"),
|
|
239
238
|
stdio: "ignore",
|
|
@@ -354,7 +353,7 @@ class SyncStorageRunner {
|
|
|
354
353
|
}
|
|
355
354
|
}
|
|
356
355
|
exports.SyncStorageRunner = SyncStorageRunner;
|
|
357
|
-
SyncStorageRunner.VERSION = "v0.3.
|
|
356
|
+
SyncStorageRunner.VERSION = "v0.3.10-tms-5.8";
|
|
358
357
|
SyncStorageRunner.STARTUP_TIMEOUT_MS = 30000;
|
|
359
358
|
SyncStorageRunner.STARTUP_POLL_MS = 1000;
|
|
360
359
|
SyncStorageRunner.PROCESS_WARMUP_MS = 2000;
|
|
@@ -10,9 +10,6 @@ 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;
|
|
16
13
|
function makeConfig() {
|
|
17
14
|
return {
|
|
18
15
|
url: "http://localhost:8080",
|
|
@@ -25,19 +22,6 @@ function makeConfig() {
|
|
|
25
22
|
};
|
|
26
23
|
}
|
|
27
24
|
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
|
-
}));
|
|
41
25
|
it("should mark runner as active and resolve master status after start", () => __awaiter(void 0, void 0, void 0, function* () {
|
|
42
26
|
const runner = new syncstorage_runner_1.SyncStorageRunner("run-1", makeConfig());
|
|
43
27
|
const internal = runner;
|
|
@@ -1,11 +1,12 @@
|
|
|
1
1
|
import { AdapterConfig, BaseConverter } from "../../common";
|
|
2
|
+
export declare function isValidTestRunId(value: string | undefined | null): value is string;
|
|
2
3
|
export interface ITestResultsConverter {
|
|
3
|
-
getTestResultsFilterApiModel(): any;
|
|
4
|
-
getTestResultsFilterForRun(): any;
|
|
4
|
+
getTestResultsFilterApiModel(): any | null;
|
|
5
|
+
getTestResultsFilterForRun(): any | null;
|
|
5
6
|
}
|
|
6
7
|
export declare class TestResultsConverter extends BaseConverter implements ITestResultsConverter {
|
|
7
8
|
constructor(config: AdapterConfig);
|
|
8
9
|
private buildRunFilter;
|
|
9
|
-
getTestResultsFilterApiModel(): any;
|
|
10
|
-
getTestResultsFilterForRun(): any;
|
|
10
|
+
getTestResultsFilterApiModel(): any | null;
|
|
11
|
+
getTestResultsFilterForRun(): any | null;
|
|
11
12
|
}
|