@@ -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.2.0 /src/commands/apex/get/log.ts ) _
151
+ _ See code: [ src/commands/apex/get/log.ts] ( https://github.com/salesforcecli/plugin-apex/blob/3.2.1 /src/commands/apex/get/log.ts ) _
152
152
153
153
## ` sf apex get test `
154
154
@@ -199,10 +199,10 @@ EXAMPLES
199
199
default org):
200
200
201
201
$ sf apex get test --test-run-id <test run id> --code-coverage --output-dir <path to outputdir> --target-org \
202
- me@myorg',
202
+ me@myorg'
203
203
```
204
204
205
- _ See code: [ src/commands/apex/get/test.ts] ( https://github.com/salesforcecli/plugin-apex/blob/3.2.0 /src/commands/apex/get/test.ts ) _
205
+ _ See code: [ src/commands/apex/get/test.ts] ( https://github.com/salesforcecli/plugin-apex/blob/3.2.1 /src/commands/apex/get/test.ts ) _
206
206
207
207
## ` sf apex list log `
208
208
@@ -242,7 +242,7 @@ EXAMPLES
242
242
$ sf apex list log --target-org me@my.org
243
243
```
244
244
245
- _ See code: [ src/commands/apex/list/log.ts] ( https://github.com/salesforcecli/plugin-apex/blob/3.2.0 /src/commands/apex/list/log.ts ) _
245
+ _ See code: [ src/commands/apex/list/log.ts] ( https://github.com/salesforcecli/plugin-apex/blob/3.2.1 /src/commands/apex/list/log.ts ) _
246
246
247
247
## ` sf apex run `
248
248
@@ -289,7 +289,7 @@ EXAMPLES
289
289
$ sf apex run
290
290
```
291
291
292
- _ See code: [ src/commands/apex/run.ts] ( https://github.com/salesforcecli/plugin-apex/blob/3.2.0 /src/commands/apex/run.ts ) _
292
+ _ See code: [ src/commands/apex/run.ts] ( https://github.com/salesforcecli/plugin-apex/blob/3.2.1 /src/commands/apex/run.ts ) _
293
293
294
294
## ` sf apex run test `
295
295
@@ -369,14 +369,45 @@ EXAMPLES
369
369
370
370
$ sf apex run test --test-level RunLocalTests --output-dir <path to outputdir> --target-org me@my.org
371
371
372
+ Run all tests in the org asynchronously:
373
+
374
+ $ sf apex run test --target-org myscratch
375
+
376
+ Run all tests synchronously; the command waits to display the test results until all tests finish:
377
+
378
+ $ sf apex run test --synchronous
379
+
380
+ Run specific tests using the --test-level flag:
381
+
382
+ $ sf apex run test --test-level RunLocalTests
383
+
384
+ Run Apex tests on all the methods in the specified class; output results in Test Anything Protocol (TAP) format and
385
+ request code coverage results:
386
+
387
+ $ sf apex run test --class-names TestA --class-names TestB --result-format tap --code-coverage
388
+
389
+ Run Apex tests on methods specified using the standard Class.method notation; if you specify a test class without a
390
+ method, the command runs all methods in the class:
391
+
392
+ $ sf apex run test --tests TestA.excitingMethod --tests TestA.boringMethod --tests TestB
393
+
394
+ Run Apex tests on methods specified using the standard Class.method notation with a namespace:
395
+
396
+ $ sf apex run test --tests ns.TestA.excitingMethod --tests ns.TestA.boringMethod --tests ns.TestB
397
+
372
398
FLAG DESCRIPTIONS
373
399
-l, --test-level=RunLocalTests|RunAllTestsInOrg|RunSpecifiedTests Level of tests to run; default is RunLocalTests.
374
400
375
401
Here's what the levels mean:
376
402
377
- - RunSpecifiedTests — Only the tests that you specify are run.
378
- - RunLocalTests — All tests in your org are run, except the ones that originate from installed managed packages.
379
- - RunAllTestsInOrg — All tests are in your org and in installed managed packages are run
403
+ - RunSpecifiedTests — Only the tests that you specify in the runTests option are run. Code coverage requirements
404
+ differ from the default coverage requirements when using this test level. The executed tests must cover each class
405
+ and trigger in the deployment package for a minimum of 75% code coverage. This coverage is computed for each class
406
+ and triggers individually, and is different than the overall coverage percentage.
407
+ - RunLocalTests — All local tests in your org, including tests that originate from no-namespaced unlocked packages,
408
+ are run. The tests that originate from installed managed packages and namespaced unlocked packages aren't run. This
409
+ test level is the default for production deployments that include Apex classes or triggers.
410
+ - RunAllTestsInOrg — All tests are run. The tests include all tests in your org.
380
411
381
412
-n, --class-names=<value>... Apex test class names to run; default is all classes.
382
413
@@ -399,7 +430,7 @@ FLAG DESCRIPTIONS
399
430
--tests Test1 --tests Test2
400
431
```
401
432
402
- _ See code: [ src/commands/apex/run/test.ts] ( https://github.com/salesforcecli/plugin-apex/blob/3.2.0 /src/commands/apex/run/test.ts ) _
433
+ _ See code: [ src/commands/apex/run/test.ts] ( https://github.com/salesforcecli/plugin-apex/blob/3.2.1 /src/commands/apex/run/test.ts ) _
403
434
404
435
## ` sf apex tail log `
405
436
@@ -442,6 +473,6 @@ EXAMPLES
442
473
$ sf apex tail log --color --skip-trace-flag
443
474
```
444
475
445
- _ See code: [ src/commands/apex/tail/log.ts] ( https://github.com/salesforcecli/plugin-apex/blob/3.2.0 /src/commands/apex/tail/log.ts ) _
476
+ _ See code: [ src/commands/apex/tail/log.ts] ( https://github.com/salesforcecli/plugin-apex/blob/3.2.1 /src/commands/apex/tail/log.ts ) _
446
477
447
478
<!-- commandsstop -->
0 commit comments