@salesforce/plugin-apex 3.2.0 → 3.2.1
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/README.md +41 -10
- package/messages/gettest.md +2 -1
- package/messages/runtest.md +28 -3
- package/oclif.manifest.json +10 -4
- package/package.json +8 -8
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.2.
|
|
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.
|
|
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.
|
|
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.
|
|
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
|
-
|
|
379
|
-
|
|
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.
|
|
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.
|
|
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 -->
|
package/messages/gettest.md
CHANGED
|
@@ -22,7 +22,8 @@ Provide a test run ID to display test results for an enqueued or completed async
|
|
|
22
22
|
|
|
23
23
|
- Specify a directory in which to save the test results from the org with the specified username (rather than your default org):
|
|
24
24
|
|
|
25
|
-
<%= config.bin %> <%= command.id %> --test-run-id <test run id> --code-coverage --output-dir <path to outputdir> --target-org me@myorg'
|
|
25
|
+
<%= config.bin %> <%= command.id %> --test-run-id <test run id> --code-coverage --output-dir <path to outputdir> --target-org me@myorg'
|
|
26
|
+
|
|
26
27
|
|
|
27
28
|
# flags.test-run-id.summary
|
|
28
29
|
|
package/messages/runtest.md
CHANGED
|
@@ -34,6 +34,31 @@ NOTE: The testRunCoverage value (JSON and JUnit result formats) is a percentage
|
|
|
34
34
|
|
|
35
35
|
<%= config.bin %> <%= command.id %> --test-level RunLocalTests --output-dir <path to outputdir> --target-org me@my.org
|
|
36
36
|
|
|
37
|
+
- Run all tests in the org asynchronously:
|
|
38
|
+
|
|
39
|
+
<%= config.bin %> <%= command.id %> --target-org myscratch
|
|
40
|
+
|
|
41
|
+
- Run all tests synchronously; the command waits to display the test results until all tests finish:
|
|
42
|
+
|
|
43
|
+
<%= config.bin %> <%= command.id %> --synchronous
|
|
44
|
+
|
|
45
|
+
- Run specific tests using the --test-level flag:
|
|
46
|
+
|
|
47
|
+
<%= config.bin %> <%= command.id %> --test-level RunLocalTests
|
|
48
|
+
|
|
49
|
+
- Run Apex tests on all the methods in the specified class; output results in Test Anything Protocol (TAP) format and request code coverage results:
|
|
50
|
+
|
|
51
|
+
<%= config.bin %> <%= command.id %> --class-names TestA --class-names TestB --result-format tap --code-coverage
|
|
52
|
+
|
|
53
|
+
- 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:
|
|
54
|
+
|
|
55
|
+
<%= config.bin %> <%= command.id %> --tests TestA.excitingMethod --tests TestA.boringMethod --tests TestB
|
|
56
|
+
|
|
57
|
+
- Run Apex tests on methods specified using the standard Class.method notation with a namespace:
|
|
58
|
+
|
|
59
|
+
<%= config.bin %> <%= command.id %> --tests ns.TestA.excitingMethod --tests ns.TestA.boringMethod --tests ns.TestB
|
|
60
|
+
|
|
61
|
+
|
|
37
62
|
# flags.class-names.summary
|
|
38
63
|
|
|
39
64
|
Apex test class names to run; default is all classes.
|
|
@@ -80,9 +105,9 @@ Level of tests to run; default is RunLocalTests.
|
|
|
80
105
|
|
|
81
106
|
Here's what the levels mean:
|
|
82
107
|
|
|
83
|
-
- RunSpecifiedTests — Only the tests that you specify are run.
|
|
84
|
-
- RunLocalTests — All tests in your org are run
|
|
85
|
-
- RunAllTestsInOrg — All tests are
|
|
108
|
+
- 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.
|
|
109
|
+
- 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.
|
|
110
|
+
- RunAllTestsInOrg — All tests are run. The tests include all tests in your org.
|
|
86
111
|
|
|
87
112
|
# flags.wait.summary
|
|
88
113
|
|
package/oclif.manifest.json
CHANGED
|
@@ -269,7 +269,7 @@
|
|
|
269
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
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
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'
|
|
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'"
|
|
273
273
|
],
|
|
274
274
|
"flags": {
|
|
275
275
|
"json": {
|
|
@@ -444,7 +444,13 @@
|
|
|
444
444
|
"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",
|
|
445
445
|
"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",
|
|
446
446
|
"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",
|
|
447
|
-
"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"
|
|
447
|
+
"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",
|
|
448
|
+
"Run all tests in the org asynchronously:\n<%= config.bin %> <%= command.id %> --target-org myscratch",
|
|
449
|
+
"Run all tests synchronously; the command waits to display the test results until all tests finish:\n<%= config.bin %> <%= command.id %> --synchronous",
|
|
450
|
+
"Run specific tests using the --test-level flag:\n<%= config.bin %> <%= command.id %> --test-level RunLocalTests",
|
|
451
|
+
"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",
|
|
452
|
+
"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",
|
|
453
|
+
"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"
|
|
448
454
|
],
|
|
449
455
|
"flags": {
|
|
450
456
|
"json": {
|
|
@@ -528,7 +534,7 @@
|
|
|
528
534
|
],
|
|
529
535
|
"char": "l",
|
|
530
536
|
"deprecateAliases": true,
|
|
531
|
-
"description": "Here's what the levels mean:\n\n- RunSpecifiedTests — Only the tests that you specify are run.\n- RunLocalTests — All tests in your org are run
|
|
537
|
+
"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.",
|
|
532
538
|
"name": "test-level",
|
|
533
539
|
"summary": "Level of tests to run; default is RunLocalTests.",
|
|
534
540
|
"hasDynamicHelp": false,
|
|
@@ -951,5 +957,5 @@
|
|
|
951
957
|
]
|
|
952
958
|
}
|
|
953
959
|
},
|
|
954
|
-
"version": "3.2.
|
|
960
|
+
"version": "3.2.1"
|
|
955
961
|
}
|
package/package.json
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@salesforce/plugin-apex",
|
|
3
3
|
"description": "Apex commands",
|
|
4
|
-
"version": "3.2.
|
|
4
|
+
"version": "3.2.1",
|
|
5
5
|
"author": "Salesforce",
|
|
6
6
|
"bugs": "https://github.com/forcedotcom/cli/issues",
|
|
7
7
|
"dependencies": {
|
|
@@ -13,14 +13,14 @@
|
|
|
13
13
|
"ansis": "^3.2.0"
|
|
14
14
|
},
|
|
15
15
|
"devDependencies": {
|
|
16
|
-
"@oclif/plugin-command-snapshot": "^5.2.
|
|
17
|
-
"@salesforce/cli-plugins-testkit": "^5.3.
|
|
18
|
-
"@salesforce/dev-scripts": "^10.
|
|
16
|
+
"@oclif/plugin-command-snapshot": "^5.2.3",
|
|
17
|
+
"@salesforce/cli-plugins-testkit": "^5.3.16",
|
|
18
|
+
"@salesforce/dev-scripts": "^10.2.0",
|
|
19
19
|
"@salesforce/plugin-command-reference": "^3.1.2",
|
|
20
|
-
"eslint-plugin-sf-plugin": "^1.18.
|
|
20
|
+
"eslint-plugin-sf-plugin": "^1.18.9",
|
|
21
21
|
"oclif": "^4.12.1",
|
|
22
22
|
"ts-node": "^10.9.2",
|
|
23
|
-
"typescript": "^5.
|
|
23
|
+
"typescript": "^5.5.2"
|
|
24
24
|
},
|
|
25
25
|
"engines": {
|
|
26
26
|
"node": ">=18.0.0"
|
|
@@ -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.2.
|
|
221
|
-
"signatureUrl": "https://developer.salesforce.com/media/salesforce-cli/security/@salesforce/plugin-apex/3.2.
|
|
220
|
+
"publicKeyUrl": "https://developer.salesforce.com/media/salesforce-cli/security/@salesforce/plugin-apex/3.2.1.crt",
|
|
221
|
+
"signatureUrl": "https://developer.salesforce.com/media/salesforce-cli/security/@salesforce/plugin-apex/3.2.1.sig"
|
|
222
222
|
}
|
|
223
223
|
}
|