@salesforce/plugin-apex 3.6.13 → 3.6.15

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 CHANGED
@@ -148,7 +148,7 @@ FLAG DESCRIPTIONS
148
148
  directory.
149
149
  ```
150
150
 
151
- _See code: [src/commands/apex/get/log.ts](https://github.com/salesforcecli/plugin-apex/blob/3.6.13/src/commands/apex/get/log.ts)_
151
+ _See code: [src/commands/apex/get/log.ts](https://github.com/salesforcecli/plugin-apex/blob/3.6.15/src/commands/apex/get/log.ts)_
152
152
 
153
153
  ## `sf apex get test`
154
154
 
@@ -208,7 +208,7 @@ EXAMPLES
208
208
  me@myorg'
209
209
  ```
210
210
 
211
- _See code: [src/commands/apex/get/test.ts](https://github.com/salesforcecli/plugin-apex/blob/3.6.13/src/commands/apex/get/test.ts)_
211
+ _See code: [src/commands/apex/get/test.ts](https://github.com/salesforcecli/plugin-apex/blob/3.6.15/src/commands/apex/get/test.ts)_
212
212
 
213
213
  ## `sf apex list log`
214
214
 
@@ -248,7 +248,7 @@ EXAMPLES
248
248
  $ sf apex list log --target-org me@my.org
249
249
  ```
250
250
 
251
- _See code: [src/commands/apex/list/log.ts](https://github.com/salesforcecli/plugin-apex/blob/3.6.13/src/commands/apex/list/log.ts)_
251
+ _See code: [src/commands/apex/list/log.ts](https://github.com/salesforcecli/plugin-apex/blob/3.6.15/src/commands/apex/list/log.ts)_
252
252
 
253
253
  ## `sf apex run`
254
254
 
@@ -295,7 +295,7 @@ EXAMPLES
295
295
  $ sf apex run
296
296
  ```
297
297
 
298
- _See code: [src/commands/apex/run.ts](https://github.com/salesforcecli/plugin-apex/blob/3.6.13/src/commands/apex/run.ts)_
298
+ _See code: [src/commands/apex/run.ts](https://github.com/salesforcecli/plugin-apex/blob/3.6.15/src/commands/apex/run.ts)_
299
299
 
300
300
  ## `sf apex run test`
301
301
 
@@ -438,7 +438,7 @@ FLAG DESCRIPTIONS
438
438
  --tests Test1 --tests Test2
439
439
  ```
440
440
 
441
- _See code: [src/commands/apex/run/test.ts](https://github.com/salesforcecli/plugin-apex/blob/3.6.13/src/commands/apex/run/test.ts)_
441
+ _See code: [src/commands/apex/run/test.ts](https://github.com/salesforcecli/plugin-apex/blob/3.6.15/src/commands/apex/run/test.ts)_
442
442
 
443
443
  ## `sf apex tail log`
444
444
 
@@ -481,6 +481,6 @@ EXAMPLES
481
481
  $ sf apex tail log --color --skip-trace-flag
482
482
  ```
483
483
 
484
- _See code: [src/commands/apex/tail/log.ts](https://github.com/salesforcecli/plugin-apex/blob/3.6.13/src/commands/apex/tail/log.ts)_
484
+ _See code: [src/commands/apex/tail/log.ts](https://github.com/salesforcecli/plugin-apex/blob/3.6.15/src/commands/apex/tail/log.ts)_
485
485
 
486
486
  <!-- commandsstop -->
@@ -106,25 +106,18 @@
106
106
  "run:apex"
107
107
  ]
108
108
  },
109
- "apex:run:test": {
109
+ "apex:get:log": {
110
110
  "aliases": [
111
- "force:apex:test:run"
111
+ "force:apex:log:get"
112
112
  ],
113
113
  "args": {},
114
114
  "deprecateAliases": true,
115
- "description": "Specify which tests to run by using the --class-names, --suite-names, or --tests flags. Alternatively, use the --test-level flag to run all the tests in your org, local tests, or specified tests.\n\nTo see code coverage results, use the --code-coverage flag with --result-format. The output displays a high-level summary of the test run and the code coverage values for classes in your org. If you specify human-readable result format, use the --detailed-coverage flag to see detailed coverage results for each test method run.\n\nBy default, Apex tests run asynchronously and immediately return a test run ID. You can use the --wait flag to specify the number of minutes to wait; if the tests finish in that timeframe, the command displays the results. If the tests haven't finished by the end of the wait time, the command displays a test run ID. Use the \"<%= config.bin %> apex get test --test-run-id\" command to get the results.\n\nYou must have the \"View All Data\" system permission to use this command. The permission is disabled by default and can be enabled only by a system administrator.\n\nNOTE: The testRunCoverage value (JSON and JUnit result formats) is a percentage of the covered lines and total lines from all the Apex classes evaluated by the tests in this run.",
115
+ "description": "To get the IDs for your debug logs, run \"<%= config.bin %> apex log list\". Executing this command without flags returns the most recent log.",
116
116
  "examples": [
117
- "Run all Apex tests and suites in your default org:\n<%= config.bin %> <%= command.id %>",
118
- "Run the specified Apex test classes in your default org and display results in human-readable form:\n<%= config.bin %> <%= command.id %> --class-names MyClassTest --class-names MyOtherClassTest --result-format human",
119
- "Run the specified Apex test suites in your default org and include code coverage results and additional details:\n<%= config.bin %> <%= command.id %> --suite-names MySuite --suite-names MyOtherSuite --code-coverage --detailed-coverage",
120
- "Run the specified Apex tests in your default org and display results in human-readable output:\n<%= config.bin %> <%= command.id %> --tests MyClassTest.testCoolFeature --tests MyClassTest.testAwesomeFeature --tests AnotherClassTest --tests namespace.TheirClassTest.testThis --result-format human",
121
- "Run all tests in the org with the specified username with the specified test level; save the output to the specified directory:\n<%= config.bin %> <%= command.id %> --test-level RunLocalTests --output-dir <path to outputdir> --target-org me@my.org",
122
- "Run all tests in the org asynchronously:\n<%= config.bin %> <%= command.id %> --target-org myscratch",
123
- "Run all tests synchronously; the command waits to display the test results until all tests finish:\n<%= config.bin %> <%= command.id %> --synchronous",
124
- "Run specific tests using the --test-level flag:\n<%= config.bin %> <%= command.id %> --test-level RunLocalTests",
125
- "Run Apex tests on all the methods in the specified class; output results in Test Anything Protocol (TAP) format and request code coverage results:\n<%= config.bin %> <%= command.id %> --class-names TestA --class-names TestB --result-format tap --code-coverage",
126
- "Run Apex tests on methods specified using the standard Class.method notation; if you specify a test class without a method, the command runs all methods in the class:\n<%= config.bin %> <%= command.id %> --tests TestA.excitingMethod --tests TestA.boringMethod --tests TestB",
127
- "Run Apex tests on methods specified using the standard Class.method notation with a namespace:\n<%= config.bin %> <%= command.id %> --tests ns.TestA.excitingMethod --tests ns.TestA.boringMethod --tests ns.TestB"
117
+ "Fetch the log in your default org using an ID:\n<%= config.bin %> <%= command.id %> --log-id <log id>",
118
+ "Fetch the log in the org with the specified username using an ID:\n<%= config.bin %> <%= command.id %> --log-id <log id> --target-org me@my.org",
119
+ "Fetch the two most recent logs in your default org:\n<%= config.bin %> <%= command.id %> --number 2",
120
+ "Similar to previous example, but save the two log files in the specified directory:\n<%= config.bin %> <%= command.id %> --output-dir /Users/sfdxUser/logs --number 2"
128
121
  ],
129
122
  "flags": {
130
123
  "json": {
@@ -178,215 +171,105 @@
178
171
  "multiple": false,
179
172
  "type": "option"
180
173
  },
181
- "code-coverage": {
182
- "aliases": [
183
- "codecoverage"
184
- ],
185
- "char": "c",
186
- "deprecateAliases": true,
187
- "name": "code-coverage",
188
- "summary": "Retrieve code coverage results.",
189
- "allowNo": false,
190
- "type": "boolean"
191
- },
192
- "output-dir": {
193
- "aliases": [
194
- "outputdir",
195
- "output-directory"
196
- ],
197
- "char": "d",
198
- "deprecateAliases": true,
199
- "name": "output-dir",
200
- "summary": "Directory in which to store test run files.",
201
- "hasDynamicHelp": false,
202
- "multiple": false,
203
- "type": "option"
204
- },
205
- "test-level": {
174
+ "log-id": {
206
175
  "aliases": [
207
- "testlevel"
176
+ "logid"
208
177
  ],
209
- "char": "l",
178
+ "char": "i",
210
179
  "deprecateAliases": true,
211
- "description": "Here's what the levels mean:\n\n- RunSpecifiedTests — Only the tests that you specify in the runTests option are run. Code coverage requirements differ from the default coverage requirements when using this test level. The executed tests must cover each class and trigger in the deployment package for a minimum of 75% code coverage. This coverage is computed for each class and triggers individually, and is different than the overall coverage percentage.\n- RunLocalTests — All local tests in your org, including tests that originate from no-namespaced unlocked packages, are run. The tests that originate from installed managed packages and namespaced unlocked packages aren't run. This test level is the default for production deployments that include Apex classes or triggers.\n- RunAllTestsInOrg — All tests are run. The tests include all tests in your org.",
212
- "name": "test-level",
213
- "summary": "Level of tests to run; default is RunLocalTests.",
180
+ "name": "log-id",
181
+ "summary": "ID of the specific log to display.",
214
182
  "hasDynamicHelp": false,
215
183
  "multiple": false,
216
- "options": [
217
- "RunLocalTests",
218
- "RunAllTestsInOrg",
219
- "RunSpecifiedTests"
220
- ],
221
184
  "type": "option"
222
185
  },
223
- "class-names": {
224
- "aliases": [
225
- "classnames"
226
- ],
186
+ "number": {
227
187
  "char": "n",
228
- "deprecateAliases": true,
229
- "description": "If you select --class-names, you can't specify --suite-names or --tests.\nFor multiple classes, repeat the flag for each.\n--class-names Class1 --class-names Class2",
230
- "exclusive": [
231
- "suite-names",
232
- "tests"
233
- ],
234
- "name": "class-names",
235
- "summary": "Apex test class names to run; default is all classes.",
236
- "delimiter": ",",
237
- "hasDynamicHelp": false,
238
- "multiple": true,
239
- "type": "option"
240
- },
241
- "result-format": {
242
- "aliases": [
243
- "resultformat"
244
- ],
245
- "char": "r",
246
- "deprecateAliases": true,
247
- "name": "result-format",
248
- "summary": "Format of the test results.",
249
- "default": "human",
188
+ "name": "number",
189
+ "summary": "Number of the most recent logs to display.",
250
190
  "hasDynamicHelp": false,
251
191
  "multiple": false,
252
- "options": [
253
- "human",
254
- "tap",
255
- "junit",
256
- "json"
257
- ],
258
192
  "type": "option"
259
193
  },
260
- "suite-names": {
194
+ "output-dir": {
261
195
  "aliases": [
262
- "suitenames"
196
+ "outputdir",
197
+ "output-directory"
263
198
  ],
264
- "char": "s",
199
+ "char": "d",
265
200
  "deprecateAliases": true,
266
- "description": "If you select --suite-names, you can't specify --class-names or --tests.\nFor multiple suites, repeat the flag for each.\n--suite-names Suite1 --suite-names Suite2",
267
- "exclusive": [
268
- "class-names",
269
- "tests"
270
- ],
271
- "name": "suite-names",
272
- "summary": "Apex test suite names to run.",
273
- "delimiter": ",",
274
- "hasDynamicHelp": false,
275
- "multiple": true,
276
- "type": "option"
277
- },
278
- "tests": {
279
- "char": "t",
280
- "description": "If you specify --tests, you can't specify --class-names or --suite-names\nFor multiple tests, repeat the flag for each.\n--tests Test1 --tests Test2",
281
- "exclusive": [
282
- "class-names",
283
- "suite-names"
284
- ],
285
- "name": "tests",
286
- "summary": "Apex test class names or IDs and, if applicable, test methods to run; default is all tests.",
287
- "delimiter": ",",
201
+ "description": "The location can be an absolute path or relative to the current working directory. The default is the current directory.",
202
+ "name": "output-dir",
203
+ "summary": "Directory for saving the log files.",
288
204
  "hasDynamicHelp": false,
289
- "multiple": true,
290
- "type": "option"
291
- },
292
- "wait": {
293
- "char": "w",
294
- "name": "wait",
295
- "summary": "Sets the streaming client socket timeout in minutes; specify a longer wait time if timeouts occur frequently.",
296
- "hasDynamicHelp": true,
297
205
  "multiple": false,
298
206
  "type": "option"
299
- },
300
- "synchronous": {
301
- "char": "y",
302
- "name": "synchronous",
303
- "summary": "Runs test methods from a single Apex class synchronously; if not specified, tests are run asynchronously.",
304
- "allowNo": false,
305
- "type": "boolean"
306
- },
307
- "detailed-coverage": {
308
- "aliases": [
309
- "detailedcoverage"
310
- ],
311
- "char": "v",
312
- "dependsOn": [
313
- "code-coverage"
314
- ],
315
- "deprecateAliases": true,
316
- "name": "detailed-coverage",
317
- "summary": "Display detailed code coverage per test.",
318
- "allowNo": false,
319
- "type": "boolean"
320
- },
321
- "concise": {
322
- "name": "concise",
323
- "summary": "Display only failed test results; works with human-readable output only.",
324
- "allowNo": false,
325
- "type": "boolean"
326
207
  }
327
208
  },
328
209
  "hasDynamicHelp": true,
329
210
  "hiddenAliases": [],
330
- "id": "apex:run:test",
211
+ "id": "apex:get:log",
331
212
  "pluginAlias": "@salesforce/plugin-apex",
332
213
  "pluginName": "@salesforce/plugin-apex",
333
214
  "pluginType": "core",
334
215
  "strict": true,
335
- "summary": "Invoke Apex tests in an org.",
216
+ "summary": "Fetch the specified log or given number of most recent logs from the org.",
336
217
  "enableJsonFlag": true,
337
218
  "isESM": true,
338
219
  "relativePath": [
339
220
  "lib",
340
221
  "commands",
341
222
  "apex",
342
- "run",
343
- "test.js"
223
+ "get",
224
+ "log.js"
344
225
  ],
345
226
  "aliasPermutations": [
346
- "force:apex:test:run",
347
- "apex:force:test:run",
348
- "apex:test:force:run",
349
- "apex:test:run:force",
350
- "force:test:apex:run",
351
- "test:force:apex:run",
352
- "test:apex:force:run",
353
- "test:apex:run:force",
354
- "force:test:run:apex",
355
- "test:force:run:apex",
356
- "test:run:force:apex",
357
- "test:run:apex:force",
358
- "force:apex:run:test",
359
- "apex:force:run:test",
360
- "apex:run:force:test",
361
- "apex:run:test:force",
362
- "force:run:apex:test",
363
- "run:force:apex:test",
364
- "run:apex:force:test",
365
- "run:apex:test:force",
366
- "force:run:test:apex",
367
- "run:force:test:apex",
368
- "run:test:force:apex",
369
- "run:test:apex:force"
227
+ "force:apex:log:get",
228
+ "apex:force:log:get",
229
+ "apex:log:force:get",
230
+ "apex:log:get:force",
231
+ "force:log:apex:get",
232
+ "log:force:apex:get",
233
+ "log:apex:force:get",
234
+ "log:apex:get:force",
235
+ "force:log:get:apex",
236
+ "log:force:get:apex",
237
+ "log:get:force:apex",
238
+ "log:get:apex:force",
239
+ "force:apex:get:log",
240
+ "apex:force:get:log",
241
+ "apex:get:force:log",
242
+ "apex:get:log:force",
243
+ "force:get:apex:log",
244
+ "get:force:apex:log",
245
+ "get:apex:force:log",
246
+ "get:apex:log:force",
247
+ "force:get:log:apex",
248
+ "get:force:log:apex",
249
+ "get:log:force:apex",
250
+ "get:log:apex:force"
370
251
  ],
371
252
  "permutations": [
372
- "apex:run:test",
373
- "run:apex:test",
374
- "run:test:apex",
375
- "apex:test:run",
376
- "test:apex:run",
377
- "test:run:apex"
253
+ "apex:get:log",
254
+ "get:apex:log",
255
+ "get:log:apex",
256
+ "apex:log:get",
257
+ "log:apex:get",
258
+ "log:get:apex"
378
259
  ]
379
260
  },
380
- "apex:list:log": {
261
+ "apex:get:test": {
381
262
  "aliases": [
382
- "force:apex:log:list"
263
+ "force:apex:test:report"
383
264
  ],
384
265
  "args": {},
385
266
  "deprecateAliases": true,
386
- "description": "Run this command in a project to list the IDs and general information for all debug logs in your default org.\n\nTo fetch a specific log from your org, obtain the ID from this command's output, then run the “<%= config.bin %> apex log get” command.",
267
+ "description": "Provide a test run ID to display test results for an enqueued or completed asynchronous test run. The test run ID is displayed after running the \"<%= config.bin %> apex test run\" command.\n\nTo see code coverage results, use the --code-coverage flag with --result-format. The output displays a high-level summary of the test run and the code coverage values for classes in your org. If you specify human-readable result format, use the --detailed-coverage flag to see detailed coverage results for each test method run.",
387
268
  "examples": [
388
- "List the IDs and information about the debug logs in your default org:\n<%= config.bin %> <%= command.id %>",
389
- "Similar to previous example, but use the org with the specified username:\n<%= config.bin %> <%= command.id %> --target-org me@my.org"
269
+ "Display test results for your default org using a test run ID:\n<%= config.bin %> <%= command.id %> --test-run-id <test run id>",
270
+ "Similar to previous example, but output the result in JUnit format:\n<%= config.bin %> <%= command.id %> --test-run-id <test run id> --result-format junit",
271
+ "Also retrieve code coverage results and output in JSON format:\n<%= config.bin %> <%= command.id %> --test-run-id <test run id> --code-coverage --json",
272
+ "Specify a directory in which to save the test results from the org with the specified username (rather than your default org):\n<%= config.bin %> <%= command.id %> --test-run-id <test run id> --code-coverage --output-dir <path to outputdir> --target-org me@myorg'"
390
273
  ],
391
274
  "flags": {
392
275
  "json": {
@@ -439,168 +322,87 @@
439
322
  "hasDynamicHelp": false,
440
323
  "multiple": false,
441
324
  "type": "option"
442
- }
443
- },
444
- "hasDynamicHelp": true,
445
- "hiddenAliases": [],
446
- "id": "apex:list:log",
447
- "pluginAlias": "@salesforce/plugin-apex",
448
- "pluginName": "@salesforce/plugin-apex",
449
- "pluginType": "core",
450
- "strict": true,
451
- "summary": "Display a list of IDs and general information about debug logs.",
452
- "enableJsonFlag": true,
453
- "isESM": true,
454
- "relativePath": [
455
- "lib",
456
- "commands",
457
- "apex",
458
- "list",
459
- "log.js"
460
- ],
461
- "aliasPermutations": [
462
- "force:apex:log:list",
463
- "apex:force:log:list",
464
- "apex:log:force:list",
465
- "apex:log:list:force",
466
- "force:log:apex:list",
467
- "log:force:apex:list",
468
- "log:apex:force:list",
469
- "log:apex:list:force",
470
- "force:log:list:apex",
471
- "log:force:list:apex",
472
- "log:list:force:apex",
473
- "log:list:apex:force",
474
- "force:apex:list:log",
475
- "apex:force:list:log",
476
- "apex:list:force:log",
477
- "apex:list:log:force",
478
- "force:list:apex:log",
479
- "list:force:apex:log",
480
- "list:apex:force:log",
481
- "list:apex:log:force",
482
- "force:list:log:apex",
483
- "list:force:log:apex",
484
- "list:log:force:apex",
485
- "list:log:apex:force"
486
- ],
487
- "permutations": [
488
- "apex:list:log",
489
- "list:apex:log",
490
- "list:log:apex",
491
- "apex:log:list",
492
- "log:apex:list",
493
- "log:list:apex"
494
- ]
495
- },
496
- "apex:get:log": {
497
- "aliases": [
498
- "force:apex:log:get"
499
- ],
500
- "args": {},
501
- "deprecateAliases": true,
502
- "description": "To get the IDs for your debug logs, run \"<%= config.bin %> apex log list\". Executing this command without flags returns the most recent log.",
503
- "examples": [
504
- "Fetch the log in your default org using an ID:\n<%= config.bin %> <%= command.id %> --log-id <log id>",
505
- "Fetch the log in the org with the specified username using an ID:\n<%= config.bin %> <%= command.id %> --log-id <log id> --target-org me@my.org",
506
- "Fetch the two most recent logs in your default org:\n<%= config.bin %> <%= command.id %> --number 2",
507
- "Similar to previous example, but save the two log files in the specified directory:\n<%= config.bin %> <%= command.id %> --output-dir /Users/sfdxUser/logs --number 2"
508
- ],
509
- "flags": {
510
- "json": {
511
- "description": "Format output as json.",
512
- "helpGroup": "GLOBAL",
513
- "name": "json",
514
- "allowNo": false,
515
- "type": "boolean"
516
- },
517
- "flags-dir": {
518
- "helpGroup": "GLOBAL",
519
- "name": "flags-dir",
520
- "summary": "Import flag values from a directory.",
521
- "hasDynamicHelp": false,
522
- "multiple": false,
523
- "type": "option"
524
325
  },
525
- "target-org": {
326
+ "test-run-id": {
526
327
  "aliases": [
527
- "targetusername",
528
- "u"
328
+ "testrunid"
529
329
  ],
530
- "char": "o",
330
+ "char": "i",
531
331
  "deprecateAliases": true,
532
- "name": "target-org",
533
- "noCacheDefault": true,
332
+ "name": "test-run-id",
534
333
  "required": true,
535
- "summary": "Username or alias of the target org. Not required if the `target-org` configuration variable is already set.",
536
- "hasDynamicHelp": true,
334
+ "summary": "ID of the test run.",
335
+ "hasDynamicHelp": false,
537
336
  "multiple": false,
538
337
  "type": "option"
539
338
  },
540
- "api-version": {
339
+ "code-coverage": {
541
340
  "aliases": [
542
- "apiversion"
341
+ "codecoverage"
543
342
  ],
343
+ "char": "c",
544
344
  "deprecateAliases": true,
545
- "description": "Override the api version used for api requests made by this command",
546
- "name": "api-version",
547
- "hasDynamicHelp": false,
548
- "multiple": false,
549
- "type": "option"
345
+ "name": "code-coverage",
346
+ "summary": "Retrieve code coverage results.",
347
+ "allowNo": false,
348
+ "type": "boolean"
550
349
  },
551
- "loglevel": {
552
- "deprecated": {
553
- "message": "The loglevel flag is no longer in use on this command. You may use it without error, but it will be ignored.\nSet the log level using the `SFDX_LOG_LEVEL` environment variable."
554
- },
555
- "hidden": true,
556
- "name": "loglevel",
557
- "hasDynamicHelp": false,
558
- "multiple": false,
559
- "type": "option"
350
+ "detailed-coverage": {
351
+ "dependsOn": [
352
+ "code-coverage"
353
+ ],
354
+ "name": "detailed-coverage",
355
+ "summary": "Display detailed code coverage per test.",
356
+ "allowNo": false,
357
+ "type": "boolean"
560
358
  },
561
- "log-id": {
359
+ "output-dir": {
562
360
  "aliases": [
563
- "logid"
361
+ "outputdir",
362
+ "output-directory"
564
363
  ],
565
- "char": "i",
364
+ "char": "d",
566
365
  "deprecateAliases": true,
567
- "name": "log-id",
568
- "summary": "ID of the specific log to display.",
569
- "hasDynamicHelp": false,
570
- "multiple": false,
571
- "type": "option"
572
- },
573
- "number": {
574
- "char": "n",
575
- "name": "number",
576
- "summary": "Number of the most recent logs to display.",
366
+ "name": "output-dir",
367
+ "summary": "Directory in which to store test result files.",
577
368
  "hasDynamicHelp": false,
578
369
  "multiple": false,
579
370
  "type": "option"
580
371
  },
581
- "output-dir": {
372
+ "result-format": {
582
373
  "aliases": [
583
- "outputdir",
584
- "output-directory"
374
+ "resultformat"
585
375
  ],
586
- "char": "d",
376
+ "char": "r",
587
377
  "deprecateAliases": true,
588
- "description": "The location can be an absolute path or relative to the current working directory. The default is the current directory.",
589
- "name": "output-dir",
590
- "summary": "Directory for saving the log files.",
378
+ "name": "result-format",
379
+ "summary": "Format of the test results.",
380
+ "default": "human",
591
381
  "hasDynamicHelp": false,
592
382
  "multiple": false,
383
+ "options": [
384
+ "human",
385
+ "tap",
386
+ "junit",
387
+ "json"
388
+ ],
593
389
  "type": "option"
390
+ },
391
+ "concise": {
392
+ "name": "concise",
393
+ "summary": "Display only failed test results; works with human-readable output only.",
394
+ "allowNo": false,
395
+ "type": "boolean"
594
396
  }
595
397
  },
596
398
  "hasDynamicHelp": true,
597
399
  "hiddenAliases": [],
598
- "id": "apex:get:log",
400
+ "id": "apex:get:test",
599
401
  "pluginAlias": "@salesforce/plugin-apex",
600
402
  "pluginName": "@salesforce/plugin-apex",
601
403
  "pluginType": "core",
602
404
  "strict": true,
603
- "summary": "Fetch the specified log or given number of most recent logs from the org.",
405
+ "summary": "Display test results for a specific asynchronous test run.",
604
406
  "enableJsonFlag": true,
605
407
  "isESM": true,
606
408
  "relativePath": [
@@ -608,55 +410,62 @@
608
410
  "commands",
609
411
  "apex",
610
412
  "get",
611
- "log.js"
413
+ "test.js"
612
414
  ],
613
415
  "aliasPermutations": [
614
- "force:apex:log:get",
615
- "apex:force:log:get",
616
- "apex:log:force:get",
617
- "apex:log:get:force",
618
- "force:log:apex:get",
619
- "log:force:apex:get",
620
- "log:apex:force:get",
621
- "log:apex:get:force",
622
- "force:log:get:apex",
623
- "log:force:get:apex",
624
- "log:get:force:apex",
625
- "log:get:apex:force",
626
- "force:apex:get:log",
627
- "apex:force:get:log",
628
- "apex:get:force:log",
629
- "apex:get:log:force",
630
- "force:get:apex:log",
631
- "get:force:apex:log",
632
- "get:apex:force:log",
633
- "get:apex:log:force",
634
- "force:get:log:apex",
635
- "get:force:log:apex",
636
- "get:log:force:apex",
637
- "get:log:apex:force"
416
+ "force:apex:test:report",
417
+ "apex:force:test:report",
418
+ "apex:test:force:report",
419
+ "apex:test:report:force",
420
+ "force:test:apex:report",
421
+ "test:force:apex:report",
422
+ "test:apex:force:report",
423
+ "test:apex:report:force",
424
+ "force:test:report:apex",
425
+ "test:force:report:apex",
426
+ "test:report:force:apex",
427
+ "test:report:apex:force",
428
+ "force:apex:report:test",
429
+ "apex:force:report:test",
430
+ "apex:report:force:test",
431
+ "apex:report:test:force",
432
+ "force:report:apex:test",
433
+ "report:force:apex:test",
434
+ "report:apex:force:test",
435
+ "report:apex:test:force",
436
+ "force:report:test:apex",
437
+ "report:force:test:apex",
438
+ "report:test:force:apex",
439
+ "report:test:apex:force"
638
440
  ],
639
441
  "permutations": [
640
- "apex:get:log",
641
- "get:apex:log",
642
- "get:log:apex",
643
- "apex:log:get",
644
- "log:apex:get",
645
- "log:get:apex"
442
+ "apex:get:test",
443
+ "get:apex:test",
444
+ "get:test:apex",
445
+ "apex:test:get",
446
+ "test:apex:get",
447
+ "test:get:apex"
646
448
  ]
647
449
  },
648
- "apex:get:test": {
450
+ "apex:run:test": {
649
451
  "aliases": [
650
- "force:apex:test:report"
452
+ "force:apex:test:run"
651
453
  ],
652
454
  "args": {},
653
455
  "deprecateAliases": true,
654
- "description": "Provide a test run ID to display test results for an enqueued or completed asynchronous test run. The test run ID is displayed after running the \"<%= config.bin %> apex test run\" command.\n\nTo see code coverage results, use the --code-coverage flag with --result-format. The output displays a high-level summary of the test run and the code coverage values for classes in your org. If you specify human-readable result format, use the --detailed-coverage flag to see detailed coverage results for each test method run.",
456
+ "description": "Specify which tests to run by using the --class-names, --suite-names, or --tests flags. Alternatively, use the --test-level flag to run all the tests in your org, local tests, or specified tests.\n\nTo see code coverage results, use the --code-coverage flag with --result-format. The output displays a high-level summary of the test run and the code coverage values for classes in your org. If you specify human-readable result format, use the --detailed-coverage flag to see detailed coverage results for each test method run.\n\nBy default, Apex tests run asynchronously and immediately return a test run ID. You can use the --wait flag to specify the number of minutes to wait; if the tests finish in that timeframe, the command displays the results. If the tests haven't finished by the end of the wait time, the command displays a test run ID. Use the \"<%= config.bin %> apex get test --test-run-id\" command to get the results.\n\nYou must have the \"View All Data\" system permission to use this command. The permission is disabled by default and can be enabled only by a system administrator.\n\nNOTE: The testRunCoverage value (JSON and JUnit result formats) is a percentage of the covered lines and total lines from all the Apex classes evaluated by the tests in this run.",
655
457
  "examples": [
656
- "Display test results for your default org using a test run ID:\n<%= config.bin %> <%= command.id %> --test-run-id <test run id>",
657
- "Similar to previous example, but output the result in JUnit format:\n<%= config.bin %> <%= command.id %> --test-run-id <test run id> --result-format junit",
658
- "Also retrieve code coverage results and output in JSON format:\n<%= config.bin %> <%= command.id %> --test-run-id <test run id> --code-coverage --json",
659
- "Specify a directory in which to save the test results from the org with the specified username (rather than your default org):\n<%= config.bin %> <%= command.id %> --test-run-id <test run id> --code-coverage --output-dir <path to outputdir> --target-org me@myorg'"
458
+ "Run all Apex tests and suites in your default org:\n<%= config.bin %> <%= command.id %>",
459
+ "Run the specified Apex test classes in your default org and display results in human-readable form:\n<%= config.bin %> <%= command.id %> --class-names MyClassTest --class-names MyOtherClassTest --result-format human",
460
+ "Run the specified Apex test suites in your default org and include code coverage results and additional details:\n<%= config.bin %> <%= command.id %> --suite-names MySuite --suite-names MyOtherSuite --code-coverage --detailed-coverage",
461
+ "Run the specified Apex tests in your default org and display results in human-readable output:\n<%= config.bin %> <%= command.id %> --tests MyClassTest.testCoolFeature --tests MyClassTest.testAwesomeFeature --tests AnotherClassTest --tests namespace.TheirClassTest.testThis --result-format human",
462
+ "Run all tests in the org with the specified username with the specified test level; save the output to the specified directory:\n<%= config.bin %> <%= command.id %> --test-level RunLocalTests --output-dir <path to outputdir> --target-org me@my.org",
463
+ "Run all tests in the org asynchronously:\n<%= config.bin %> <%= command.id %> --target-org myscratch",
464
+ "Run all tests synchronously; the command waits to display the test results until all tests finish:\n<%= config.bin %> <%= command.id %> --synchronous",
465
+ "Run specific tests using the --test-level flag:\n<%= config.bin %> <%= command.id %> --test-level RunLocalTests",
466
+ "Run Apex tests on all the methods in the specified class; output results in Test Anything Protocol (TAP) format and request code coverage results:\n<%= config.bin %> <%= command.id %> --class-names TestA --class-names TestB --result-format tap --code-coverage",
467
+ "Run Apex tests on methods specified using the standard Class.method notation; if you specify a test class without a method, the command runs all methods in the class:\n<%= config.bin %> <%= command.id %> --tests TestA.excitingMethod --tests TestA.boringMethod --tests TestB",
468
+ "Run Apex tests on methods specified using the standard Class.method notation with a namespace:\n<%= config.bin %> <%= command.id %> --tests ns.TestA.excitingMethod --tests ns.TestA.boringMethod --tests ns.TestB"
660
469
  ],
661
470
  "flags": {
662
471
  "json": {
@@ -710,39 +519,17 @@
710
519
  "multiple": false,
711
520
  "type": "option"
712
521
  },
713
- "test-run-id": {
522
+ "code-coverage": {
714
523
  "aliases": [
715
- "testrunid"
524
+ "codecoverage"
716
525
  ],
717
- "char": "i",
718
- "deprecateAliases": true,
719
- "name": "test-run-id",
720
- "required": true,
721
- "summary": "ID of the test run.",
722
- "hasDynamicHelp": false,
723
- "multiple": false,
724
- "type": "option"
725
- },
726
- "code-coverage": {
727
- "aliases": [
728
- "codecoverage"
729
- ],
730
- "char": "c",
526
+ "char": "c",
731
527
  "deprecateAliases": true,
732
528
  "name": "code-coverage",
733
529
  "summary": "Retrieve code coverage results.",
734
530
  "allowNo": false,
735
531
  "type": "boolean"
736
532
  },
737
- "detailed-coverage": {
738
- "dependsOn": [
739
- "code-coverage"
740
- ],
741
- "name": "detailed-coverage",
742
- "summary": "Display detailed code coverage per test.",
743
- "allowNo": false,
744
- "type": "boolean"
745
- },
746
533
  "output-dir": {
747
534
  "aliases": [
748
535
  "outputdir",
@@ -751,11 +538,47 @@
751
538
  "char": "d",
752
539
  "deprecateAliases": true,
753
540
  "name": "output-dir",
754
- "summary": "Directory in which to store test result files.",
541
+ "summary": "Directory in which to store test run files.",
755
542
  "hasDynamicHelp": false,
756
543
  "multiple": false,
757
544
  "type": "option"
758
545
  },
546
+ "test-level": {
547
+ "aliases": [
548
+ "testlevel"
549
+ ],
550
+ "char": "l",
551
+ "deprecateAliases": true,
552
+ "description": "Here's what the levels mean:\n\n- RunSpecifiedTests — Only the tests that you specify in the runTests option are run. Code coverage requirements differ from the default coverage requirements when using this test level. The executed tests must cover each class and trigger in the deployment package for a minimum of 75% code coverage. This coverage is computed for each class and triggers individually, and is different than the overall coverage percentage.\n- RunLocalTests — All local tests in your org, including tests that originate from no-namespaced unlocked packages, are run. The tests that originate from installed managed packages and namespaced unlocked packages aren't run. This test level is the default for production deployments that include Apex classes or triggers.\n- RunAllTestsInOrg — All tests are run. The tests include all tests in your org.",
553
+ "name": "test-level",
554
+ "summary": "Level of tests to run; default is RunLocalTests.",
555
+ "hasDynamicHelp": false,
556
+ "multiple": false,
557
+ "options": [
558
+ "RunLocalTests",
559
+ "RunAllTestsInOrg",
560
+ "RunSpecifiedTests"
561
+ ],
562
+ "type": "option"
563
+ },
564
+ "class-names": {
565
+ "aliases": [
566
+ "classnames"
567
+ ],
568
+ "char": "n",
569
+ "deprecateAliases": true,
570
+ "description": "If you select --class-names, you can't specify --suite-names or --tests.\nFor multiple classes, repeat the flag for each.\n--class-names Class1 --class-names Class2",
571
+ "exclusive": [
572
+ "suite-names",
573
+ "tests"
574
+ ],
575
+ "name": "class-names",
576
+ "summary": "Apex test class names to run; default is all classes.",
577
+ "delimiter": ",",
578
+ "hasDynamicHelp": false,
579
+ "multiple": true,
580
+ "type": "option"
581
+ },
759
582
  "result-format": {
760
583
  "aliases": [
761
584
  "resultformat"
@@ -775,6 +598,67 @@
775
598
  ],
776
599
  "type": "option"
777
600
  },
601
+ "suite-names": {
602
+ "aliases": [
603
+ "suitenames"
604
+ ],
605
+ "char": "s",
606
+ "deprecateAliases": true,
607
+ "description": "If you select --suite-names, you can't specify --class-names or --tests.\nFor multiple suites, repeat the flag for each.\n--suite-names Suite1 --suite-names Suite2",
608
+ "exclusive": [
609
+ "class-names",
610
+ "tests"
611
+ ],
612
+ "name": "suite-names",
613
+ "summary": "Apex test suite names to run.",
614
+ "delimiter": ",",
615
+ "hasDynamicHelp": false,
616
+ "multiple": true,
617
+ "type": "option"
618
+ },
619
+ "tests": {
620
+ "char": "t",
621
+ "description": "If you specify --tests, you can't specify --class-names or --suite-names\nFor multiple tests, repeat the flag for each.\n--tests Test1 --tests Test2",
622
+ "exclusive": [
623
+ "class-names",
624
+ "suite-names"
625
+ ],
626
+ "name": "tests",
627
+ "summary": "Apex test class names or IDs and, if applicable, test methods to run; default is all tests.",
628
+ "delimiter": ",",
629
+ "hasDynamicHelp": false,
630
+ "multiple": true,
631
+ "type": "option"
632
+ },
633
+ "wait": {
634
+ "char": "w",
635
+ "name": "wait",
636
+ "summary": "Sets the streaming client socket timeout in minutes; specify a longer wait time if timeouts occur frequently.",
637
+ "hasDynamicHelp": true,
638
+ "multiple": false,
639
+ "type": "option"
640
+ },
641
+ "synchronous": {
642
+ "char": "y",
643
+ "name": "synchronous",
644
+ "summary": "Runs test methods from a single Apex class synchronously; if not specified, tests are run asynchronously.",
645
+ "allowNo": false,
646
+ "type": "boolean"
647
+ },
648
+ "detailed-coverage": {
649
+ "aliases": [
650
+ "detailedcoverage"
651
+ ],
652
+ "char": "v",
653
+ "dependsOn": [
654
+ "code-coverage"
655
+ ],
656
+ "deprecateAliases": true,
657
+ "name": "detailed-coverage",
658
+ "summary": "Display detailed code coverage per test.",
659
+ "allowNo": false,
660
+ "type": "boolean"
661
+ },
778
662
  "concise": {
779
663
  "name": "concise",
780
664
  "summary": "Display only failed test results; works with human-readable output only.",
@@ -784,54 +668,170 @@
784
668
  },
785
669
  "hasDynamicHelp": true,
786
670
  "hiddenAliases": [],
787
- "id": "apex:get:test",
671
+ "id": "apex:run:test",
788
672
  "pluginAlias": "@salesforce/plugin-apex",
789
673
  "pluginName": "@salesforce/plugin-apex",
790
674
  "pluginType": "core",
791
675
  "strict": true,
792
- "summary": "Display test results for a specific asynchronous test run.",
676
+ "summary": "Invoke Apex tests in an org.",
793
677
  "enableJsonFlag": true,
794
678
  "isESM": true,
795
679
  "relativePath": [
796
680
  "lib",
797
681
  "commands",
798
682
  "apex",
799
- "get",
683
+ "run",
800
684
  "test.js"
801
685
  ],
802
686
  "aliasPermutations": [
803
- "force:apex:test:report",
804
- "apex:force:test:report",
805
- "apex:test:force:report",
806
- "apex:test:report:force",
807
- "force:test:apex:report",
808
- "test:force:apex:report",
809
- "test:apex:force:report",
810
- "test:apex:report:force",
811
- "force:test:report:apex",
812
- "test:force:report:apex",
813
- "test:report:force:apex",
814
- "test:report:apex:force",
815
- "force:apex:report:test",
816
- "apex:force:report:test",
817
- "apex:report:force:test",
818
- "apex:report:test:force",
819
- "force:report:apex:test",
820
- "report:force:apex:test",
821
- "report:apex:force:test",
822
- "report:apex:test:force",
823
- "force:report:test:apex",
824
- "report:force:test:apex",
825
- "report:test:force:apex",
826
- "report:test:apex:force"
687
+ "force:apex:test:run",
688
+ "apex:force:test:run",
689
+ "apex:test:force:run",
690
+ "apex:test:run:force",
691
+ "force:test:apex:run",
692
+ "test:force:apex:run",
693
+ "test:apex:force:run",
694
+ "test:apex:run:force",
695
+ "force:test:run:apex",
696
+ "test:force:run:apex",
697
+ "test:run:force:apex",
698
+ "test:run:apex:force",
699
+ "force:apex:run:test",
700
+ "apex:force:run:test",
701
+ "apex:run:force:test",
702
+ "apex:run:test:force",
703
+ "force:run:apex:test",
704
+ "run:force:apex:test",
705
+ "run:apex:force:test",
706
+ "run:apex:test:force",
707
+ "force:run:test:apex",
708
+ "run:force:test:apex",
709
+ "run:test:force:apex",
710
+ "run:test:apex:force"
827
711
  ],
828
712
  "permutations": [
829
- "apex:get:test",
830
- "get:apex:test",
831
- "get:test:apex",
832
- "apex:test:get",
833
- "test:apex:get",
834
- "test:get:apex"
713
+ "apex:run:test",
714
+ "run:apex:test",
715
+ "run:test:apex",
716
+ "apex:test:run",
717
+ "test:apex:run",
718
+ "test:run:apex"
719
+ ]
720
+ },
721
+ "apex:list:log": {
722
+ "aliases": [
723
+ "force:apex:log:list"
724
+ ],
725
+ "args": {},
726
+ "deprecateAliases": true,
727
+ "description": "Run this command in a project to list the IDs and general information for all debug logs in your default org.\n\nTo fetch a specific log from your org, obtain the ID from this command's output, then run the “<%= config.bin %> apex log get” command.",
728
+ "examples": [
729
+ "List the IDs and information about the debug logs in your default org:\n<%= config.bin %> <%= command.id %>",
730
+ "Similar to previous example, but use the org with the specified username:\n<%= config.bin %> <%= command.id %> --target-org me@my.org"
731
+ ],
732
+ "flags": {
733
+ "json": {
734
+ "description": "Format output as json.",
735
+ "helpGroup": "GLOBAL",
736
+ "name": "json",
737
+ "allowNo": false,
738
+ "type": "boolean"
739
+ },
740
+ "flags-dir": {
741
+ "helpGroup": "GLOBAL",
742
+ "name": "flags-dir",
743
+ "summary": "Import flag values from a directory.",
744
+ "hasDynamicHelp": false,
745
+ "multiple": false,
746
+ "type": "option"
747
+ },
748
+ "target-org": {
749
+ "aliases": [
750
+ "targetusername",
751
+ "u"
752
+ ],
753
+ "char": "o",
754
+ "deprecateAliases": true,
755
+ "name": "target-org",
756
+ "noCacheDefault": true,
757
+ "required": true,
758
+ "summary": "Username or alias of the target org. Not required if the `target-org` configuration variable is already set.",
759
+ "hasDynamicHelp": true,
760
+ "multiple": false,
761
+ "type": "option"
762
+ },
763
+ "api-version": {
764
+ "aliases": [
765
+ "apiversion"
766
+ ],
767
+ "deprecateAliases": true,
768
+ "description": "Override the api version used for api requests made by this command",
769
+ "name": "api-version",
770
+ "hasDynamicHelp": false,
771
+ "multiple": false,
772
+ "type": "option"
773
+ },
774
+ "loglevel": {
775
+ "deprecated": {
776
+ "message": "The loglevel flag is no longer in use on this command. You may use it without error, but it will be ignored.\nSet the log level using the `SFDX_LOG_LEVEL` environment variable."
777
+ },
778
+ "hidden": true,
779
+ "name": "loglevel",
780
+ "hasDynamicHelp": false,
781
+ "multiple": false,
782
+ "type": "option"
783
+ }
784
+ },
785
+ "hasDynamicHelp": true,
786
+ "hiddenAliases": [],
787
+ "id": "apex:list:log",
788
+ "pluginAlias": "@salesforce/plugin-apex",
789
+ "pluginName": "@salesforce/plugin-apex",
790
+ "pluginType": "core",
791
+ "strict": true,
792
+ "summary": "Display a list of IDs and general information about debug logs.",
793
+ "enableJsonFlag": true,
794
+ "isESM": true,
795
+ "relativePath": [
796
+ "lib",
797
+ "commands",
798
+ "apex",
799
+ "list",
800
+ "log.js"
801
+ ],
802
+ "aliasPermutations": [
803
+ "force:apex:log:list",
804
+ "apex:force:log:list",
805
+ "apex:log:force:list",
806
+ "apex:log:list:force",
807
+ "force:log:apex:list",
808
+ "log:force:apex:list",
809
+ "log:apex:force:list",
810
+ "log:apex:list:force",
811
+ "force:log:list:apex",
812
+ "log:force:list:apex",
813
+ "log:list:force:apex",
814
+ "log:list:apex:force",
815
+ "force:apex:list:log",
816
+ "apex:force:list:log",
817
+ "apex:list:force:log",
818
+ "apex:list:log:force",
819
+ "force:list:apex:log",
820
+ "list:force:apex:log",
821
+ "list:apex:force:log",
822
+ "list:apex:log:force",
823
+ "force:list:log:apex",
824
+ "list:force:log:apex",
825
+ "list:log:force:apex",
826
+ "list:log:apex:force"
827
+ ],
828
+ "permutations": [
829
+ "apex:list:log",
830
+ "list:apex:log",
831
+ "list:log:apex",
832
+ "apex:log:list",
833
+ "log:apex:list",
834
+ "log:list:apex"
835
835
  ]
836
836
  },
837
837
  "apex:tail:log": {
@@ -978,5 +978,5 @@
978
978
  ]
979
979
  }
980
980
  },
981
- "version": "3.6.13"
981
+ "version": "3.6.15"
982
982
  }
package/package.json CHANGED
@@ -1,12 +1,12 @@
1
1
  {
2
2
  "name": "@salesforce/plugin-apex",
3
3
  "description": "Apex commands",
4
- "version": "3.6.13",
4
+ "version": "3.6.15",
5
5
  "author": "Salesforce",
6
6
  "bugs": "https://github.com/forcedotcom/cli/issues",
7
7
  "dependencies": {
8
- "@salesforce/apex-node": "^8.1.20",
9
- "@salesforce/core": "^8.8.6",
8
+ "@salesforce/apex-node": "^8.1.22",
9
+ "@salesforce/core": "^8.10.0",
10
10
  "@salesforce/kit": "^3.2.3",
11
11
  "@salesforce/sf-plugins-core": "^12.2.1",
12
12
  "ansis": "^3.3.1"
@@ -18,7 +18,7 @@
18
18
  "@salesforce/dev-scripts": "^10.2.11",
19
19
  "@salesforce/plugin-command-reference": "^3.1.49",
20
20
  "eslint-plugin-sf-plugin": "^1.20.19",
21
- "oclif": "^4.17.43",
21
+ "oclif": "^4.17.46",
22
22
  "ts-node": "^10.9.2",
23
23
  "typescript": "^5.8.3"
24
24
  },
@@ -217,7 +217,7 @@
217
217
  "exports": "./lib/index.js",
218
218
  "type": "module",
219
219
  "sfdx": {
220
- "publicKeyUrl": "https://developer.salesforce.com/media/salesforce-cli/security/@salesforce/plugin-apex/3.6.13.crt",
221
- "signatureUrl": "https://developer.salesforce.com/media/salesforce-cli/security/@salesforce/plugin-apex/3.6.13.sig"
220
+ "publicKeyUrl": "https://developer.salesforce.com/media/salesforce-cli/security/@salesforce/plugin-apex/3.6.15.crt",
221
+ "signatureUrl": "https://developer.salesforce.com/media/salesforce-cli/security/@salesforce/plugin-apex/3.6.15.sig"
222
222
  }
223
223
  }