You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy file name to clipboardExpand all lines: messages/runlogictest.md
+20-19Lines changed: 20 additions & 19 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -4,37 +4,38 @@ Invoke tests for Apex and Flows in an org.
4
4
5
5
# description
6
6
7
-
This command provides a single, unified interface to run tests for multiple metadata types.
8
-
By default, the command executes asynchronously, returning a test run ID. Use 'sf logic get test' to retrieve the results.
9
-
Use the --synchronous flag to wait for the test run to complete and see the results in the command output.
10
-
To run specific tests, use --test-names. To run all tests of a certain type, use --test-level with --test-category. If neither is specified, all local tests for all categories will be run.
7
+
This command provides a single and unified way to run tests for multiple Salesforce features, such as Apex classes and Flows. Running the tests together with a single command ensures seamless interoperability between the features.
11
8
12
-
# examples
9
+
By default, the command executes asynchronously and returns a test run ID. Then use the "sf logic get test" command to retrieve the results. If you want to wait for the test run to complete and see the results in the command output, use the --synchronous flag.
13
10
14
-
- Run a mix of specific named tests for Apex and Flow asynchronously:
11
+
To run specific tests, use the --tests flag, passing it the Apex test class names or the Flow tests in the form Flowtest.<name>. You can also run specific test methods, although if you run the tests synchronously, the methods must belong to a single Apex class or Flow test. To run all tests of a certain category, use --test-level with --test-category. If neither flag is specified, all local tests for all categories are run by default. You can also use the --class-names and --suite-names flags to run Apex test classes or suites.
To 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 the tested classes or flows. If you specify human-readable result format, use the --detailed-coverage flag to see detailed coverage results for each test method run.
17
14
18
-
- Run all local tests for only the Apex and Flow categories, waiting for the results to complete:
15
+
You must have the "View All Data" org system permission to use this command. The permission is disabled by default and can be enabled only by a system administrator.
- Run all local tests for all categories (the default behavior), save the JUnit results to the "test-results" directory, and include code coverage results:
35
32
36
-
Category of tests to run. Can be specified multiple times. Valid values are 'Apex' and 'Flow'.
Copy file name to clipboardExpand all lines: messages/runtest.md
-41Lines changed: 0 additions & 41 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -127,44 +127,3 @@ Display detailed code coverage per test.
127
127
# flags.concise.summary
128
128
129
129
Display only failed test results; works with human-readable output only.
130
-
131
-
# runTestReportCommand
132
-
133
-
Run "%s apex get test -i %s -o %s" to retrieve test results
134
-
135
-
# runLogicTestReportCommand
136
-
137
-
Run "%s logic get test -i %s -o %s" to retrieve test results
138
-
139
-
# runTestSyncInstructions
140
-
141
-
Run with --synchronous or increase --wait timeout to wait for results.
142
-
143
-
# syncClassErr
144
-
145
-
Synchronous test runs can include test methods from only one Apex class. Omit the --synchronous flag or include tests from only one class.
146
-
147
-
# syncClassErrForUnifiedLogic
148
-
149
-
Synchronous test runs can include test methods from either a single Apex class or a single Flow test. Omit the --synchronous flag or include test methods from only one class or Flow.
150
-
151
-
# testLevelErr
152
-
153
-
When specifying classnames, suitenames, or tests, indicate RunSpecifiedTests as the testlevel
154
-
155
-
# testResultProcessErr
156
-
157
-
Encountered an error when processing test results
158
-
%s
159
-
160
-
# apexTestReportFormatHint
161
-
162
-
Run "sf apex get test %s --result-format <format>" to retrieve test results in a different format.
0 commit comments