apex-code-coverage-transformer 1.3.0 → 1.4.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/README.md +2 -2
- package/lib/commands/apex-code-coverage/transformer/transform.js +5 -47
- package/lib/commands/apex-code-coverage/transformer/transform.js.map +1 -1
- package/lib/helpers/convertToGenericCoverageReport.d.ts +2 -0
- package/lib/helpers/convertToGenericCoverageReport.js +27 -0
- package/lib/helpers/convertToGenericCoverageReport.js.map +1 -0
- package/lib/helpers/findFilePath.d.ts +1 -0
- package/lib/helpers/findFilePath.js +52 -0
- package/lib/helpers/findFilePath.js.map +1 -0
- package/messages/transformer.transform.md +1 -1
- package/oclif.manifest.json +2 -2
- package/package.json +9 -2
package/README.md
CHANGED
|
@@ -6,7 +6,7 @@ The `apex-code-coverage-transformer` is a simple Salesforce CLI plugin to transf
|
|
|
6
6
|
|
|
7
7
|
This plugin supports code coverage metrics created for Apex Classes, Apex Triggers, and Flows (if flows are deployed as active in your org).
|
|
8
8
|
|
|
9
|
-
|
|
9
|
+
To create the code coverage JSON during a Salesforce CLI deployment/validation, append `--coverage-formatters json --results-dir coverage` to the `sf project deploy` command:
|
|
10
10
|
|
|
11
11
|
```
|
|
12
12
|
sf project deploy validate -x manifest/package.xml -l RunSpecifiedTests -t {testclasses} --verbose --coverage-formatters json --results-dir coverage
|
|
@@ -16,7 +16,7 @@ This will create a coverage JSON in this relative path - `coverage/coverage/cove
|
|
|
16
16
|
|
|
17
17
|
This JSON isn't accepted by SonarQube automatically and needs to be converted using this plugin.
|
|
18
18
|
|
|
19
|
-
Note
|
|
19
|
+
**Note**: This has been tested and confirmed on code which meets 100% coverage.
|
|
20
20
|
|
|
21
21
|
## Install
|
|
22
22
|
|
|
@@ -3,6 +3,7 @@ import * as fs from 'node:fs';
|
|
|
3
3
|
import * as path from 'node:path';
|
|
4
4
|
import { SfCommand, Flags } from '@salesforce/sf-plugins-core';
|
|
5
5
|
import { Messages } from '@salesforce/core';
|
|
6
|
+
import { convertToGenericCoverageReport } from '../../../helpers/convertToGenericCoverageReport.js';
|
|
6
7
|
Messages.importMessagesDirectoryFromMetaUrl(import.meta.url);
|
|
7
8
|
const messages = Messages.loadMessages('apex-code-coverage-transformer', 'transformer.transform');
|
|
8
9
|
export default class TransformerTransform extends SfCommand {
|
|
@@ -10,10 +11,11 @@ export default class TransformerTransform extends SfCommand {
|
|
|
10
11
|
static description = messages.getMessage('description');
|
|
11
12
|
static examples = messages.getMessages('examples');
|
|
12
13
|
static flags = {
|
|
13
|
-
'dx-directory': Flags.
|
|
14
|
+
'dx-directory': Flags.directory({
|
|
14
15
|
summary: messages.getMessage('flags.dx-directory.summary'),
|
|
15
16
|
char: 'd',
|
|
16
17
|
required: true,
|
|
18
|
+
exists: true,
|
|
17
19
|
default: 'force-app/main/default',
|
|
18
20
|
}),
|
|
19
21
|
'coverage-json': Flags.file({
|
|
@@ -22,7 +24,7 @@ export default class TransformerTransform extends SfCommand {
|
|
|
22
24
|
required: true,
|
|
23
25
|
exists: true,
|
|
24
26
|
}),
|
|
25
|
-
|
|
27
|
+
xml: Flags.file({
|
|
26
28
|
summary: messages.getMessage('flags.xml.summary'),
|
|
27
29
|
char: 'x',
|
|
28
30
|
required: true,
|
|
@@ -43,7 +45,7 @@ export default class TransformerTransform extends SfCommand {
|
|
|
43
45
|
}
|
|
44
46
|
const jsonData = fs.readFileSync(jsonFilePath, 'utf-8');
|
|
45
47
|
const coverageData = JSON.parse(jsonData);
|
|
46
|
-
const xmlData =
|
|
48
|
+
const xmlData = convertToGenericCoverageReport(coverageData, dxDirectory);
|
|
47
49
|
// Write the XML data to the XML file
|
|
48
50
|
try {
|
|
49
51
|
fs.writeFileSync(xmlFilePath, xmlData);
|
|
@@ -57,48 +59,4 @@ export default class TransformerTransform extends SfCommand {
|
|
|
57
59
|
return { path: xmlFilePath };
|
|
58
60
|
}
|
|
59
61
|
}
|
|
60
|
-
function findFilePath(className, dxDirectory) {
|
|
61
|
-
const relativeClassPath = `${dxDirectory}/classes/${className}.cls`;
|
|
62
|
-
const relativeTriggerPath = `${dxDirectory}/triggers/${className}.trigger`;
|
|
63
|
-
const relativeFlowPath = `${dxDirectory}/flows/${className}.flow-meta.xml`;
|
|
64
|
-
const absoluteClassPath = path.resolve(relativeClassPath);
|
|
65
|
-
const absoluteTriggerPath = path.resolve(relativeTriggerPath);
|
|
66
|
-
const absoluteFlowPath = path.resolve(relativeFlowPath);
|
|
67
|
-
if (fs.existsSync(absoluteClassPath)) {
|
|
68
|
-
return relativeClassPath;
|
|
69
|
-
}
|
|
70
|
-
else if (fs.existsSync(absoluteTriggerPath)) {
|
|
71
|
-
return relativeTriggerPath;
|
|
72
|
-
}
|
|
73
|
-
else if (fs.existsSync(absoluteFlowPath)) {
|
|
74
|
-
return relativeFlowPath;
|
|
75
|
-
}
|
|
76
|
-
else {
|
|
77
|
-
throw Error(`The file name ${className} was not found in the classes or triggers directory.`);
|
|
78
|
-
}
|
|
79
|
-
}
|
|
80
|
-
function convertToGenericTestReport(data, dxDirectory) {
|
|
81
|
-
let xml = '<?xml version="1.0"?>\n<coverage version="1">\n';
|
|
82
|
-
for (const className in data) {
|
|
83
|
-
if (Object.prototype.hasOwnProperty.call(data, className)) {
|
|
84
|
-
const classInfo = data[className];
|
|
85
|
-
const formattedClassName = className.replace('no-map/', '');
|
|
86
|
-
const filePath = findFilePath(formattedClassName, dxDirectory);
|
|
87
|
-
xml += `\t<file path="${filePath}">\n`;
|
|
88
|
-
for (const lineNumber in classInfo.s) {
|
|
89
|
-
if (Object.prototype.hasOwnProperty.call(classInfo.s, lineNumber)) {
|
|
90
|
-
const count = classInfo.s[lineNumber];
|
|
91
|
-
const covered = count > 0 ? 'true' : 'false';
|
|
92
|
-
// only add uncovered lines
|
|
93
|
-
if (covered === 'false') {
|
|
94
|
-
xml += `\t\t<lineToCover lineNumber="${lineNumber}" covered="${covered}"/>\n`;
|
|
95
|
-
}
|
|
96
|
-
}
|
|
97
|
-
}
|
|
98
|
-
xml += '\t</file>\n';
|
|
99
|
-
}
|
|
100
|
-
}
|
|
101
|
-
xml += '</coverage>';
|
|
102
|
-
return xml;
|
|
103
|
-
}
|
|
104
62
|
//# sourceMappingURL=transform.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"transform.js","sourceRoot":"","sources":["../../../../src/commands/apex-code-coverage/transformer/transform.ts"],"names":[],"mappings":"AAAA,YAAY,CAAC;AACb,OAAO,KAAK,EAAE,MAAM,SAAS,CAAC;AAC9B,OAAO,KAAK,IAAI,MAAM,WAAW,CAAC;AAElC,OAAO,EAAE,SAAS,EAAE,KAAK,EAAE,MAAM,6BAA6B,CAAC;AAC/D,OAAO,EAAE,QAAQ,EAAE,MAAM,kBAAkB,CAAC;
|
|
1
|
+
{"version":3,"file":"transform.js","sourceRoot":"","sources":["../../../../src/commands/apex-code-coverage/transformer/transform.ts"],"names":[],"mappings":"AAAA,YAAY,CAAC;AACb,OAAO,KAAK,EAAE,MAAM,SAAS,CAAC;AAC9B,OAAO,KAAK,IAAI,MAAM,WAAW,CAAC;AAElC,OAAO,EAAE,SAAS,EAAE,KAAK,EAAE,MAAM,6BAA6B,CAAC;AAC/D,OAAO,EAAE,QAAQ,EAAE,MAAM,kBAAkB,CAAC;AAE5C,OAAO,EAAE,8BAA8B,EAAE,MAAM,oDAAoD,CAAC;AAEpG,QAAQ,CAAC,kCAAkC,CAAC,MAAM,CAAC,IAAI,CAAC,GAAG,CAAC,CAAC;AAC7D,MAAM,QAAQ,GAAG,QAAQ,CAAC,YAAY,CAAC,gCAAgC,EAAE,uBAAuB,CAAC,CAAC;AAMlG,MAAM,CAAC,OAAO,OAAO,oBAAqB,SAAQ,SAAqC;IAC9E,MAAM,CAAU,OAAO,GAAG,QAAQ,CAAC,UAAU,CAAC,SAAS,CAAC,CAAC;IACzD,MAAM,CAAU,WAAW,GAAG,QAAQ,CAAC,UAAU,CAAC,aAAa,CAAC,CAAC;IACjE,MAAM,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CAAC,CAAC;QAC1D,CAAC;QACD,MAAM,QAAQ,GAAG,EAAE,CAAC,YAAY,CAAC,YAAY,EAAE,OAAO,CAAC,CAAC;QACxD,MAAM,YAAY,GAAG,IAAI,CAAC,KAAK,CAAC,QAAQ,CAAiB,CAAC;QAC1D,MAAM,OAAO,GAAG,8BAA8B,CAAC,YAAY,EAAE,WAAW,CAAC,CAAC;QAE1E,qCAAqC;QACrC,IAAI,CAAC;YACH,EAAE,CAAC,aAAa,CAAC,WAAW,EAAE,OAAO,CAAC,CAAC;YACvC,4EAA4E;YAC5E,IAAI,CAAC,GAAG,CAAC,oCAAoC,WAAW,EAAE,CAAC,CAAC;QAC9D,CAAC;QAAC,OAAO,KAAK,EAAE,CAAC;YACf,4EAA4E;YAC5E,IAAI,CAAC,KAAK,CAAC,mCAAmC,KAAK,EAAE,CAAC,CAAC;QACzD,CAAC;QAED,OAAO,EAAE,IAAI,EAAE,WAAW,EAAE,CAAC;IAC/B,CAAC"}
|
|
@@ -0,0 +1,27 @@
|
|
|
1
|
+
'use strict';
|
|
2
|
+
import { findFilePath } from './findFilePath.js';
|
|
3
|
+
export function convertToGenericCoverageReport(data, dxDirectory) {
|
|
4
|
+
let xml = '<?xml version="1.0"?>\n<coverage version="1">\n';
|
|
5
|
+
for (const className in data) {
|
|
6
|
+
if (Object.hasOwn(data, className)) {
|
|
7
|
+
const classInfo = data[className];
|
|
8
|
+
const formattedClassName = className.replace('no-map/', '');
|
|
9
|
+
const filePath = findFilePath(formattedClassName, dxDirectory);
|
|
10
|
+
xml += `\t<file path="${filePath}">\n`;
|
|
11
|
+
for (const lineNumber in classInfo.s) {
|
|
12
|
+
if (Object.hasOwn(classInfo.s, lineNumber)) {
|
|
13
|
+
const count = classInfo.s[lineNumber];
|
|
14
|
+
const covered = count > 0 ? 'true' : 'false';
|
|
15
|
+
// only add uncovered lines
|
|
16
|
+
if (covered === 'false') {
|
|
17
|
+
xml += `\t\t<lineToCover lineNumber="${lineNumber}" covered="${covered}"/>\n`;
|
|
18
|
+
}
|
|
19
|
+
}
|
|
20
|
+
}
|
|
21
|
+
xml += '\t</file>\n';
|
|
22
|
+
}
|
|
23
|
+
}
|
|
24
|
+
xml += '</coverage>';
|
|
25
|
+
return xml;
|
|
26
|
+
}
|
|
27
|
+
//# sourceMappingURL=convertToGenericCoverageReport.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"convertToGenericCoverageReport.js","sourceRoot":"","sources":["../../src/helpers/convertToGenericCoverageReport.ts"],"names":[],"mappings":"AAAA,YAAY,CAAC;AAEb,OAAO,EAAE,YAAY,EAAE,MAAM,mBAAmB,CAAC;AAEjD,MAAM,UAAU,8BAA8B,CAAC,IAAkB,EAAE,WAAmB;IACpF,IAAI,GAAG,GAAG,iDAAiD,CAAC;IAE5D,KAAK,MAAM,SAAS,IAAI,IAAI,EAAE,CAAC;QAC7B,IAAI,MAAM,CAAC,MAAM,CAAC,IAAI,EAAE,SAAS,CAAC,EAAE,CAAC;YACnC,MAAM,SAAS,GAAG,IAAI,CAAC,SAAS,CAAC,CAAC;YAClC,MAAM,kBAAkB,GAAG,SAAS,CAAC,OAAO,CAAC,SAAS,EAAE,EAAE,CAAC,CAAC;YAC5D,MAAM,QAAQ,GAAG,YAAY,CAAC,kBAAkB,EAAE,WAAW,CAAC,CAAC;YAC/D,GAAG,IAAI,iBAAiB,QAAQ,MAAM,CAAC;YAEvC,KAAK,MAAM,UAAU,IAAI,SAAS,CAAC,CAAC,EAAE,CAAC;gBACrC,IAAI,MAAM,CAAC,MAAM,CAAC,SAAS,CAAC,CAAC,EAAE,UAAU,CAAC,EAAE,CAAC;oBAC3C,MAAM,KAAK,GAAG,SAAS,CAAC,CAAC,CAAC,UAAU,CAAC,CAAC;oBACtC,MAAM,OAAO,GAAG,KAAK,GAAG,CAAC,CAAC,CAAC,CAAC,MAAM,CAAC,CAAC,CAAC,OAAO,CAAC;oBAC7C,2BAA2B;oBAC3B,IAAI,OAAO,KAAK,OAAO,EAAE,CAAC;wBACxB,GAAG,IAAI,gCAAgC,UAAU,cAAc,OAAO,OAAO,CAAC;oBAChF,CAAC;gBACH,CAAC;YACH,CAAC;YACD,GAAG,IAAI,aAAa,CAAC;QACvB,CAAC;IACH,CAAC;IACD,GAAG,IAAI,aAAa,CAAC;IACrB,OAAO,GAAG,CAAC;AACb,CAAC"}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export declare function findFilePath(fileName: string, dxDirectory: string): string | null;
|
|
@@ -0,0 +1,52 @@
|
|
|
1
|
+
'use strict';
|
|
2
|
+
import * as fs from 'node:fs';
|
|
3
|
+
import * as path from 'node:path';
|
|
4
|
+
export function findFilePath(fileName, dxDirectory) {
|
|
5
|
+
const fileExtension = fileName.split('.').slice(1).join('.');
|
|
6
|
+
let relativeClassPath = '';
|
|
7
|
+
let relativeTriggerPath = '';
|
|
8
|
+
let relativeFlowPath = '';
|
|
9
|
+
let absoluteClassPath = '';
|
|
10
|
+
let absoluteTriggerPath = '';
|
|
11
|
+
let absoluteFlowPath = '';
|
|
12
|
+
// if file extension is found, use that to determine paths
|
|
13
|
+
if (fileExtension === 'cls') {
|
|
14
|
+
relativeClassPath = `${dxDirectory}/classes/${fileName}`;
|
|
15
|
+
absoluteClassPath = path.resolve(relativeClassPath);
|
|
16
|
+
if (fs.existsSync(absoluteClassPath)) {
|
|
17
|
+
return relativeClassPath;
|
|
18
|
+
}
|
|
19
|
+
}
|
|
20
|
+
else if (fileExtension === 'trigger') {
|
|
21
|
+
relativeTriggerPath = `${dxDirectory}/triggers/${fileName}`;
|
|
22
|
+
absoluteTriggerPath = path.resolve(relativeTriggerPath);
|
|
23
|
+
if (fs.existsSync(absoluteTriggerPath)) {
|
|
24
|
+
return relativeTriggerPath;
|
|
25
|
+
}
|
|
26
|
+
}
|
|
27
|
+
else if (fileExtension === 'flow-meta.xml') {
|
|
28
|
+
relativeFlowPath = `${dxDirectory}/flows/${fileName}`;
|
|
29
|
+
absoluteFlowPath = path.resolve(relativeFlowPath);
|
|
30
|
+
if (fs.existsSync(absoluteFlowPath)) {
|
|
31
|
+
return relativeFlowPath;
|
|
32
|
+
}
|
|
33
|
+
}
|
|
34
|
+
// if file extension is not found, add file extensions manually and test paths
|
|
35
|
+
relativeClassPath = `${dxDirectory}/classes/${fileName}.cls`;
|
|
36
|
+
relativeTriggerPath = `${dxDirectory}/triggers/${fileName}.trigger`;
|
|
37
|
+
relativeFlowPath = `${dxDirectory}/flows/${fileName}.flow-meta.xml`;
|
|
38
|
+
absoluteClassPath = path.resolve(relativeClassPath);
|
|
39
|
+
absoluteTriggerPath = path.resolve(relativeTriggerPath);
|
|
40
|
+
absoluteFlowPath = path.resolve(relativeFlowPath);
|
|
41
|
+
if (fs.existsSync(absoluteClassPath)) {
|
|
42
|
+
return relativeClassPath;
|
|
43
|
+
}
|
|
44
|
+
else if (fs.existsSync(absoluteTriggerPath)) {
|
|
45
|
+
return relativeTriggerPath;
|
|
46
|
+
}
|
|
47
|
+
else if (fs.existsSync(absoluteFlowPath)) {
|
|
48
|
+
return relativeFlowPath;
|
|
49
|
+
}
|
|
50
|
+
throw Error(`The file name ${fileName} was not found in the classes, triggers, or flows directory.`);
|
|
51
|
+
}
|
|
52
|
+
//# sourceMappingURL=findFilePath.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"findFilePath.js","sourceRoot":"","sources":["../../src/helpers/findFilePath.ts"],"names":[],"mappings":"AAAA,YAAY,CAAC;AACb,OAAO,KAAK,EAAE,MAAM,SAAS,CAAC;AAC9B,OAAO,KAAK,IAAI,MAAM,WAAW,CAAC;AAElC,MAAM,UAAU,YAAY,CAAC,QAAgB,EAAE,WAAmB;IAChE,MAAM,aAAa,GAAG,QAAQ,CAAC,KAAK,CAAC,GAAG,CAAC,CAAC,KAAK,CAAC,CAAC,CAAC,CAAC,IAAI,CAAC,GAAG,CAAC,CAAC;IAC7D,IAAI,iBAAiB,GAAG,EAAE,CAAC;IAC3B,IAAI,mB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E,iBAAiB,GAAG,IAAI,CAAC,OAAO,CAAC,iBAAiB,CAAC,CAAC;IACpD,mBAAmB,GAAG,IAAI,CAAC,OAAO,CAAC,mBAAmB,CAAC,CAAC;IACxD,gBAAgB,GAAG,IAAI,CAAC,OAAO,CAAC,gBAAgB,CAAC,CAAC;IAClD,IAAI,EAAE,CAAC,UAAU,CAAC,iBAAiB,CAAC,EAAE,CAAC;QACrC,OAAO,iBAAiB,CAAC;IAC3B,CAAC;SAAM,IAAI,EAAE,CAAC,UAAU,CAAC,mBAAmB,CAAC,EAAE,CAAC;QAC9C,OAAO,mBAAmB,CAAC;IAC7B,CAAC;SAAM,IAAI,EAAE,CAAC,UAAU,CAAC,gBAAgB,CAAC,EAAE,CAAC;QAC3C,OAAO,gBAAgB,CAAC;IAC1B,CAAC;IACD,MAAM,KAAK,CAAC,iBAAiB,QAAQ,8DAA8D,CAAC,CAAC;AACvG,CAAC"}
|
|
@@ -8,7 +8,7 @@ This plugin will convert the JSON file created by the Salesforce CLI during Apex
|
|
|
8
8
|
|
|
9
9
|
# examples
|
|
10
10
|
|
|
11
|
-
- `sf apex-code-coverage transformer transform --json "path-to-cli-coverage.json"`
|
|
11
|
+
- `sf apex-code-coverage transformer transform --coverage-json "path-to-cli-coverage.json"`
|
|
12
12
|
|
|
13
13
|
# flags.dx-directory.summary
|
|
14
14
|
|
package/oclif.manifest.json
CHANGED
|
@@ -5,7 +5,7 @@
|
|
|
5
5
|
"args": {},
|
|
6
6
|
"description": "This plugin will convert the JSON file created by the Salesforce CLI during Apex deployments",
|
|
7
7
|
"examples": [
|
|
8
|
-
"`sf apex-code-coverage transformer transform --json \"path-to-cli-coverage.json\"`"
|
|
8
|
+
"`sf apex-code-coverage transformer transform --coverage-json \"path-to-cli-coverage.json\"`"
|
|
9
9
|
],
|
|
10
10
|
"flags": {
|
|
11
11
|
"json": {
|
|
@@ -73,5 +73,5 @@
|
|
|
73
73
|
]
|
|
74
74
|
}
|
|
75
75
|
},
|
|
76
|
-
"version": "1.
|
|
76
|
+
"version": "1.4.0"
|
|
77
77
|
}
|
package/package.json
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "apex-code-coverage-transformer",
|
|
3
3
|
"description": "Transforms the Apex Code Coverage JSON into the Generic Test Data Report.",
|
|
4
|
-
"version": "1.
|
|
4
|
+
"version": "1.4.0",
|
|
5
5
|
"dependencies": {
|
|
6
6
|
"@oclif/core": "^3.18.1",
|
|
7
7
|
"@salesforce/core": "^6.4.7",
|
|
@@ -183,5 +183,12 @@
|
|
|
183
183
|
},
|
|
184
184
|
"exports": "./lib/index.js",
|
|
185
185
|
"type": "module",
|
|
186
|
-
"author": "Matt Carvin"
|
|
186
|
+
"author": "Matt Carvin",
|
|
187
|
+
"repository": {
|
|
188
|
+
"type": "git",
|
|
189
|
+
"url": "git+https://github.com/mcarvin8/apex-code-coverage-transformer.git"
|
|
190
|
+
},
|
|
191
|
+
"bugs": {
|
|
192
|
+
"url": "https://github.com/mcarvin8/apex-code-coverage-transformer/issues"
|
|
193
|
+
}
|
|
187
194
|
}
|