apex-mutation-testing 1.0.0-dev-6.13527894120-1
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/LICENSE.md +9 -0
- package/README.md +143 -0
- package/lib/adapter/apexClassRepository.d.ts +10 -0
- package/lib/adapter/apexClassRepository.js +34 -0
- package/lib/adapter/apexClassRepository.js.map +1 -0
- package/lib/adapter/apexTestRunner.d.ts +7 -0
- package/lib/adapter/apexTestRunner.js +16 -0
- package/lib/adapter/apexTestRunner.js.map +1 -0
- package/lib/commands/apex/mutation/test/run.d.ts +17 -0
- package/lib/commands/apex/mutation/test/run.js +55 -0
- package/lib/commands/apex/mutation/test/run.js.map +1 -0
- package/lib/mutator/baseListener.d.ts +5 -0
- package/lib/mutator/baseListener.js +5 -0
- package/lib/mutator/baseListener.js.map +1 -0
- package/lib/mutator/boundaryConditionMutator.d.ts +6 -0
- package/lib/mutator/boundaryConditionMutator.js +33 -0
- package/lib/mutator/boundaryConditionMutator.js.map +1 -0
- package/lib/mutator/incrementMutator.d.ts +8 -0
- package/lib/mutator/incrementMutator.js +37 -0
- package/lib/mutator/incrementMutator.js.map +1 -0
- package/lib/mutator/mutationListener.d.ts +9 -0
- package/lib/mutator/mutationListener.js +36 -0
- package/lib/mutator/mutationListener.js.map +1 -0
- package/lib/reporter/HTMLReporter.d.ts +5 -0
- package/lib/reporter/HTMLReporter.js +75 -0
- package/lib/reporter/HTMLReporter.js.map +1 -0
- package/lib/service/mutantGenerator.d.ts +6 -0
- package/lib/service/mutantGenerator.js +28 -0
- package/lib/service/mutantGenerator.js.map +1 -0
- package/lib/service/mutationTestingService.d.ts +17 -0
- package/lib/service/mutationTestingService.js +113 -0
- package/lib/service/mutationTestingService.js.map +1 -0
- package/lib/type/ApexClass.d.ts +4 -0
- package/lib/type/ApexClass.js +2 -0
- package/lib/type/ApexClass.js.map +1 -0
- package/lib/type/ApexMutation.d.ts +6 -0
- package/lib/type/ApexMutation.js +2 -0
- package/lib/type/ApexMutation.js.map +1 -0
- package/lib/type/ApexMutationTestResult.d.ts +22 -0
- package/lib/type/ApexMutationTestResult.js +2 -0
- package/lib/type/ApexMutationTestResult.js.map +1 -0
- package/messages/apex.mutation.test.run.md +49 -0
- package/npm-shrinkwrap.json +13119 -0
- package/oclif.manifest.json +119 -0
- package/package.json +250 -0
|
@@ -0,0 +1,119 @@
|
|
|
1
|
+
{
|
|
2
|
+
"commands": {
|
|
3
|
+
"apex:mutation:test:run": {
|
|
4
|
+
"aliases": [],
|
|
5
|
+
"args": {},
|
|
6
|
+
"description": "The Apex Mutation Testing plugin helps evaluate the effectiveness of your Apex test classes by introducing mutations into your code and checking if your tests can detect these changes:\n\nThe plugin provides insights into how trustworthy your test suite is by measuring its ability to catch intentional code changes.",
|
|
7
|
+
"examples": [
|
|
8
|
+
"Run mutation testing on a class with its test file:\n<%= config.bin %> <%= command.id %> --class-file MyClass --test-file MyClassTest"
|
|
9
|
+
],
|
|
10
|
+
"flags": {
|
|
11
|
+
"json": {
|
|
12
|
+
"description": "Format output as json.",
|
|
13
|
+
"helpGroup": "GLOBAL",
|
|
14
|
+
"name": "json",
|
|
15
|
+
"allowNo": false,
|
|
16
|
+
"type": "boolean"
|
|
17
|
+
},
|
|
18
|
+
"flags-dir": {
|
|
19
|
+
"helpGroup": "GLOBAL",
|
|
20
|
+
"name": "flags-dir",
|
|
21
|
+
"summary": "Import flag values from a directory.",
|
|
22
|
+
"hasDynamicHelp": false,
|
|
23
|
+
"multiple": false,
|
|
24
|
+
"type": "option"
|
|
25
|
+
},
|
|
26
|
+
"apex-class": {
|
|
27
|
+
"char": "c",
|
|
28
|
+
"name": "apex-class",
|
|
29
|
+
"required": true,
|
|
30
|
+
"summary": "Apex class name to mutate",
|
|
31
|
+
"hasDynamicHelp": false,
|
|
32
|
+
"multiple": false,
|
|
33
|
+
"type": "option"
|
|
34
|
+
},
|
|
35
|
+
"test-class": {
|
|
36
|
+
"char": "t",
|
|
37
|
+
"name": "test-class",
|
|
38
|
+
"required": true,
|
|
39
|
+
"summary": "Apex test class name to validate mutations",
|
|
40
|
+
"hasDynamicHelp": false,
|
|
41
|
+
"multiple": false,
|
|
42
|
+
"type": "option"
|
|
43
|
+
},
|
|
44
|
+
"report-dir": {
|
|
45
|
+
"char": "r",
|
|
46
|
+
"name": "report-dir",
|
|
47
|
+
"summary": "Path to the directory where mutation test reports will be generated",
|
|
48
|
+
"default": "mutations",
|
|
49
|
+
"hasDynamicHelp": false,
|
|
50
|
+
"multiple": false,
|
|
51
|
+
"type": "option"
|
|
52
|
+
},
|
|
53
|
+
"target-org": {
|
|
54
|
+
"char": "o",
|
|
55
|
+
"name": "target-org",
|
|
56
|
+
"noCacheDefault": true,
|
|
57
|
+
"required": true,
|
|
58
|
+
"summary": "Username or alias of the target org. Not required if the `target-org` configuration variable is already set.",
|
|
59
|
+
"hasDynamicHelp": true,
|
|
60
|
+
"multiple": false,
|
|
61
|
+
"type": "option"
|
|
62
|
+
},
|
|
63
|
+
"api-version": {
|
|
64
|
+
"description": "Override the api version used for api requests made by this command",
|
|
65
|
+
"name": "api-version",
|
|
66
|
+
"hasDynamicHelp": false,
|
|
67
|
+
"multiple": false,
|
|
68
|
+
"type": "option"
|
|
69
|
+
}
|
|
70
|
+
},
|
|
71
|
+
"hasDynamicHelp": true,
|
|
72
|
+
"hiddenAliases": [],
|
|
73
|
+
"id": "apex:mutation:test:run",
|
|
74
|
+
"pluginAlias": "apex-mutation-testing",
|
|
75
|
+
"pluginName": "apex-mutation-testing",
|
|
76
|
+
"pluginType": "core",
|
|
77
|
+
"strict": true,
|
|
78
|
+
"summary": "Evaluate test coverage quality by injecting mutations and measuring test detection rates",
|
|
79
|
+
"enableJsonFlag": true,
|
|
80
|
+
"isESM": true,
|
|
81
|
+
"relativePath": [
|
|
82
|
+
"lib",
|
|
83
|
+
"commands",
|
|
84
|
+
"apex",
|
|
85
|
+
"mutation",
|
|
86
|
+
"test",
|
|
87
|
+
"run.js"
|
|
88
|
+
],
|
|
89
|
+
"aliasPermutations": [],
|
|
90
|
+
"permutations": [
|
|
91
|
+
"apex:mutation:test:run",
|
|
92
|
+
"mutation:apex:test:run",
|
|
93
|
+
"mutation:test:apex:run",
|
|
94
|
+
"mutation:test:run:apex",
|
|
95
|
+
"apex:test:mutation:run",
|
|
96
|
+
"test:apex:mutation:run",
|
|
97
|
+
"test:mutation:apex:run",
|
|
98
|
+
"test:mutation:run:apex",
|
|
99
|
+
"apex:test:run:mutation",
|
|
100
|
+
"test:apex:run:mutation",
|
|
101
|
+
"test:run:apex:mutation",
|
|
102
|
+
"test:run:mutation:apex",
|
|
103
|
+
"apex:mutation:run:test",
|
|
104
|
+
"mutation:apex:run:test",
|
|
105
|
+
"mutation:run:apex:test",
|
|
106
|
+
"mutation:run:test:apex",
|
|
107
|
+
"apex:run:mutation:test",
|
|
108
|
+
"run:apex:mutation:test",
|
|
109
|
+
"run:mutation:apex:test",
|
|
110
|
+
"run:mutation:test:apex",
|
|
111
|
+
"apex:run:test:mutation",
|
|
112
|
+
"run:apex:test:mutation",
|
|
113
|
+
"run:test:apex:mutation",
|
|
114
|
+
"run:test:mutation:apex"
|
|
115
|
+
]
|
|
116
|
+
}
|
|
117
|
+
},
|
|
118
|
+
"version": "1.0.0-dev-6.13527894120-1"
|
|
119
|
+
}
|
package/package.json
ADDED
|
@@ -0,0 +1,250 @@
|
|
|
1
|
+
{
|
|
2
|
+
"name": "apex-mutation-testing",
|
|
3
|
+
"description": "Apex mutation testing plugin",
|
|
4
|
+
"version": "1.0.0-dev-6.13527894120-1",
|
|
5
|
+
"dependencies": {
|
|
6
|
+
"@oclif/core": "^4.2.8",
|
|
7
|
+
"@salesforce/apex-node": "^8.1.19",
|
|
8
|
+
"@salesforce/core": "^8.8.3",
|
|
9
|
+
"@salesforce/sf-plugins-core": "^12.1.4",
|
|
10
|
+
"@stryker-mutator/core": "^8.7.1",
|
|
11
|
+
"antlr4ts": "^0.5.0-alpha.4",
|
|
12
|
+
"apex-parser": "^2.17.0"
|
|
13
|
+
},
|
|
14
|
+
"devDependencies": {
|
|
15
|
+
"@biomejs/biome": "1.9.4",
|
|
16
|
+
"@commitlint/config-conventional": "^19.7.1",
|
|
17
|
+
"@oclif/plugin-help": "^6.2.26",
|
|
18
|
+
"@salesforce/cli-plugins-testkit": "^5.3.39",
|
|
19
|
+
"@salesforce/dev-config": "^4.3.1",
|
|
20
|
+
"@types/chai": "^5.0.1",
|
|
21
|
+
"@types/jest": "^29.5.14",
|
|
22
|
+
"chai": "^5.2.0",
|
|
23
|
+
"husky": "^9.1.7",
|
|
24
|
+
"jest": "^29.7.0",
|
|
25
|
+
"knip": "^5.45.0",
|
|
26
|
+
"mocha": "^11.1.0",
|
|
27
|
+
"nyc": "^17.1.0",
|
|
28
|
+
"oclif": "^4.17.32",
|
|
29
|
+
"shx": "^0.3.4",
|
|
30
|
+
"ts-jest": "^29.2.6",
|
|
31
|
+
"ts-node": "^10.9.2",
|
|
32
|
+
"tslib": "^2.8.1",
|
|
33
|
+
"typescript": "^5.7.3",
|
|
34
|
+
"wireit": "^0.14.11"
|
|
35
|
+
},
|
|
36
|
+
"engines": {
|
|
37
|
+
"node": ">=18.6.0"
|
|
38
|
+
},
|
|
39
|
+
"files": [
|
|
40
|
+
"/lib",
|
|
41
|
+
"/messages",
|
|
42
|
+
"/npm-shrinkwrap.json",
|
|
43
|
+
"/oclif.manifest.json",
|
|
44
|
+
"/oclif.lock"
|
|
45
|
+
],
|
|
46
|
+
"keywords": [
|
|
47
|
+
"sf",
|
|
48
|
+
"sf-plugin",
|
|
49
|
+
"apex",
|
|
50
|
+
"test",
|
|
51
|
+
"mutation"
|
|
52
|
+
],
|
|
53
|
+
"license": "MIT",
|
|
54
|
+
"oclif": {
|
|
55
|
+
"commands": "./lib/commands",
|
|
56
|
+
"bin": "sf",
|
|
57
|
+
"topicSeparator": " ",
|
|
58
|
+
"flexibleTaxonomy": true,
|
|
59
|
+
"devPlugins": [
|
|
60
|
+
"@oclif/plugin-help"
|
|
61
|
+
]
|
|
62
|
+
},
|
|
63
|
+
"scripts": {
|
|
64
|
+
"build": "wireit",
|
|
65
|
+
"clean:package-manager": "wireit",
|
|
66
|
+
"clean": "wireit",
|
|
67
|
+
"compile": "wireit",
|
|
68
|
+
"dependencies:upgrade": "npx npm-check-updates -u ; npm install ; npm audit fix",
|
|
69
|
+
"lint": "wireit",
|
|
70
|
+
"lint:dependencies": "wireit",
|
|
71
|
+
"lint:fix": "wireit",
|
|
72
|
+
"lint:staged": "wireit",
|
|
73
|
+
"postpack": "shx rm -f oclif.manifest.json",
|
|
74
|
+
"prepack": "wireit",
|
|
75
|
+
"prepare": "husky",
|
|
76
|
+
"prepublishOnly": "npm shrinkwrap",
|
|
77
|
+
"test:build": "wireit",
|
|
78
|
+
"test:nut": "wireit",
|
|
79
|
+
"test:unit": "wireit",
|
|
80
|
+
"test": "wireit"
|
|
81
|
+
},
|
|
82
|
+
"publishConfig": {
|
|
83
|
+
"access": "public"
|
|
84
|
+
},
|
|
85
|
+
"wireit": {
|
|
86
|
+
"build": {
|
|
87
|
+
"dependencies": [
|
|
88
|
+
"compile",
|
|
89
|
+
"lint"
|
|
90
|
+
]
|
|
91
|
+
},
|
|
92
|
+
"clean": {
|
|
93
|
+
"command": "shx rm -rf 'reports/*' .nyc_output oclif.manifest.json package.tgz 'sfdx-git-delta-*.tgz' 'stderr*.txt' 'stdout*.txt' '.stryker-tmp/*' perf-result.txt",
|
|
94
|
+
"files": [
|
|
95
|
+
"lib",
|
|
96
|
+
"reports/*",
|
|
97
|
+
".nyc_output",
|
|
98
|
+
"oclif.manifest.json",
|
|
99
|
+
"package.tgz",
|
|
100
|
+
"sfdx-git-delta-v*.tgz",
|
|
101
|
+
"stderr*.txt",
|
|
102
|
+
"stdout*.txt",
|
|
103
|
+
".stryker-tmp/*",
|
|
104
|
+
"perf-result.txt"
|
|
105
|
+
],
|
|
106
|
+
"dependencies": [
|
|
107
|
+
"clean:build"
|
|
108
|
+
]
|
|
109
|
+
},
|
|
110
|
+
"clean:build": {
|
|
111
|
+
"command": "shx rm -rf lib",
|
|
112
|
+
"files": [
|
|
113
|
+
"lib/*"
|
|
114
|
+
]
|
|
115
|
+
},
|
|
116
|
+
"clean:package-manager": {
|
|
117
|
+
"command": "shx rm -rf node_modules tsconfig.tsbuildinfo .wireit",
|
|
118
|
+
"files": [
|
|
119
|
+
"node_modules/*"
|
|
120
|
+
]
|
|
121
|
+
},
|
|
122
|
+
"compile": {
|
|
123
|
+
"command": "tsc -p . --pretty --incremental",
|
|
124
|
+
"files": [
|
|
125
|
+
"src/**/*.ts",
|
|
126
|
+
"**/tsconfig.json",
|
|
127
|
+
"messages/**"
|
|
128
|
+
],
|
|
129
|
+
"output": [
|
|
130
|
+
"lib/**",
|
|
131
|
+
"*.tsbuildinfo"
|
|
132
|
+
],
|
|
133
|
+
"clean": "if-file-deleted"
|
|
134
|
+
},
|
|
135
|
+
"lint": {
|
|
136
|
+
"command": "npx @biomejs/biome check --error-on-warnings --no-errors-on-unmatched src test",
|
|
137
|
+
"files": [
|
|
138
|
+
"src/**",
|
|
139
|
+
"test/**/*.ts",
|
|
140
|
+
"messages/**",
|
|
141
|
+
"**/biome.json",
|
|
142
|
+
"**/tsconfig.json"
|
|
143
|
+
],
|
|
144
|
+
"output": []
|
|
145
|
+
},
|
|
146
|
+
"lint:dependencies": {
|
|
147
|
+
"command": "knip",
|
|
148
|
+
"files": [
|
|
149
|
+
"src/**/*.ts",
|
|
150
|
+
"test/**/*.ts",
|
|
151
|
+
"messages/**",
|
|
152
|
+
"**/tsconfig.json",
|
|
153
|
+
"knip.config.ts"
|
|
154
|
+
],
|
|
155
|
+
"output": [],
|
|
156
|
+
"dependencies": [
|
|
157
|
+
"lint"
|
|
158
|
+
]
|
|
159
|
+
},
|
|
160
|
+
"lint:fix": {
|
|
161
|
+
"command": "npx @biomejs/biome check --error-on-warnings --no-errors-on-unmatched src test --fix --unsafe ",
|
|
162
|
+
"files": [
|
|
163
|
+
"src/**",
|
|
164
|
+
"test/**/*.ts",
|
|
165
|
+
"messages/**",
|
|
166
|
+
"**/biome.json",
|
|
167
|
+
"**/tsconfig.json"
|
|
168
|
+
],
|
|
169
|
+
"output": []
|
|
170
|
+
},
|
|
171
|
+
"lint:staged": {
|
|
172
|
+
"command": "npx @biomejs/biome check --error-on-warnings --no-errors-on-unmatched --staged src test",
|
|
173
|
+
"files": [
|
|
174
|
+
"src/**",
|
|
175
|
+
"test/**/*.ts",
|
|
176
|
+
"messages/**",
|
|
177
|
+
"**/biome.json",
|
|
178
|
+
"**/tsconfig.json"
|
|
179
|
+
],
|
|
180
|
+
"output": []
|
|
181
|
+
},
|
|
182
|
+
"prepack": {
|
|
183
|
+
"command": "oclif manifest && oclif readme",
|
|
184
|
+
"files": [
|
|
185
|
+
"src/commands/apex/mutation/test/run.ts",
|
|
186
|
+
"messages/apex.mutation.test.run.md",
|
|
187
|
+
"README.md"
|
|
188
|
+
],
|
|
189
|
+
"dependencies": [
|
|
190
|
+
"build"
|
|
191
|
+
],
|
|
192
|
+
"output": [
|
|
193
|
+
"README.md"
|
|
194
|
+
],
|
|
195
|
+
"clean": false
|
|
196
|
+
},
|
|
197
|
+
"test": {
|
|
198
|
+
"dependencies": [
|
|
199
|
+
"build",
|
|
200
|
+
"lint",
|
|
201
|
+
"test:unit",
|
|
202
|
+
"test:nut",
|
|
203
|
+
"test:e2e"
|
|
204
|
+
]
|
|
205
|
+
},
|
|
206
|
+
"test:build": {
|
|
207
|
+
"command": "npm install && npm pack && npm run test",
|
|
208
|
+
"dependencies": [
|
|
209
|
+
"clean",
|
|
210
|
+
"clean:package-manager"
|
|
211
|
+
]
|
|
212
|
+
},
|
|
213
|
+
"test:e2e": {
|
|
214
|
+
"command": "echo 'No e2e tests'"
|
|
215
|
+
},
|
|
216
|
+
"test:nut": {
|
|
217
|
+
"command": "nyc mocha -r ts-node/register **/*.nut.ts",
|
|
218
|
+
"files": [
|
|
219
|
+
"src/**/*.ts",
|
|
220
|
+
"test/**/*.ts",
|
|
221
|
+
"messages/**",
|
|
222
|
+
"**/tsconfig.json"
|
|
223
|
+
],
|
|
224
|
+
"output": [
|
|
225
|
+
".nyc_output/**"
|
|
226
|
+
],
|
|
227
|
+
"dependencies": [
|
|
228
|
+
"lint",
|
|
229
|
+
"build"
|
|
230
|
+
]
|
|
231
|
+
},
|
|
232
|
+
"test:unit": {
|
|
233
|
+
"command": "jest --coverage",
|
|
234
|
+
"files": [
|
|
235
|
+
"src/**/*.ts",
|
|
236
|
+
"__tests__/**/*.ts",
|
|
237
|
+
"messages/**",
|
|
238
|
+
"**/tsconfig.json"
|
|
239
|
+
],
|
|
240
|
+
"output": [
|
|
241
|
+
"reports/coverage/**"
|
|
242
|
+
],
|
|
243
|
+
"dependencies": [
|
|
244
|
+
"lint"
|
|
245
|
+
]
|
|
246
|
+
}
|
|
247
|
+
},
|
|
248
|
+
"type": "module",
|
|
249
|
+
"author": "Sébastien Colladon (colladonsebastien@gmail.com)"
|
|
250
|
+
}
|