@salesforce/plugin-apex 3.6.15 → 3.6.17

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.15/src/commands/apex/get/log.ts)_
151
+ _See code: [src/commands/apex/get/log.ts](https://github.com/salesforcecli/plugin-apex/blob/3.6.17/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.15/src/commands/apex/get/test.ts)_
211
+ _See code: [src/commands/apex/get/test.ts](https://github.com/salesforcecli/plugin-apex/blob/3.6.17/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.15/src/commands/apex/list/log.ts)_
251
+ _See code: [src/commands/apex/list/log.ts](https://github.com/salesforcecli/plugin-apex/blob/3.6.17/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.15/src/commands/apex/run.ts)_
298
+ _See code: [src/commands/apex/run.ts](https://github.com/salesforcecli/plugin-apex/blob/3.6.17/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.15/src/commands/apex/run/test.ts)_
441
+ _See code: [src/commands/apex/run/test.ts](https://github.com/salesforcecli/plugin-apex/blob/3.6.17/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.15/src/commands/apex/tail/log.ts)_
484
+ _See code: [src/commands/apex/tail/log.ts](https://github.com/salesforcecli/plugin-apex/blob/3.6.17/src/commands/apex/tail/log.ts)_
485
485
 
486
486
  <!-- commandsstop -->
@@ -106,18 +106,16 @@
106
106
  "run:apex"
107
107
  ]
108
108
  },
109
- "apex:get:log": {
109
+ "apex:list:log": {
110
110
  "aliases": [
111
- "force:apex:log:get"
111
+ "force:apex:log:list"
112
112
  ],
113
113
  "args": {},
114
114
  "deprecateAliases": true,
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.",
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.",
116
116
  "examples": [
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"
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"
121
119
  ],
122
120
  "flags": {
123
121
  "json": {
@@ -170,106 +168,79 @@
170
168
  "hasDynamicHelp": false,
171
169
  "multiple": false,
172
170
  "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"
207
171
  }
208
172
  },
209
173
  "hasDynamicHelp": true,
210
174
  "hiddenAliases": [],
211
- "id": "apex:get:log",
175
+ "id": "apex:list:log",
212
176
  "pluginAlias": "@salesforce/plugin-apex",
213
177
  "pluginName": "@salesforce/plugin-apex",
214
178
  "pluginType": "core",
215
179
  "strict": true,
216
- "summary": "Fetch the specified log or given number of most recent logs from the org.",
180
+ "summary": "Display a list of IDs and general information about debug logs.",
217
181
  "enableJsonFlag": true,
218
182
  "isESM": true,
219
183
  "relativePath": [
220
184
  "lib",
221
185
  "commands",
222
186
  "apex",
223
- "get",
187
+ "list",
224
188
  "log.js"
225
189
  ],
226
190
  "aliasPermutations": [
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"
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"
251
215
  ],
252
216
  "permutations": [
253
- "apex:get:log",
254
- "get:apex:log",
255
- "get:log:apex",
256
- "apex:log:get",
257
- "log:apex:get",
258
- "log:get:apex"
217
+ "apex:list:log",
218
+ "list:apex:log",
219
+ "list:log:apex",
220
+ "apex:log:list",
221
+ "log:apex:list",
222
+ "log:list:apex"
259
223
  ]
260
224
  },
261
- "apex:get:test": {
225
+ "apex:run:test": {
262
226
  "aliases": [
263
- "force:apex:test:report"
227
+ "force:apex:test:run"
264
228
  ],
265
229
  "args": {},
266
230
  "deprecateAliases": true,
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.",
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.",
268
232
  "examples": [
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'"
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"
273
244
  ],
274
245
  "flags": {
275
246
  "json": {
@@ -323,19 +294,6 @@
323
294
  "multiple": false,
324
295
  "type": "option"
325
296
  },
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
- },
339
297
  "code-coverage": {
340
298
  "aliases": [
341
299
  "codecoverage"
@@ -347,15 +305,6 @@
347
305
  "allowNo": false,
348
306
  "type": "boolean"
349
307
  },
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
- },
359
308
  "output-dir": {
360
309
  "aliases": [
361
310
  "outputdir",
@@ -364,9 +313,45 @@
364
313
  "char": "d",
365
314
  "deprecateAliases": true,
366
315
  "name": "output-dir",
367
- "summary": "Directory in which to store test result files.",
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.",
368
330
  "hasDynamicHelp": false,
369
331
  "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,
370
355
  "type": "option"
371
356
  },
372
357
  "result-format": {
@@ -388,6 +373,67 @@
388
373
  ],
389
374
  "type": "option"
390
375
  },
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
+ },
391
437
  "concise": {
392
438
  "name": "concise",
393
439
  "summary": "Display only failed test results; works with human-readable output only.",
@@ -397,75 +443,68 @@
397
443
  },
398
444
  "hasDynamicHelp": true,
399
445
  "hiddenAliases": [],
400
- "id": "apex:get:test",
446
+ "id": "apex:run:test",
401
447
  "pluginAlias": "@salesforce/plugin-apex",
402
448
  "pluginName": "@salesforce/plugin-apex",
403
449
  "pluginType": "core",
404
450
  "strict": true,
405
- "summary": "Display test results for a specific asynchronous test run.",
451
+ "summary": "Invoke Apex tests in an org.",
406
452
  "enableJsonFlag": true,
407
453
  "isESM": true,
408
454
  "relativePath": [
409
455
  "lib",
410
456
  "commands",
411
457
  "apex",
412
- "get",
458
+ "run",
413
459
  "test.js"
414
460
  ],
415
461
  "aliasPermutations": [
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"
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"
440
486
  ],
441
487
  "permutations": [
442
- "apex:get:test",
443
- "get:apex:test",
444
- "get:test:apex",
445
- "apex:test:get",
446
- "test:apex:get",
447
- "test:get:apex"
488
+ "apex:run:test",
489
+ "run:apex:test",
490
+ "run:test:apex",
491
+ "apex:test:run",
492
+ "test:apex:run",
493
+ "test:run:apex"
448
494
  ]
449
495
  },
450
- "apex:run:test": {
496
+ "apex:get:log": {
451
497
  "aliases": [
452
- "force:apex:test:run"
498
+ "force:apex:log:get"
453
499
  ],
454
500
  "args": {},
455
501
  "deprecateAliases": true,
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.",
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.",
457
503
  "examples": [
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"
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"
469
508
  ],
470
509
  "flags": {
471
510
  "json": {
@@ -519,215 +558,105 @@
519
558
  "multiple": false,
520
559
  "type": "option"
521
560
  },
522
- "code-coverage": {
523
- "aliases": [
524
- "codecoverage"
525
- ],
526
- "char": "c",
527
- "deprecateAliases": true,
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.",
542
- "hasDynamicHelp": false,
543
- "multiple": false,
544
- "type": "option"
545
- },
546
- "test-level": {
561
+ "log-id": {
547
562
  "aliases": [
548
- "testlevel"
563
+ "logid"
549
564
  ],
550
- "char": "l",
565
+ "char": "i",
551
566
  "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.",
567
+ "name": "log-id",
568
+ "summary": "ID of the specific log to display.",
555
569
  "hasDynamicHelp": false,
556
570
  "multiple": false,
557
- "options": [
558
- "RunLocalTests",
559
- "RunAllTestsInOrg",
560
- "RunSpecifiedTests"
561
- ],
562
571
  "type": "option"
563
572
  },
564
- "class-names": {
565
- "aliases": [
566
- "classnames"
567
- ],
573
+ "number": {
568
574
  "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
- },
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",
575
+ "name": "number",
576
+ "summary": "Number of the most recent logs to display.",
591
577
  "hasDynamicHelp": false,
592
578
  "multiple": false,
593
- "options": [
594
- "human",
595
- "tap",
596
- "junit",
597
- "json"
598
- ],
599
579
  "type": "option"
600
580
  },
601
- "suite-names": {
581
+ "output-dir": {
602
582
  "aliases": [
603
- "suitenames"
583
+ "outputdir",
584
+ "output-directory"
604
585
  ],
605
- "char": "s",
586
+ "char": "d",
606
587
  "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": ",",
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.",
629
591
  "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
592
  "multiple": false,
639
593
  "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"
667
594
  }
668
595
  },
669
596
  "hasDynamicHelp": true,
670
597
  "hiddenAliases": [],
671
- "id": "apex:run:test",
598
+ "id": "apex:get:log",
672
599
  "pluginAlias": "@salesforce/plugin-apex",
673
600
  "pluginName": "@salesforce/plugin-apex",
674
601
  "pluginType": "core",
675
602
  "strict": true,
676
- "summary": "Invoke Apex tests in an org.",
603
+ "summary": "Fetch the specified log or given number of most recent logs from the org.",
677
604
  "enableJsonFlag": true,
678
605
  "isESM": true,
679
606
  "relativePath": [
680
607
  "lib",
681
608
  "commands",
682
609
  "apex",
683
- "run",
684
- "test.js"
610
+ "get",
611
+ "log.js"
685
612
  ],
686
613
  "aliasPermutations": [
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"
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"
711
638
  ],
712
639
  "permutations": [
713
- "apex:run:test",
714
- "run:apex:test",
715
- "run:test:apex",
716
- "apex:test:run",
717
- "test:apex:run",
718
- "test:run:apex"
640
+ "apex:get:log",
641
+ "get:apex:log",
642
+ "get:log:apex",
643
+ "apex:log:get",
644
+ "log:apex:get",
645
+ "log:get:apex"
719
646
  ]
720
647
  },
721
- "apex:list:log": {
648
+ "apex:get:test": {
722
649
  "aliases": [
723
- "force:apex:log:list"
650
+ "force:apex:test:report"
724
651
  ],
725
652
  "args": {},
726
653
  "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.",
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.",
728
655
  "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"
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'"
731
660
  ],
732
661
  "flags": {
733
662
  "json": {
@@ -780,58 +709,129 @@
780
709
  "hasDynamicHelp": false,
781
710
  "multiple": false,
782
711
  "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:list:log",
787
+ "id": "apex:get:test",
788
788
  "pluginAlias": "@salesforce/plugin-apex",
789
789
  "pluginName": "@salesforce/plugin-apex",
790
790
  "pluginType": "core",
791
791
  "strict": true,
792
- "summary": "Display a list of IDs and general information about debug logs.",
792
+ "summary": "Display test results for a specific asynchronous test run.",
793
793
  "enableJsonFlag": true,
794
794
  "isESM": true,
795
795
  "relativePath": [
796
796
  "lib",
797
797
  "commands",
798
798
  "apex",
799
- "list",
800
- "log.js"
799
+ "get",
800
+ "test.js"
801
801
  ],
802
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"
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"
827
827
  ],
828
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"
829
+ "apex:get:test",
830
+ "get:apex:test",
831
+ "get:test:apex",
832
+ "apex:test:get",
833
+ "test:apex:get",
834
+ "test:get:apex"
835
835
  ]
836
836
  },
837
837
  "apex:tail:log": {
@@ -978,5 +978,5 @@
978
978
  ]
979
979
  }
980
980
  },
981
- "version": "3.6.15"
981
+ "version": "3.6.17"
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.15",
4
+ "version": "3.6.17",
5
5
  "author": "Salesforce",
6
6
  "bugs": "https://github.com/forcedotcom/cli/issues",
7
7
  "dependencies": {
8
- "@salesforce/apex-node": "^8.1.22",
9
- "@salesforce/core": "^8.10.0",
8
+ "@salesforce/apex-node": "^8.1.25",
9
+ "@salesforce/core": "^8.10.1",
10
10
  "@salesforce/kit": "^3.2.3",
11
11
  "@salesforce/sf-plugins-core": "^12.2.1",
12
12
  "ansis": "^3.3.1"
@@ -16,7 +16,7 @@
16
16
  "@oclif/plugin-command-snapshot": "^5.2.37",
17
17
  "@salesforce/cli-plugins-testkit": "^5.3.39",
18
18
  "@salesforce/dev-scripts": "^10.2.11",
19
- "@salesforce/plugin-command-reference": "^3.1.49",
19
+ "@salesforce/plugin-command-reference": "^3.1.51",
20
20
  "eslint-plugin-sf-plugin": "^1.20.19",
21
21
  "oclif": "^4.17.46",
22
22
  "ts-node": "^10.9.2",
@@ -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.15.crt",
221
- "signatureUrl": "https://developer.salesforce.com/media/salesforce-cli/security/@salesforce/plugin-apex/3.6.15.sig"
220
+ "publicKeyUrl": "https://developer.salesforce.com/media/salesforce-cli/security/@salesforce/plugin-apex/3.6.17.crt",
221
+ "signatureUrl": "https://developer.salesforce.com/media/salesforce-cli/security/@salesforce/plugin-apex/3.6.17.sig"
222
222
  }
223
223
  }