@elisra-devops/docgen-data-provider 0.5.0 → 0.6.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.
- package/bin/helpers/helper.js +22 -7
- package/bin/helpers/helper.js.map +1 -1
- package/bin/helpers/tfs.js +62 -77
- package/bin/helpers/tfs.js.map +1 -1
- package/bin/index.d.ts +3 -1
- package/bin/index.js +17 -31
- package/bin/index.js.map +1 -1
- package/bin/models/tfs-data.d.ts +3 -3
- package/bin/models/tfs-data.js +54 -17
- package/bin/models/tfs-data.js.map +1 -1
- package/bin/modules/GitDataProvider.js +213 -259
- package/bin/modules/GitDataProvider.js.map +1 -1
- package/bin/modules/MangementDataProvider.js +26 -43
- package/bin/modules/MangementDataProvider.js.map +1 -1
- package/bin/modules/PipelinesDataProvider.js +57 -82
- package/bin/modules/PipelinesDataProvider.js.map +1 -1
- package/bin/modules/ResultDataProvider.d.ts +89 -0
- package/bin/modules/ResultDataProvider.js +409 -0
- package/bin/modules/ResultDataProvider.js.map +1 -0
- package/bin/modules/TestDataProvider.js +196 -236
- package/bin/modules/TestDataProvider.js.map +1 -1
- package/bin/modules/TicketsDataProvider.js +259 -300
- package/bin/modules/TicketsDataProvider.js.map +1 -1
- package/bin/modules/test/gitDataProvider.test.js +67 -76
- package/bin/modules/test/gitDataProvider.test.js.map +1 -1
- package/bin/modules/test/managmentDataProvider.test.js +16 -25
- package/bin/modules/test/managmentDataProvider.test.js.map +1 -1
- package/bin/modules/test/pipelineDataProvider.test.js +32 -41
- package/bin/modules/test/pipelineDataProvider.test.js.map +1 -1
- package/bin/modules/test/testDataProvider.test.js +56 -65
- package/bin/modules/test/testDataProvider.test.js.map +1 -1
- package/bin/modules/test/ticketsDataProvider.test.js +39 -48
- package/bin/modules/test/ticketsDataProvider.test.js.map +1 -1
- package/package.json +17 -11
- package/src/index.ts +19 -15
- package/src/modules/ResultDataProvider.ts +496 -0
- package/src/modules/TestDataProvider.ts +1 -0
- package/tsconfig.json +2 -2
|
@@ -1,61 +1,44 @@
|
|
|
1
1
|
"use strict";
|
|
2
|
-
var __awaiter = (this && this.__awaiter) || function (thisArg, _arguments, P, generator) {
|
|
3
|
-
function adopt(value) { return value instanceof P ? value : new P(function (resolve) { resolve(value); }); }
|
|
4
|
-
return new (P || (P = Promise))(function (resolve, reject) {
|
|
5
|
-
function fulfilled(value) { try { step(generator.next(value)); } catch (e) { reject(e); } }
|
|
6
|
-
function rejected(value) { try { step(generator["throw"](value)); } catch (e) { reject(e); } }
|
|
7
|
-
function step(result) { result.done ? resolve(result.value) : adopt(result.value).then(fulfilled, rejected); }
|
|
8
|
-
step((generator = generator.apply(thisArg, _arguments || [])).next());
|
|
9
|
-
});
|
|
10
|
-
};
|
|
11
2
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
12
3
|
const tfs_1 = require("../helpers/tfs");
|
|
13
4
|
class MangementDataProvider {
|
|
5
|
+
orgUrl = "";
|
|
6
|
+
token = "";
|
|
14
7
|
constructor(orgUrl, token) {
|
|
15
|
-
this.orgUrl = "";
|
|
16
|
-
this.token = "";
|
|
17
8
|
this.orgUrl = orgUrl;
|
|
18
9
|
this.token = token;
|
|
19
10
|
}
|
|
20
|
-
GetCllectionLinkTypes() {
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
return res;
|
|
25
|
-
});
|
|
11
|
+
async GetCllectionLinkTypes() {
|
|
12
|
+
let url = `${this.orgUrl}_apis/wit/workitemrelationtypes`;
|
|
13
|
+
let res = await tfs_1.TFSServices.getItemContent(url, this.token, "get", null, null);
|
|
14
|
+
return res;
|
|
26
15
|
}
|
|
27
16
|
//get all projects
|
|
28
|
-
GetProjects() {
|
|
29
|
-
|
|
30
|
-
|
|
31
|
-
|
|
32
|
-
return projects;
|
|
33
|
-
});
|
|
17
|
+
async GetProjects() {
|
|
18
|
+
let projectUrl = `${this.orgUrl}_apis/projects?$top=1000`;
|
|
19
|
+
let projects = await tfs_1.TFSServices.getItemContent(projectUrl, this.token);
|
|
20
|
+
return projects;
|
|
34
21
|
}
|
|
35
22
|
// get project by name return project object
|
|
36
|
-
GetProjectByName(projectName) {
|
|
37
|
-
|
|
38
|
-
|
|
39
|
-
|
|
40
|
-
|
|
41
|
-
|
|
42
|
-
return projects.value[i];
|
|
43
|
-
}
|
|
44
|
-
return {};
|
|
23
|
+
async GetProjectByName(projectName) {
|
|
24
|
+
try {
|
|
25
|
+
let projects = await this.GetProjects();
|
|
26
|
+
for (let i = 0; i < projects.value.length; i++) {
|
|
27
|
+
if (projects.value[i].name === projectName)
|
|
28
|
+
return projects.value[i];
|
|
45
29
|
}
|
|
46
|
-
|
|
47
|
-
|
|
48
|
-
|
|
49
|
-
|
|
50
|
-
|
|
30
|
+
return {};
|
|
31
|
+
}
|
|
32
|
+
catch (err) {
|
|
33
|
+
console.log(err);
|
|
34
|
+
return {};
|
|
35
|
+
}
|
|
51
36
|
}
|
|
52
37
|
// get project by id return project object
|
|
53
|
-
GetProjectByID(projectID) {
|
|
54
|
-
|
|
55
|
-
|
|
56
|
-
|
|
57
|
-
return project;
|
|
58
|
-
});
|
|
38
|
+
async GetProjectByID(projectID) {
|
|
39
|
+
let projectUrl = `${this.orgUrl}_apis/projects/${projectID}`;
|
|
40
|
+
let project = await tfs_1.TFSServices.getItemContent(projectUrl, this.token);
|
|
41
|
+
return project;
|
|
59
42
|
}
|
|
60
43
|
}
|
|
61
44
|
exports.default = MangementDataProvider;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"MangementDataProvider.js","sourceRoot":"","sources":["../../src/modules/MangementDataProvider.ts"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"MangementDataProvider.js","sourceRoot":"","sources":["../../src/modules/MangementDataProvider.ts"],"names":[],"mappings":";;AAAA,wCAA6C;AAG7C,MAAqB,qBAAqB;IACxC,MAAM,GAAW,EAAE,CAAC;IACpB,KAAK,GAAW,EAAE,CAAC;IAEnB,YAAY,MAAc,EAAE,KA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C,MAAM,kBAAkB,SAAS,EAAE,CAAC;QACrE,IAAI,OAAO,GAAQ,MAAM,iBAAW,CAAC,cAAc,CAAC,UAAU,EAAE,IAAI,CAAC,KAAK,CAAC,CAAC;QAC5E,OAAO,OAAO,CAAC;IACjB,CAAC;CACF;AAvDD,wCAuDC"}
|
|
@@ -1,102 +1,77 @@
|
|
|
1
1
|
"use strict";
|
|
2
|
-
var __awaiter = (this && this.__awaiter) || function (thisArg, _arguments, P, generator) {
|
|
3
|
-
function adopt(value) { return value instanceof P ? value : new P(function (resolve) { resolve(value); }); }
|
|
4
|
-
return new (P || (P = Promise))(function (resolve, reject) {
|
|
5
|
-
function fulfilled(value) { try { step(generator.next(value)); } catch (e) { reject(e); } }
|
|
6
|
-
function rejected(value) { try { step(generator["throw"](value)); } catch (e) { reject(e); } }
|
|
7
|
-
function step(result) { result.done ? resolve(result.value) : adopt(result.value).then(fulfilled, rejected); }
|
|
8
|
-
step((generator = generator.apply(thisArg, _arguments || [])).next());
|
|
9
|
-
});
|
|
10
|
-
};
|
|
11
2
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
12
3
|
const tfs_1 = require("../helpers/tfs");
|
|
13
4
|
const logger_1 = require("../utils/logger");
|
|
14
5
|
class PipelinesDataProvider {
|
|
6
|
+
orgUrl = "";
|
|
7
|
+
token = "";
|
|
15
8
|
constructor(orgUrl, token) {
|
|
16
|
-
this.orgUrl = "";
|
|
17
|
-
this.token = "";
|
|
18
9
|
this.orgUrl = orgUrl;
|
|
19
10
|
this.token = token;
|
|
20
11
|
}
|
|
21
|
-
getPipelineFromPipelineId(projectName, buildId) {
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
return tfs_1.TFSServices.getItemContent(url, this.token, "get");
|
|
25
|
-
});
|
|
12
|
+
async getPipelineFromPipelineId(projectName, buildId) {
|
|
13
|
+
let url = `${this.orgUrl}${projectName}/_apis/build/builds/${buildId}`;
|
|
14
|
+
return tfs_1.TFSServices.getItemContent(url, this.token, "get");
|
|
26
15
|
} //GetCommitForPipeline
|
|
27
|
-
TriggerBuildById(projectName, buildDefanitionId, parameter) {
|
|
28
|
-
|
|
29
|
-
|
|
30
|
-
|
|
31
|
-
|
|
32
|
-
|
|
33
|
-
|
|
34
|
-
|
|
35
|
-
|
|
36
|
-
|
|
37
|
-
|
|
38
|
-
return res;
|
|
39
|
-
});
|
|
16
|
+
async TriggerBuildById(projectName, buildDefanitionId, parameter) {
|
|
17
|
+
let data = {
|
|
18
|
+
definition: {
|
|
19
|
+
id: buildDefanitionId,
|
|
20
|
+
},
|
|
21
|
+
parameters: parameter, //'{"Test":"123"}'
|
|
22
|
+
};
|
|
23
|
+
logger_1.default.info(JSON.stringify(data));
|
|
24
|
+
let url = `${this.orgUrl}${projectName}/_apis/build/builds?api-version=5.0`;
|
|
25
|
+
let res = await tfs_1.TFSServices.postRequest(url, this.token, "post", data, null);
|
|
26
|
+
return res;
|
|
40
27
|
}
|
|
41
|
-
GetArtifactByBuildId(projectName, buildId, artifactName) {
|
|
42
|
-
|
|
43
|
-
|
|
44
|
-
|
|
45
|
-
|
|
46
|
-
|
|
47
|
-
|
|
48
|
-
|
|
49
|
-
|
|
50
|
-
return response;
|
|
51
|
-
}
|
|
52
|
-
url = `${this.orgUrl}${projectName}/_apis/build/builds/${buildId}/artifacts?artifactName=${artifactName}`;
|
|
53
|
-
let res = yield tfs_1.TFSServices.getItemContent(url, this.token, "Get", null, null);
|
|
54
|
-
logger_1.default.info(`Url for download :${res.resource.downloadUrl}`);
|
|
55
|
-
let result = yield tfs_1.TFSServices.downloadZipFile(res.resource.downloadUrl, this.token);
|
|
56
|
-
return result;
|
|
28
|
+
async GetArtifactByBuildId(projectName, buildId, artifactName) {
|
|
29
|
+
try {
|
|
30
|
+
logger_1.default.info(`Get artifactory from project ${projectName},BuildId ${buildId} artifact name ${artifactName}`);
|
|
31
|
+
logger_1.default.info(`Check if build ${buildId} have artifact`);
|
|
32
|
+
let url = `${this.orgUrl}${projectName}/_apis/build/builds/${buildId}/artifacts`;
|
|
33
|
+
let response = await tfs_1.TFSServices.getItemContent(url, this.token, "Get", null, null);
|
|
34
|
+
if (response.count == 0) {
|
|
35
|
+
logger_1.default.info(`No artifact for build ${buildId} was published `);
|
|
36
|
+
return response;
|
|
57
37
|
}
|
|
58
|
-
|
|
59
|
-
|
|
60
|
-
|
|
61
|
-
|
|
62
|
-
|
|
38
|
+
url = `${this.orgUrl}${projectName}/_apis/build/builds/${buildId}/artifacts?artifactName=${artifactName}`;
|
|
39
|
+
let res = await tfs_1.TFSServices.getItemContent(url, this.token, "Get", null, null);
|
|
40
|
+
logger_1.default.info(`Url for download :${res.resource.downloadUrl}`);
|
|
41
|
+
let result = await tfs_1.TFSServices.downloadZipFile(res.resource.downloadUrl, this.token);
|
|
42
|
+
return result;
|
|
43
|
+
}
|
|
44
|
+
catch (err) {
|
|
45
|
+
logger_1.default.error(`Error : ${err}`);
|
|
46
|
+
throw new Error(String(err));
|
|
47
|
+
}
|
|
63
48
|
}
|
|
64
|
-
GetReleaseByReleaseId(projectName, releaseId) {
|
|
65
|
-
|
|
66
|
-
|
|
67
|
-
|
|
68
|
-
return tfs_1.TFSServices.getItemContent(url, this.token, "get", null, null);
|
|
69
|
-
});
|
|
49
|
+
async GetReleaseByReleaseId(projectName, releaseId) {
|
|
50
|
+
let url = `${this.orgUrl}${projectName}/_apis/release/releases/${releaseId}`;
|
|
51
|
+
url = url.replace("dev.azure.com", "vsrm.dev.azure.com");
|
|
52
|
+
return tfs_1.TFSServices.getItemContent(url, this.token, "get", null, null);
|
|
70
53
|
}
|
|
71
|
-
GetPipelineRunHistory(projectName, pipelineId) {
|
|
72
|
-
|
|
73
|
-
|
|
74
|
-
|
|
75
|
-
return res;
|
|
76
|
-
});
|
|
54
|
+
async GetPipelineRunHistory(projectName, pipelineId) {
|
|
55
|
+
let url = `${this.orgUrl}${projectName}/_apis/pipelines/${pipelineId}/runs`;
|
|
56
|
+
let res = await tfs_1.TFSServices.getItemContent(url, this.token, "get", null, null);
|
|
57
|
+
return res;
|
|
77
58
|
}
|
|
78
|
-
GetReleaseHistory(projectName, definitionId) {
|
|
79
|
-
|
|
80
|
-
|
|
81
|
-
|
|
82
|
-
|
|
83
|
-
return res;
|
|
84
|
-
});
|
|
59
|
+
async GetReleaseHistory(projectName, definitionId) {
|
|
60
|
+
let url = `${this.orgUrl}${projectName}/_apis/release/releases?definitionId=${definitionId}&$top=2000`;
|
|
61
|
+
url = url.replace("dev.azure.com", "vsrm.dev.azure.com");
|
|
62
|
+
let res = await tfs_1.TFSServices.getItemContent(url, this.token, "get", null, null);
|
|
63
|
+
return res;
|
|
85
64
|
}
|
|
86
|
-
GetAllPipelines(projectName) {
|
|
87
|
-
|
|
88
|
-
|
|
89
|
-
|
|
90
|
-
return res;
|
|
91
|
-
});
|
|
65
|
+
async GetAllPipelines(projectName) {
|
|
66
|
+
let url = `${this.orgUrl}${projectName}/_apis/pipelines?$top=2000`;
|
|
67
|
+
let res = await tfs_1.TFSServices.getItemContent(url, this.token, "get", null, null);
|
|
68
|
+
return res;
|
|
92
69
|
}
|
|
93
|
-
GetAllReleaseDefenitions(projectName) {
|
|
94
|
-
|
|
95
|
-
|
|
96
|
-
|
|
97
|
-
|
|
98
|
-
return res;
|
|
99
|
-
});
|
|
70
|
+
async GetAllReleaseDefenitions(projectName) {
|
|
71
|
+
let url = `${this.orgUrl}${projectName}/_apis/release/definitions?$top=2000`;
|
|
72
|
+
url = url.replace("dev.azure.com", "vsrm.dev.azure.com");
|
|
73
|
+
let res = await tfs_1.TFSServices.getItemContent(url, this.token, "get", null, null);
|
|
74
|
+
return res;
|
|
100
75
|
}
|
|
101
76
|
}
|
|
102
77
|
exports.default = PipelinesDataProvider;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"PipelinesDataProvider.js","sourceRoot":"","sources":["../../src/modules/PipelinesDataProvider.ts"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"PipelinesDataProvider.js","sourceRoot":"","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C,MAAM,GAAG,WAAW,sCAAsC,CAAC;QACrF,GAAG,GAAG,GAAG,CAAC,OAAO,CAAC,eAAe,EAAE,oBAAoB,CAAC,CAAC;QACzD,IAAI,GAAG,GAAQ,MAAM,iBAAW,CAAC,cAAc,CAC7C,GAAG,EACH,IAAI,CAAC,KAAK,EACV,KAAK,EACL,IAAI,EACJ,IAAI,CACL,CAAC;QACF,OAAO,GAAG,CAAC;IACb,CAAC;CACF;AAzID,wCAyIC"}
|
|
@@ -0,0 +1,89 @@
|
|
|
1
|
+
export default class ResultDataProvider {
|
|
2
|
+
orgUrl: string;
|
|
3
|
+
token: string;
|
|
4
|
+
constructor(orgUrl: string, token: string);
|
|
5
|
+
/**
|
|
6
|
+
* Retrieves test suites by test plan ID and processes them into a flat structure with hierarchy names.
|
|
7
|
+
*/
|
|
8
|
+
private fetchTestSuites;
|
|
9
|
+
/**
|
|
10
|
+
* Flattens a hierarchical suite structure into a single-level array.
|
|
11
|
+
*/
|
|
12
|
+
private flattenSuites;
|
|
13
|
+
/**
|
|
14
|
+
* Filters test suites based on the selected suite IDs.
|
|
15
|
+
*/
|
|
16
|
+
private filterSuites;
|
|
17
|
+
/**
|
|
18
|
+
* Creates a quick-lookup map of suites by their IDs.
|
|
19
|
+
*/
|
|
20
|
+
private createSuiteMap;
|
|
21
|
+
/**
|
|
22
|
+
* Constructs the test group name using a hierarchical format.
|
|
23
|
+
*/
|
|
24
|
+
private buildTestGroupName;
|
|
25
|
+
/**
|
|
26
|
+
* Fetches test points by suite ID.
|
|
27
|
+
*/
|
|
28
|
+
private fetchTestPoints;
|
|
29
|
+
/**
|
|
30
|
+
* Maps raw test point data to a simplified object.
|
|
31
|
+
*/
|
|
32
|
+
private mapTestPoint;
|
|
33
|
+
/**
|
|
34
|
+
* Fetches test cases by suite ID.
|
|
35
|
+
*/
|
|
36
|
+
private fetchTestCasesBySuiteId;
|
|
37
|
+
/**
|
|
38
|
+
* Fetches iterations data by run and result IDs.
|
|
39
|
+
*/
|
|
40
|
+
private fetchIterations;
|
|
41
|
+
/**
|
|
42
|
+
* Converts run status from API format to a more readable format.
|
|
43
|
+
*/
|
|
44
|
+
private convertRunStatus;
|
|
45
|
+
/**
|
|
46
|
+
* Parses test steps from XML format into a structured array.
|
|
47
|
+
*/
|
|
48
|
+
private parseTestSteps;
|
|
49
|
+
/**
|
|
50
|
+
* Aligns test steps with their corresponding iterations.
|
|
51
|
+
*/
|
|
52
|
+
private alignStepsWithIterations;
|
|
53
|
+
/**
|
|
54
|
+
* Creates a mapping of iterations by their unique keys.
|
|
55
|
+
*/
|
|
56
|
+
private createIterationsMap;
|
|
57
|
+
/**
|
|
58
|
+
* Fetches test data for all suites, including test points and test cases.
|
|
59
|
+
*/
|
|
60
|
+
private fetchTestData;
|
|
61
|
+
/**
|
|
62
|
+
* Fetches iterations for all test points within the given test data.
|
|
63
|
+
*/
|
|
64
|
+
private fetchAllIterations;
|
|
65
|
+
/**
|
|
66
|
+
* Fetches iteration data for a specific test point.
|
|
67
|
+
*/
|
|
68
|
+
private fetchIterationData;
|
|
69
|
+
/**
|
|
70
|
+
* Combines the results of test group result summary, test results summary, and detailed results summary into a single key-value pair array.
|
|
71
|
+
*/
|
|
72
|
+
getCombinedResultsSummary(testPlanId: string, projectName: string, selectedSuiteIds?: number[], addConfiguration?: boolean, isHierarchyGroupName?: boolean): Promise<any[]>;
|
|
73
|
+
/**
|
|
74
|
+
* Calculates a summary of test group results.
|
|
75
|
+
*/
|
|
76
|
+
private calculateGroupResultSummary;
|
|
77
|
+
/**
|
|
78
|
+
* Calculates the total summary of all test group results.
|
|
79
|
+
*/
|
|
80
|
+
private calculateTotalSummary;
|
|
81
|
+
/**
|
|
82
|
+
* Flattens the test points for easier access.
|
|
83
|
+
*/
|
|
84
|
+
private flattenTestPoints;
|
|
85
|
+
/**
|
|
86
|
+
* Formats a test result for display.
|
|
87
|
+
*/
|
|
88
|
+
private formatTestResult;
|
|
89
|
+
}
|