@salesforce/cli 2.107.4 → 2.107.6
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 +128 -8
- package/npm-shrinkwrap.json +619 -974
- package/oclif.lock +692 -934
- package/oclif.manifest.json +1 -1
- package/package.json +4 -4
package/README.md
CHANGED
|
@@ -25,7 +25,7 @@ $ npm install -g @salesforce/cli
|
|
|
25
25
|
$ sf COMMAND
|
|
26
26
|
running command...
|
|
27
27
|
$ sf (--version|-v)
|
|
28
|
-
@salesforce/cli/2.107.
|
|
28
|
+
@salesforce/cli/2.107.6 linux-x64 node-v22.19.0
|
|
29
29
|
$ sf --help [COMMAND]
|
|
30
30
|
USAGE
|
|
31
31
|
$ sf COMMAND
|
|
@@ -107,6 +107,7 @@ See [architecture page](ARCHITECTURE.md) for diagrams of the Salesforce CLI.
|
|
|
107
107
|
- [`sf lightning generate interface`](#sf-lightning-generate-interface)
|
|
108
108
|
- [`sf lightning generate test`](#sf-lightning-generate-test)
|
|
109
109
|
- [`sf logic get test`](#sf-logic-get-test)
|
|
110
|
+
- [`sf logic run test`](#sf-logic-run-test)
|
|
110
111
|
- [`sf org assign permset`](#sf-org-assign-permset)
|
|
111
112
|
- [`sf org assign permsetlicense`](#sf-org-assign-permsetlicense)
|
|
112
113
|
- [`sf org create sandbox`](#sf-org-create-sandbox)
|
|
@@ -1268,7 +1269,7 @@ FLAG DESCRIPTIONS
|
|
|
1268
1269
|
directory.
|
|
1269
1270
|
```
|
|
1270
1271
|
|
|
1271
|
-
_See code: [@salesforce/plugin-apex](https://github.com/salesforcecli/plugin-apex/blob/3.
|
|
1272
|
+
_See code: [@salesforce/plugin-apex](https://github.com/salesforcecli/plugin-apex/blob/3.8.0/src/commands/apex/get/log.ts)_
|
|
1272
1273
|
|
|
1273
1274
|
## `sf apex get test`
|
|
1274
1275
|
|
|
@@ -1328,7 +1329,7 @@ EXAMPLES
|
|
|
1328
1329
|
me@myorg'
|
|
1329
1330
|
```
|
|
1330
1331
|
|
|
1331
|
-
_See code: [@salesforce/plugin-apex](https://github.com/salesforcecli/plugin-apex/blob/3.
|
|
1332
|
+
_See code: [@salesforce/plugin-apex](https://github.com/salesforcecli/plugin-apex/blob/3.8.0/src/commands/apex/get/test.ts)_
|
|
1332
1333
|
|
|
1333
1334
|
## `sf apex list log`
|
|
1334
1335
|
|
|
@@ -1368,7 +1369,7 @@ EXAMPLES
|
|
|
1368
1369
|
$ sf apex list log --target-org me@my.org
|
|
1369
1370
|
```
|
|
1370
1371
|
|
|
1371
|
-
_See code: [@salesforce/plugin-apex](https://github.com/salesforcecli/plugin-apex/blob/3.
|
|
1372
|
+
_See code: [@salesforce/plugin-apex](https://github.com/salesforcecli/plugin-apex/blob/3.8.0/src/commands/apex/list/log.ts)_
|
|
1372
1373
|
|
|
1373
1374
|
## `sf apex run`
|
|
1374
1375
|
|
|
@@ -1415,7 +1416,7 @@ EXAMPLES
|
|
|
1415
1416
|
$ sf apex run
|
|
1416
1417
|
```
|
|
1417
1418
|
|
|
1418
|
-
_See code: [@salesforce/plugin-apex](https://github.com/salesforcecli/plugin-apex/blob/3.
|
|
1419
|
+
_See code: [@salesforce/plugin-apex](https://github.com/salesforcecli/plugin-apex/blob/3.8.0/src/commands/apex/run.ts)_
|
|
1419
1420
|
|
|
1420
1421
|
## `sf apex run test`
|
|
1421
1422
|
|
|
@@ -1467,6 +1468,9 @@ DESCRIPTION
|
|
|
1467
1468
|
haven't finished by the end of the wait time, the command displays a test run ID. Use the "sf apex get test
|
|
1468
1469
|
--test-run-id" command to get the results.
|
|
1469
1470
|
|
|
1471
|
+
To run both Apex and Flow tests together, run the "sf logic run test" CLI command, which has similar flags as this
|
|
1472
|
+
command, but expands the --tests flag to also include Flow tests.
|
|
1473
|
+
|
|
1470
1474
|
You must have the "View All Data" system permission to use this command. The permission is disabled by default and can
|
|
1471
1475
|
be enabled only by a system administrator.
|
|
1472
1476
|
|
|
@@ -1558,7 +1562,7 @@ FLAG DESCRIPTIONS
|
|
|
1558
1562
|
--tests Test1 --tests Test2
|
|
1559
1563
|
```
|
|
1560
1564
|
|
|
1561
|
-
_See code: [@salesforce/plugin-apex](https://github.com/salesforcecli/plugin-apex/blob/3.
|
|
1565
|
+
_See code: [@salesforce/plugin-apex](https://github.com/salesforcecli/plugin-apex/blob/3.8.0/src/commands/apex/run/test.ts)_
|
|
1562
1566
|
|
|
1563
1567
|
## `sf apex tail log`
|
|
1564
1568
|
|
|
@@ -1601,7 +1605,7 @@ EXAMPLES
|
|
|
1601
1605
|
$ sf apex tail log --color --skip-trace-flag
|
|
1602
1606
|
```
|
|
1603
1607
|
|
|
1604
|
-
_See code: [@salesforce/plugin-apex](https://github.com/salesforcecli/plugin-apex/blob/3.
|
|
1608
|
+
_See code: [@salesforce/plugin-apex](https://github.com/salesforcecli/plugin-apex/blob/3.8.0/src/commands/apex/tail/log.ts)_
|
|
1605
1609
|
|
|
1606
1610
|
## `sf api request graphql`
|
|
1607
1611
|
|
|
@@ -3700,7 +3704,123 @@ EXAMPLES
|
|
|
3700
3704
|
$ sf logic get test --test-run-id <test run id> --result-format junit --target-org my-scratch
|
|
3701
3705
|
```
|
|
3702
3706
|
|
|
3703
|
-
_See code: [@salesforce/plugin-apex](https://github.com/salesforcecli/plugin-apex/blob/3.
|
|
3707
|
+
_See code: [@salesforce/plugin-apex](https://github.com/salesforcecli/plugin-apex/blob/3.8.0/src/commands/logic/get/test.ts)_
|
|
3708
|
+
|
|
3709
|
+
## `sf logic run test`
|
|
3710
|
+
|
|
3711
|
+
Invoke tests for Apex and Flows in an org.
|
|
3712
|
+
|
|
3713
|
+
```
|
|
3714
|
+
USAGE
|
|
3715
|
+
$ sf logic run test -o <value> [--json] [--flags-dir <value>] [--api-version <value>] [-d <value>] [-l
|
|
3716
|
+
RunLocalTests|RunAllTestsInOrg|RunSpecifiedTests] [-n <value>... | -s <value>... | -t <value>... | --test-category
|
|
3717
|
+
Apex|Flow...] [-r human|tap|junit|json] [-w <value>] [-y] [-v -c] [--concise]
|
|
3718
|
+
|
|
3719
|
+
FLAGS
|
|
3720
|
+
-c, --code-coverage Retrieve code coverage results.
|
|
3721
|
+
-d, --output-dir=<value> Directory in which to store test run files.
|
|
3722
|
+
-l, --test-level=<option> Level of tests to run; default is RunLocalTests.
|
|
3723
|
+
<options: RunLocalTests|RunAllTestsInOrg|RunSpecifiedTests>
|
|
3724
|
+
-n, --class-names=<value>... Apex test class names to run; default is all classes.
|
|
3725
|
+
-o, --target-org=<value> (required) Username or alias of the target org. Not required if the `target-org`
|
|
3726
|
+
configuration variable is already set.
|
|
3727
|
+
-r, --result-format=<option> [default: human] Format of the test results.
|
|
3728
|
+
<options: human|tap|junit|json>
|
|
3729
|
+
-s, --suite-names=<value>... Apex test suite names to run.
|
|
3730
|
+
-t, --tests=<value>... Comma-separated list of test names to run. Can include Apex test classes and Flow
|
|
3731
|
+
tests.
|
|
3732
|
+
-v, --detailed-coverage Display detailed code coverage per test.
|
|
3733
|
+
-w, --wait=<value> Sets the streaming client socket timeout in minutes; specify a longer wait time if
|
|
3734
|
+
timeouts occur frequently.
|
|
3735
|
+
-y, --synchronous Runs test methods from a single Apex class synchronously; if not specified, tests are
|
|
3736
|
+
run asynchronously.
|
|
3737
|
+
--api-version=<value> Override the api version used for api requests made by this command
|
|
3738
|
+
--concise Display only failed test results; works with human-readable output only.
|
|
3739
|
+
--test-category=<option>... Category of tests to run, such as Apex or Flow.
|
|
3740
|
+
<options: Apex|Flow>
|
|
3741
|
+
|
|
3742
|
+
GLOBAL FLAGS
|
|
3743
|
+
--flags-dir=<value> Import flag values from a directory.
|
|
3744
|
+
--json Format output as json.
|
|
3745
|
+
|
|
3746
|
+
DESCRIPTION
|
|
3747
|
+
Invoke tests for Apex and Flows in an org.
|
|
3748
|
+
|
|
3749
|
+
This command provides a single and unified way to run tests for multiple Salesforce features, such as Apex classes and
|
|
3750
|
+
Flows. Running the tests together with a single command ensures seamless interoperability between the features.
|
|
3751
|
+
|
|
3752
|
+
By default, the command executes asynchronously and returns a test run ID. Then use the "sf logic get test" command to
|
|
3753
|
+
retrieve the results. If you want to wait for the test run to complete and see the results in the command output, use
|
|
3754
|
+
the --synchronous flag.
|
|
3755
|
+
|
|
3756
|
+
To run specific tests, use the --tests flag, passing it the Apex test class names or the Flow tests in the form
|
|
3757
|
+
Flowtest.<name>. You can also run specific test methods, although if you run the tests synchronously, the methods must
|
|
3758
|
+
belong to a single Apex class or Flow test. To run all tests of a certain category, use --test-level with
|
|
3759
|
+
--test-category. If neither flag is specified, all local tests for all categories are run by default. You can also use
|
|
3760
|
+
the --class-names and --suite-names flags to run Apex test classes or suites.
|
|
3761
|
+
|
|
3762
|
+
To see code coverage results, use the --code-coverage flag with --result-format. The output displays a high-level
|
|
3763
|
+
summary of the test run and the code coverage values for the tested classes or flows. If you specify human-readable
|
|
3764
|
+
result format, use the --detailed-coverage flag to see detailed coverage results for each test method run.
|
|
3765
|
+
|
|
3766
|
+
You must have the "View All Data" org system permission to use this command. The permission is disabled by default and
|
|
3767
|
+
can be enabled only by a system administrator.
|
|
3768
|
+
|
|
3769
|
+
EXAMPLES
|
|
3770
|
+
Run a mix of specific Apex and Flow tests asynchronously in your default org:
|
|
3771
|
+
|
|
3772
|
+
$ sf logic run test --tests MyApexClassTest,FlowTest.ProcessOrder
|
|
3773
|
+
|
|
3774
|
+
Run all local Apex and Flow tests and wait for the results to complete; run the tests in the org with alias
|
|
3775
|
+
"my-scratch":
|
|
3776
|
+
|
|
3777
|
+
$ sf logic run test --test-level RunLocalTests --test-category Apex --test-category Flow --synchronous \
|
|
3778
|
+
--target-org my-scratch
|
|
3779
|
+
|
|
3780
|
+
Run two methods in an Apex test class and an Apex test suite:
|
|
3781
|
+
|
|
3782
|
+
$ sf logic run test --class-names MyApexClassTest.methodA --class-names MyApexClassTest.methodB --suite-names \
|
|
3783
|
+
MySuite
|
|
3784
|
+
|
|
3785
|
+
Run all local tests for all categories (the default behavior), save the JUnit results to the "test-results"
|
|
3786
|
+
directory, and include code coverage results:
|
|
3787
|
+
|
|
3788
|
+
$ sf logic run test --result-format junit --output-dir test-results --synchronous --code-coverage
|
|
3789
|
+
|
|
3790
|
+
FLAG DESCRIPTIONS
|
|
3791
|
+
-l, --test-level=RunLocalTests|RunAllTestsInOrg|RunSpecifiedTests Level of tests to run; default is RunLocalTests.
|
|
3792
|
+
|
|
3793
|
+
Here's what the levels mean:
|
|
3794
|
+
|
|
3795
|
+
- RunSpecifiedTests — Only the tests that you specify in the runTests option are run. Code coverage requirements
|
|
3796
|
+
differ from the default coverage requirements when using this test level. The executed tests must cover each class
|
|
3797
|
+
and trigger in the deployment package for a minimum of 75% code coverage. This coverage is computed for each class
|
|
3798
|
+
and triggers individually, and is different than the overall coverage percentage.
|
|
3799
|
+
- RunLocalTests — All local tests in your org, including tests that originate from no-namespaced unlocked packages,
|
|
3800
|
+
are run. The tests that originate from installed managed packages and namespaced unlocked packages aren't run. This
|
|
3801
|
+
test level is the default for production deployments that include Apex classes or triggers.
|
|
3802
|
+
- RunAllTestsInOrg — All tests are run. The tests include all tests in your org.
|
|
3803
|
+
|
|
3804
|
+
-n, --class-names=<value>... Apex test class names to run; default is all classes.
|
|
3805
|
+
|
|
3806
|
+
If you select --class-names, you can't specify --suite-names or --tests.
|
|
3807
|
+
For multiple classes, repeat the flag for each.
|
|
3808
|
+
--class-names Class1 --class-names Class2
|
|
3809
|
+
|
|
3810
|
+
-s, --suite-names=<value>... Apex test suite names to run.
|
|
3811
|
+
|
|
3812
|
+
If you select --suite-names, you can't specify --class-names or --tests.
|
|
3813
|
+
For multiple suites, repeat the flag for each.
|
|
3814
|
+
--suite-names Suite1 --suite-names Suite2
|
|
3815
|
+
|
|
3816
|
+
-t, --tests=<value>... Comma-separated list of test names to run. Can include Apex test classes and Flow tests.
|
|
3817
|
+
|
|
3818
|
+
If you specify --tests, you can't specify --class-names or --suite-names
|
|
3819
|
+
For multiple tests, repeat the flag for each.
|
|
3820
|
+
--tests Test1 --tests Test2
|
|
3821
|
+
```
|
|
3822
|
+
|
|
3823
|
+
_See code: [@salesforce/plugin-apex](https://github.com/salesforcecli/plugin-apex/blob/3.8.0/src/commands/logic/run/test.ts)_
|
|
3704
3824
|
|
|
3705
3825
|
## `sf org assign permset`
|
|
3706
3826
|
|