@salesforce/plugin-apex 3.6.10 → 3.6.11

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.10/src/commands/apex/get/log.ts)_
151
+ _See code: [src/commands/apex/get/log.ts](https://github.com/salesforcecli/plugin-apex/blob/3.6.11/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.10/src/commands/apex/get/test.ts)_
211
+ _See code: [src/commands/apex/get/test.ts](https://github.com/salesforcecli/plugin-apex/blob/3.6.11/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.10/src/commands/apex/list/log.ts)_
251
+ _See code: [src/commands/apex/list/log.ts](https://github.com/salesforcecli/plugin-apex/blob/3.6.11/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.10/src/commands/apex/run.ts)_
298
+ _See code: [src/commands/apex/run.ts](https://github.com/salesforcecli/plugin-apex/blob/3.6.11/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.10/src/commands/apex/run/test.ts)_
441
+ _See code: [src/commands/apex/run/test.ts](https://github.com/salesforcecli/plugin-apex/blob/3.6.11/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.10/src/commands/apex/tail/log.ts)_
484
+ _See code: [src/commands/apex/tail/log.ts](https://github.com/salesforcecli/plugin-apex/blob/3.6.11/src/commands/apex/tail/log.ts)_
485
485
 
486
486
  <!-- commandsstop -->
@@ -106,16 +106,18 @@
106
106
  "run:apex"
107
107
  ]
108
108
  },
109
- "apex:list:log": {
109
+ "apex:get:log": {
110
110
  "aliases": [
111
- "force:apex:log:list"
111
+ "force:apex:log:get"
112
112
  ],
113
113
  "args": {},
114
114
  "deprecateAliases": true,
115
- "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.",
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
- "List the IDs and information about the debug logs in your default org:\n<%= config.bin %> <%= command.id %>",
118
- "Similar to previous example, but use the org with the specified username:\n<%= config.bin %> <%= command.id %> --target-org me@my.org"
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"
119
121
  ],
120
122
  "flags": {
121
123
  "json": {
@@ -168,79 +170,106 @@
168
170
  "hasDynamicHelp": false,
169
171
  "multiple": false,
170
172
  "type": "option"
173
+ },
174
+ "log-id": {
175
+ "aliases": [
176
+ "logid"
177
+ ],
178
+ "char": "i",
179
+ "deprecateAliases": true,
180
+ "name": "log-id",
181
+ "summary": "ID of the specific log to display.",
182
+ "hasDynamicHelp": false,
183
+ "multiple": false,
184
+ "type": "option"
185
+ },
186
+ "number": {
187
+ "char": "n",
188
+ "name": "number",
189
+ "summary": "Number of the most recent logs to display.",
190
+ "hasDynamicHelp": false,
191
+ "multiple": false,
192
+ "type": "option"
193
+ },
194
+ "output-dir": {
195
+ "aliases": [
196
+ "outputdir",
197
+ "output-directory"
198
+ ],
199
+ "char": "d",
200
+ "deprecateAliases": true,
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.",
204
+ "hasDynamicHelp": false,
205
+ "multiple": false,
206
+ "type": "option"
171
207
  }
172
208
  },
173
209
  "hasDynamicHelp": true,
174
210
  "hiddenAliases": [],
175
- "id": "apex:list:log",
211
+ "id": "apex:get:log",
176
212
  "pluginAlias": "@salesforce/plugin-apex",
177
213
  "pluginName": "@salesforce/plugin-apex",
178
214
  "pluginType": "core",
179
215
  "strict": true,
180
- "summary": "Display a list of IDs and general information about debug logs.",
216
+ "summary": "Fetch the specified log or given number of most recent logs from the org.",
181
217
  "enableJsonFlag": true,
182
218
  "isESM": true,
183
219
  "relativePath": [
184
220
  "lib",
185
221
  "commands",
186
222
  "apex",
187
- "list",
223
+ "get",
188
224
  "log.js"
189
225
  ],
190
226
  "aliasPermutations": [
191
- "force:apex:log:list",
192
- "apex:force:log:list",
193
- "apex:log:force:list",
194
- "apex:log:list:force",
195
- "force:log:apex:list",
196
- "log:force:apex:list",
197
- "log:apex:force:list",
198
- "log:apex:list:force",
199
- "force:log:list:apex",
200
- "log:force:list:apex",
201
- "log:list:force:apex",
202
- "log:list:apex:force",
203
- "force:apex:list:log",
204
- "apex:force:list:log",
205
- "apex:list:force:log",
206
- "apex:list:log:force",
207
- "force:list:apex:log",
208
- "list:force:apex:log",
209
- "list:apex:force:log",
210
- "list:apex:log:force",
211
- "force:list:log:apex",
212
- "list:force:log:apex",
213
- "list:log:force:apex",
214
- "list:log: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"
215
251
  ],
216
252
  "permutations": [
217
- "apex:list:log",
218
- "list:apex:log",
219
- "list:log:apex",
220
- "apex:log:list",
221
- "log:apex:list",
222
- "log:list: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"
223
259
  ]
224
260
  },
225
- "apex:run:test": {
261
+ "apex:get:test": {
226
262
  "aliases": [
227
- "force:apex:test:run"
263
+ "force:apex:test:report"
228
264
  ],
229
265
  "args": {},
230
266
  "deprecateAliases": true,
231
- "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.",
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.",
232
268
  "examples": [
233
- "Run all Apex tests and suites in your default org:\n<%= config.bin %> <%= command.id %>",
234
- "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",
235
- "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",
236
- "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",
237
- "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",
238
- "Run all tests in the org asynchronously:\n<%= config.bin %> <%= command.id %> --target-org myscratch",
239
- "Run all tests synchronously; the command waits to display the test results until all tests finish:\n<%= config.bin %> <%= command.id %> --synchronous",
240
- "Run specific tests using the --test-level flag:\n<%= config.bin %> <%= command.id %> --test-level RunLocalTests",
241
- "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",
242
- "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",
243
- "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"
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'"
244
273
  ],
245
274
  "flags": {
246
275
  "json": {
@@ -294,6 +323,19 @@
294
323
  "multiple": false,
295
324
  "type": "option"
296
325
  },
326
+ "test-run-id": {
327
+ "aliases": [
328
+ "testrunid"
329
+ ],
330
+ "char": "i",
331
+ "deprecateAliases": true,
332
+ "name": "test-run-id",
333
+ "required": true,
334
+ "summary": "ID of the test run.",
335
+ "hasDynamicHelp": false,
336
+ "multiple": false,
337
+ "type": "option"
338
+ },
297
339
  "code-coverage": {
298
340
  "aliases": [
299
341
  "codecoverage"
@@ -305,6 +347,15 @@
305
347
  "allowNo": false,
306
348
  "type": "boolean"
307
349
  },
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"
358
+ },
308
359
  "output-dir": {
309
360
  "aliases": [
310
361
  "outputdir",
@@ -313,45 +364,9 @@
313
364
  "char": "d",
314
365
  "deprecateAliases": true,
315
366
  "name": "output-dir",
316
- "summary": "Directory in which to store test run files.",
317
- "hasDynamicHelp": false,
318
- "multiple": false,
319
- "type": "option"
320
- },
321
- "test-level": {
322
- "aliases": [
323
- "testlevel"
324
- ],
325
- "char": "l",
326
- "deprecateAliases": true,
327
- "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.",
328
- "name": "test-level",
329
- "summary": "Level of tests to run; default is RunLocalTests.",
367
+ "summary": "Directory in which to store test result files.",
330
368
  "hasDynamicHelp": false,
331
369
  "multiple": false,
332
- "options": [
333
- "RunLocalTests",
334
- "RunAllTestsInOrg",
335
- "RunSpecifiedTests"
336
- ],
337
- "type": "option"
338
- },
339
- "class-names": {
340
- "aliases": [
341
- "classnames"
342
- ],
343
- "char": "n",
344
- "deprecateAliases": true,
345
- "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",
346
- "exclusive": [
347
- "suite-names",
348
- "tests"
349
- ],
350
- "name": "class-names",
351
- "summary": "Apex test class names to run; default is all classes.",
352
- "delimiter": ",",
353
- "hasDynamicHelp": false,
354
- "multiple": true,
355
370
  "type": "option"
356
371
  },
357
372
  "result-format": {
@@ -373,67 +388,6 @@
373
388
  ],
374
389
  "type": "option"
375
390
  },
376
- "suite-names": {
377
- "aliases": [
378
- "suitenames"
379
- ],
380
- "char": "s",
381
- "deprecateAliases": true,
382
- "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",
383
- "exclusive": [
384
- "class-names",
385
- "tests"
386
- ],
387
- "name": "suite-names",
388
- "summary": "Apex test suite names to run.",
389
- "delimiter": ",",
390
- "hasDynamicHelp": false,
391
- "multiple": true,
392
- "type": "option"
393
- },
394
- "tests": {
395
- "char": "t",
396
- "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",
397
- "exclusive": [
398
- "class-names",
399
- "suite-names"
400
- ],
401
- "name": "tests",
402
- "summary": "Apex test class names or IDs and, if applicable, test methods to run; default is all tests.",
403
- "delimiter": ",",
404
- "hasDynamicHelp": false,
405
- "multiple": true,
406
- "type": "option"
407
- },
408
- "wait": {
409
- "char": "w",
410
- "name": "wait",
411
- "summary": "Sets the streaming client socket timeout in minutes; specify a longer wait time if timeouts occur frequently.",
412
- "hasDynamicHelp": true,
413
- "multiple": false,
414
- "type": "option"
415
- },
416
- "synchronous": {
417
- "char": "y",
418
- "name": "synchronous",
419
- "summary": "Runs test methods from a single Apex class synchronously; if not specified, tests are run asynchronously.",
420
- "allowNo": false,
421
- "type": "boolean"
422
- },
423
- "detailed-coverage": {
424
- "aliases": [
425
- "detailedcoverage"
426
- ],
427
- "char": "v",
428
- "dependsOn": [
429
- "code-coverage"
430
- ],
431
- "deprecateAliases": true,
432
- "name": "detailed-coverage",
433
- "summary": "Display detailed code coverage per test.",
434
- "allowNo": false,
435
- "type": "boolean"
436
- },
437
391
  "concise": {
438
392
  "name": "concise",
439
393
  "summary": "Display only failed test results; works with human-readable output only.",
@@ -443,68 +397,75 @@
443
397
  },
444
398
  "hasDynamicHelp": true,
445
399
  "hiddenAliases": [],
446
- "id": "apex:run:test",
400
+ "id": "apex:get:test",
447
401
  "pluginAlias": "@salesforce/plugin-apex",
448
402
  "pluginName": "@salesforce/plugin-apex",
449
403
  "pluginType": "core",
450
404
  "strict": true,
451
- "summary": "Invoke Apex tests in an org.",
405
+ "summary": "Display test results for a specific asynchronous test run.",
452
406
  "enableJsonFlag": true,
453
407
  "isESM": true,
454
408
  "relativePath": [
455
409
  "lib",
456
410
  "commands",
457
411
  "apex",
458
- "run",
412
+ "get",
459
413
  "test.js"
460
414
  ],
461
415
  "aliasPermutations": [
462
- "force:apex:test:run",
463
- "apex:force:test:run",
464
- "apex:test:force:run",
465
- "apex:test:run:force",
466
- "force:test:apex:run",
467
- "test:force:apex:run",
468
- "test:apex:force:run",
469
- "test:apex:run:force",
470
- "force:test:run:apex",
471
- "test:force:run:apex",
472
- "test:run:force:apex",
473
- "test:run:apex:force",
474
- "force:apex:run:test",
475
- "apex:force:run:test",
476
- "apex:run:force:test",
477
- "apex:run:test:force",
478
- "force:run:apex:test",
479
- "run:force:apex:test",
480
- "run:apex:force:test",
481
- "run:apex:test:force",
482
- "force:run:test:apex",
483
- "run:force:test:apex",
484
- "run:test:force:apex",
485
- "run:test: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"
486
440
  ],
487
441
  "permutations": [
488
- "apex:run:test",
489
- "run:apex:test",
490
- "run:test:apex",
491
- "apex:test:run",
492
- "test:apex:run",
493
- "test:run: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"
494
448
  ]
495
449
  },
496
- "apex:get:log": {
450
+ "apex:run:test": {
497
451
  "aliases": [
498
- "force:apex:log:get"
452
+ "force:apex:test:run"
499
453
  ],
500
454
  "args": {},
501
455
  "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.",
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.",
503
457
  "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"
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"
508
469
  ],
509
470
  "flags": {
510
471
  "json": {
@@ -558,105 +519,215 @@
558
519
  "multiple": false,
559
520
  "type": "option"
560
521
  },
561
- "log-id": {
522
+ "code-coverage": {
562
523
  "aliases": [
563
- "logid"
524
+ "codecoverage"
564
525
  ],
565
- "char": "i",
526
+ "char": "c",
566
527
  "deprecateAliases": true,
567
- "name": "log-id",
568
- "summary": "ID of the specific log to display.",
528
+ "name": "code-coverage",
529
+ "summary": "Retrieve code coverage results.",
530
+ "allowNo": false,
531
+ "type": "boolean"
532
+ },
533
+ "output-dir": {
534
+ "aliases": [
535
+ "outputdir",
536
+ "output-directory"
537
+ ],
538
+ "char": "d",
539
+ "deprecateAliases": true,
540
+ "name": "output-dir",
541
+ "summary": "Directory in which to store test run files.",
569
542
  "hasDynamicHelp": false,
570
543
  "multiple": false,
571
544
  "type": "option"
572
545
  },
573
- "number": {
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
+ ],
574
568
  "char": "n",
575
- "name": "number",
576
- "summary": "Number of the most recent logs to display.",
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
+ },
582
+ "result-format": {
583
+ "aliases": [
584
+ "resultformat"
585
+ ],
586
+ "char": "r",
587
+ "deprecateAliases": true,
588
+ "name": "result-format",
589
+ "summary": "Format of the test results.",
590
+ "default": "human",
577
591
  "hasDynamicHelp": false,
578
592
  "multiple": false,
593
+ "options": [
594
+ "human",
595
+ "tap",
596
+ "junit",
597
+ "json"
598
+ ],
579
599
  "type": "option"
580
600
  },
581
- "output-dir": {
601
+ "suite-names": {
582
602
  "aliases": [
583
- "outputdir",
584
- "output-directory"
603
+ "suitenames"
585
604
  ],
586
- "char": "d",
605
+ "char": "s",
587
606
  "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.",
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": ",",
591
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,
592
638
  "multiple": false,
593
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
+ },
662
+ "concise": {
663
+ "name": "concise",
664
+ "summary": "Display only failed test results; works with human-readable output only.",
665
+ "allowNo": false,
666
+ "type": "boolean"
594
667
  }
595
668
  },
596
669
  "hasDynamicHelp": true,
597
670
  "hiddenAliases": [],
598
- "id": "apex:get:log",
671
+ "id": "apex:run:test",
599
672
  "pluginAlias": "@salesforce/plugin-apex",
600
673
  "pluginName": "@salesforce/plugin-apex",
601
674
  "pluginType": "core",
602
675
  "strict": true,
603
- "summary": "Fetch the specified log or given number of most recent logs from the org.",
676
+ "summary": "Invoke Apex tests in an org.",
604
677
  "enableJsonFlag": true,
605
678
  "isESM": true,
606
679
  "relativePath": [
607
680
  "lib",
608
681
  "commands",
609
682
  "apex",
610
- "get",
611
- "log.js"
683
+ "run",
684
+ "test.js"
612
685
  ],
613
686
  "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"
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"
638
711
  ],
639
712
  "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"
713
+ "apex:run:test",
714
+ "run:apex:test",
715
+ "run:test:apex",
716
+ "apex:test:run",
717
+ "test:apex:run",
718
+ "test:run:apex"
646
719
  ]
647
720
  },
648
- "apex:get:test": {
721
+ "apex:list:log": {
649
722
  "aliases": [
650
- "force:apex:test:report"
723
+ "force:apex:log:list"
651
724
  ],
652
725
  "args": {},
653
726
  "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.",
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.",
655
728
  "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'"
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"
660
731
  ],
661
732
  "flags": {
662
733
  "json": {
@@ -709,129 +780,58 @@
709
780
  "hasDynamicHelp": false,
710
781
  "multiple": false,
711
782
  "type": "option"
712
- },
713
- "test-run-id": {
714
- "aliases": [
715
- "testrunid"
716
- ],
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",
731
- "deprecateAliases": true,
732
- "name": "code-coverage",
733
- "summary": "Retrieve code coverage results.",
734
- "allowNo": false,
735
- "type": "boolean"
736
- },
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
- "output-dir": {
747
- "aliases": [
748
- "outputdir",
749
- "output-directory"
750
- ],
751
- "char": "d",
752
- "deprecateAliases": true,
753
- "name": "output-dir",
754
- "summary": "Directory in which to store test result files.",
755
- "hasDynamicHelp": false,
756
- "multiple": false,
757
- "type": "option"
758
- },
759
- "result-format": {
760
- "aliases": [
761
- "resultformat"
762
- ],
763
- "char": "r",
764
- "deprecateAliases": true,
765
- "name": "result-format",
766
- "summary": "Format of the test results.",
767
- "default": "human",
768
- "hasDynamicHelp": false,
769
- "multiple": false,
770
- "options": [
771
- "human",
772
- "tap",
773
- "junit",
774
- "json"
775
- ],
776
- "type": "option"
777
- },
778
- "concise": {
779
- "name": "concise",
780
- "summary": "Display only failed test results; works with human-readable output only.",
781
- "allowNo": false,
782
- "type": "boolean"
783
783
  }
784
784
  },
785
785
  "hasDynamicHelp": true,
786
786
  "hiddenAliases": [],
787
- "id": "apex:get:test",
787
+ "id": "apex:list:log",
788
788
  "pluginAlias": "@salesforce/plugin-apex",
789
789
  "pluginName": "@salesforce/plugin-apex",
790
790
  "pluginType": "core",
791
791
  "strict": true,
792
- "summary": "Display test results for a specific asynchronous test run.",
792
+ "summary": "Display a list of IDs and general information about debug logs.",
793
793
  "enableJsonFlag": true,
794
794
  "isESM": true,
795
795
  "relativePath": [
796
796
  "lib",
797
797
  "commands",
798
798
  "apex",
799
- "get",
800
- "test.js"
799
+ "list",
800
+ "log.js"
801
801
  ],
802
802
  "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"
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
827
  ],
828
828
  "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"
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.10"
981
+ "version": "3.6.11"
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.10",
4
+ "version": "3.6.11",
5
5
  "author": "Salesforce",
6
6
  "bugs": "https://github.com/forcedotcom/cli/issues",
7
7
  "dependencies": {
8
8
  "@salesforce/apex-node": "^8.1.19",
9
- "@salesforce/core": "^8.8.5",
9
+ "@salesforce/core": "^8.8.6",
10
10
  "@salesforce/kit": "^3.2.3",
11
11
  "@salesforce/sf-plugins-core": "^12.2.1",
12
12
  "ansis": "^3.3.1"
@@ -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.10.crt",
221
- "signatureUrl": "https://developer.salesforce.com/media/salesforce-cli/security/@salesforce/plugin-apex/3.6.10.sig"
220
+ "publicKeyUrl": "https://developer.salesforce.com/media/salesforce-cli/security/@salesforce/plugin-apex/3.6.11.crt",
221
+ "signatureUrl": "https://developer.salesforce.com/media/salesforce-cli/security/@salesforce/plugin-apex/3.6.11.sig"
222
222
  }
223
223
  }