@salesforce/plugin-apex 3.8.1-dev.0 → 3.8.2
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 +38 -52
- package/lib/commands/logic/run/test.js +1 -1
- package/lib/commands/logic/run/test.js.map +1 -1
- package/lib/shared/TestRunService.d.ts +1 -1
- package/lib/shared/TestRunService.js +7 -4
- package/lib/shared/TestRunService.js.map +1 -1
- package/messages/logicgettest.md +3 -3
- package/messages/runlogictest.md +10 -18
- package/oclif.manifest.json +9 -11
- package/package.json +7 -7
package/README.md
CHANGED
|
@@ -150,7 +150,7 @@ FLAG DESCRIPTIONS
|
|
|
150
150
|
directory.
|
|
151
151
|
```
|
|
152
152
|
|
|
153
|
-
_See code: [src/commands/apex/get/log.ts](https://github.com/salesforcecli/plugin-apex/blob/3.8.
|
|
153
|
+
_See code: [src/commands/apex/get/log.ts](https://github.com/salesforcecli/plugin-apex/blob/3.8.2/src/commands/apex/get/log.ts)_
|
|
154
154
|
|
|
155
155
|
## `sf apex get test`
|
|
156
156
|
|
|
@@ -210,7 +210,7 @@ EXAMPLES
|
|
|
210
210
|
me@myorg'
|
|
211
211
|
```
|
|
212
212
|
|
|
213
|
-
_See code: [src/commands/apex/get/test.ts](https://github.com/salesforcecli/plugin-apex/blob/3.8.
|
|
213
|
+
_See code: [src/commands/apex/get/test.ts](https://github.com/salesforcecli/plugin-apex/blob/3.8.2/src/commands/apex/get/test.ts)_
|
|
214
214
|
|
|
215
215
|
## `sf apex list log`
|
|
216
216
|
|
|
@@ -250,7 +250,7 @@ EXAMPLES
|
|
|
250
250
|
$ sf apex list log --target-org me@my.org
|
|
251
251
|
```
|
|
252
252
|
|
|
253
|
-
_See code: [src/commands/apex/list/log.ts](https://github.com/salesforcecli/plugin-apex/blob/3.8.
|
|
253
|
+
_See code: [src/commands/apex/list/log.ts](https://github.com/salesforcecli/plugin-apex/blob/3.8.2/src/commands/apex/list/log.ts)_
|
|
254
254
|
|
|
255
255
|
## `sf apex run`
|
|
256
256
|
|
|
@@ -297,7 +297,7 @@ EXAMPLES
|
|
|
297
297
|
$ sf apex run
|
|
298
298
|
```
|
|
299
299
|
|
|
300
|
-
_See code: [src/commands/apex/run.ts](https://github.com/salesforcecli/plugin-apex/blob/3.8.
|
|
300
|
+
_See code: [src/commands/apex/run.ts](https://github.com/salesforcecli/plugin-apex/blob/3.8.2/src/commands/apex/run.ts)_
|
|
301
301
|
|
|
302
302
|
## `sf apex run test`
|
|
303
303
|
|
|
@@ -443,7 +443,7 @@ FLAG DESCRIPTIONS
|
|
|
443
443
|
--tests Test1 --tests Test2
|
|
444
444
|
```
|
|
445
445
|
|
|
446
|
-
_See code: [src/commands/apex/run/test.ts](https://github.com/salesforcecli/plugin-apex/blob/3.8.
|
|
446
|
+
_See code: [src/commands/apex/run/test.ts](https://github.com/salesforcecli/plugin-apex/blob/3.8.2/src/commands/apex/run/test.ts)_
|
|
447
447
|
|
|
448
448
|
## `sf apex tail log`
|
|
449
449
|
|
|
@@ -486,7 +486,7 @@ EXAMPLES
|
|
|
486
486
|
$ sf apex tail log --color --skip-trace-flag
|
|
487
487
|
```
|
|
488
488
|
|
|
489
|
-
_See code: [src/commands/apex/tail/log.ts](https://github.com/salesforcecli/plugin-apex/blob/3.8.
|
|
489
|
+
_See code: [src/commands/apex/tail/log.ts](https://github.com/salesforcecli/plugin-apex/blob/3.8.2/src/commands/apex/tail/log.ts)_
|
|
490
490
|
|
|
491
491
|
## `sf logic get test`
|
|
492
492
|
|
|
@@ -516,8 +516,8 @@ GLOBAL FLAGS
|
|
|
516
516
|
DESCRIPTION
|
|
517
517
|
Get the results of a test run.
|
|
518
518
|
|
|
519
|
-
When you run
|
|
520
|
-
|
|
519
|
+
When you run 'sf logic run test' to test Apex classes and Flows asynchronously, it returns a test run ID. Use that ID
|
|
520
|
+
with this command to see the results.
|
|
521
521
|
|
|
522
522
|
To see code coverage results, use the --code-coverage flag with --result-format. The output displays a high-level
|
|
523
523
|
summary of the test run and the code coverage values for classes in your org. If you specify human-readable result
|
|
@@ -526,25 +526,25 @@ DESCRIPTION
|
|
|
526
526
|
EXAMPLES
|
|
527
527
|
Get the results for a specific test run ID in the default human-readable format; uses your default org:
|
|
528
528
|
|
|
529
|
-
$ sf logic get test --test-run-id <test
|
|
529
|
+
$ sf logic get test --test-run-id <test run id>
|
|
530
530
|
|
|
531
531
|
Get the results for a specific test run ID, format them as JUnit, and save them to the "test-results/junit"
|
|
532
532
|
directory; uses the org with alias "my-scratch":
|
|
533
533
|
|
|
534
|
-
$ sf logic get test --test-run-id <test
|
|
534
|
+
$ sf logic get test --test-run-id <test run id> --result-format junit --target-org my-scratch
|
|
535
535
|
```
|
|
536
536
|
|
|
537
|
-
_See code: [src/commands/logic/get/test.ts](https://github.com/salesforcecli/plugin-apex/blob/3.8.
|
|
537
|
+
_See code: [src/commands/logic/get/test.ts](https://github.com/salesforcecli/plugin-apex/blob/3.8.2/src/commands/logic/get/test.ts)_
|
|
538
538
|
|
|
539
539
|
## `sf logic run test`
|
|
540
540
|
|
|
541
|
-
Invoke tests for Apex
|
|
541
|
+
Invoke tests for Apex and Flows in an org.
|
|
542
542
|
|
|
543
543
|
```
|
|
544
544
|
USAGE
|
|
545
545
|
$ sf logic run test -o <value> [--json] [--flags-dir <value>] [--api-version <value>] [-d <value>] [-l
|
|
546
546
|
RunLocalTests|RunAllTestsInOrg|RunSpecifiedTests] [-n <value>... | -s <value>... | -t <value>... | --test-category
|
|
547
|
-
|
|
547
|
+
Apex|Flow...] [-r human|tap|junit|json] [-w <value>] [-y] [-v -c] [--concise]
|
|
548
548
|
|
|
549
549
|
FLAGS
|
|
550
550
|
-c, --code-coverage Retrieve code coverage results.
|
|
@@ -557,8 +557,8 @@ FLAGS
|
|
|
557
557
|
-r, --result-format=<option> [default: human] Format of the test results.
|
|
558
558
|
<options: human|tap|junit|json>
|
|
559
559
|
-s, --suite-names=<value>... Apex test suite names to run.
|
|
560
|
-
-t, --tests=<value>...
|
|
561
|
-
|
|
560
|
+
-t, --tests=<value>... Comma-separated list of test names to run. Can include Apex test classes and Flow
|
|
561
|
+
tests.
|
|
562
562
|
-v, --detailed-coverage Display detailed code coverage per test.
|
|
563
563
|
-w, --wait=<value> Sets the streaming client socket timeout in minutes; specify a longer wait time if
|
|
564
564
|
timeouts occur frequently.
|
|
@@ -566,58 +566,46 @@ FLAGS
|
|
|
566
566
|
run asynchronously.
|
|
567
567
|
--api-version=<value> Override the api version used for api requests made by this command
|
|
568
568
|
--concise Display only failed test results; works with human-readable output only.
|
|
569
|
-
--test-category=<option>... Category of tests to run, such as
|
|
570
|
-
<options:
|
|
569
|
+
--test-category=<option>... Category of tests to run, such as Apex or Flow.
|
|
570
|
+
<options: Apex|Flow>
|
|
571
571
|
|
|
572
572
|
GLOBAL FLAGS
|
|
573
573
|
--flags-dir=<value> Import flag values from a directory.
|
|
574
574
|
--json Format output as json.
|
|
575
575
|
|
|
576
576
|
DESCRIPTION
|
|
577
|
-
Invoke tests for Apex
|
|
577
|
+
Invoke tests for Apex and Flows in an org.
|
|
578
578
|
|
|
579
|
-
This command provides a single and unified way to run tests for multiple Salesforce features, such as Apex classes
|
|
580
|
-
Flows
|
|
581
|
-
between the features.
|
|
579
|
+
This command provides a single and unified way to run tests for multiple Salesforce features, such as Apex classes and
|
|
580
|
+
Flows. Running the tests together with a single command ensures seamless interoperability between the features.
|
|
582
581
|
|
|
583
|
-
By default, the command executes asynchronously and returns a test run ID. Then use the
|
|
584
|
-
|
|
585
|
-
|
|
582
|
+
By default, the command executes asynchronously and returns a test run ID. Then use the "sf logic get test" command to
|
|
583
|
+
retrieve the results. If you want to wait for the test run to complete and see the results in the command output, use
|
|
584
|
+
the --synchronous flag.
|
|
586
585
|
|
|
587
|
-
To run specific tests, use the --tests flag and pass it the names of Apex
|
|
588
|
-
|
|
589
|
-
|
|
590
|
-
-
|
|
591
|
-
|
|
592
|
-
this command and specify the Flow category, such as "sf logic run test --synchronous --test-category Flow --test-level
|
|
593
|
-
RunAllTestsInOrg". The command displays a table of all the Flow tests it ran; see the "TEST NAME" column for the full
|
|
594
|
-
name of all available Flow tests in your org.
|
|
595
|
-
- For Agentforce agents, use the format "AgentTesting.<name-of-agent-test>". To find the names of all the Agentforce
|
|
596
|
-
agent tests in your org, run the "sf agent test list" command. The command displays the available agent tests in the
|
|
597
|
-
"API Name" column.
|
|
586
|
+
To run specific tests, use the --tests flag and pass it the names of Apex and Flow tests. For Apex, simply specify the
|
|
587
|
+
name of the Apex test class. For Flows, use the format "FlowTesting.<name-of-flow-test>". To find the name of all the
|
|
588
|
+
flow tests in your org, run this command and specify the Flow category, such as "sf logic run test --synchronous
|
|
589
|
+
--test-category Flow --test-level RunAllTestsInOrg". The command displays a table of all the flow tests it ran; see
|
|
590
|
+
the "TEST NAME" column for the full name of all available flow tests in your org.
|
|
598
591
|
|
|
599
592
|
You can also run specific test methods, although if you run the tests synchronously, the methods must belong to a
|
|
600
|
-
single Apex class
|
|
601
|
-
|
|
602
|
-
|
|
593
|
+
single Apex class or Flow test. To run all tests of a certain category, use --test-category and --test-level together.
|
|
594
|
+
If neither of these flags is specified, all local tests for all categories are run by default. You can also use the
|
|
595
|
+
--class-names and --suite-names flags to run Apex test classes or suites.
|
|
603
596
|
|
|
604
597
|
To see code coverage results, use the --code-coverage flag with --result-format. The output displays a high-level
|
|
605
|
-
summary of the test run and the code coverage values for the tested
|
|
606
|
-
|
|
607
|
-
method run.
|
|
598
|
+
summary of the test run and the code coverage values for the tested classes or flows. If you specify human-readable
|
|
599
|
+
result format, use the --detailed-coverage flag to see detailed coverage results for each test method run.
|
|
608
600
|
|
|
609
601
|
You must have the "View All Data" org system permission to use this command. The permission is disabled by default and
|
|
610
602
|
can be enabled only by a system administrator.
|
|
611
603
|
|
|
612
604
|
EXAMPLES
|
|
613
|
-
Run a specific
|
|
614
|
-
|
|
615
|
-
$ sf logic run test --tests AgentTesting.Guest_Experience_Agent_Test
|
|
605
|
+
Run a mix of specific Apex and Flow tests asynchronously in your default org:
|
|
616
606
|
|
|
617
|
-
|
|
618
|
-
|
|
619
|
-
$ sf logic run test --tests AgentTesting.Guest_Experience_Agent_Test --tests MyApexClassTest --tests \
|
|
620
|
-
FlowTesting.Modify_Account_Desc.Modify_Account_Desc_TestAccountDescription
|
|
607
|
+
$ sf logic run test --tests \
|
|
608
|
+
MyApexClassTest,FlowTesting.Modify_Account_Desc.Modify_Account_Desc_TestAccountDescription
|
|
621
609
|
|
|
622
610
|
Run all local Apex and Flow tests and wait for the results to complete; run the tests in the org with alias
|
|
623
611
|
"my-scratch":
|
|
@@ -661,15 +649,13 @@ FLAG DESCRIPTIONS
|
|
|
661
649
|
For multiple suites, repeat the flag for each.
|
|
662
650
|
--suite-names Suite1 --suite-names Suite2
|
|
663
651
|
|
|
664
|
-
-t, --tests=<value>...
|
|
665
|
-
|
|
666
|
-
List of test names to run. Can include Apex test classes, Flow tests, and Agentforce agent tests.
|
|
652
|
+
-t, --tests=<value>... Comma-separated list of test names to run. Can include Apex test classes and Flow tests.
|
|
667
653
|
|
|
668
654
|
If you specify --tests, you can't specify --class-names or --suite-names
|
|
669
655
|
For multiple tests, repeat the flag for each.
|
|
670
656
|
--tests Test1 --tests Test2
|
|
671
657
|
```
|
|
672
658
|
|
|
673
|
-
_See code: [src/commands/logic/run/test.ts](https://github.com/salesforcecli/plugin-apex/blob/3.8.
|
|
659
|
+
_See code: [src/commands/logic/run/test.ts](https://github.com/salesforcecli/plugin-apex/blob/3.8.2/src/commands/logic/run/test.ts)_
|
|
674
660
|
|
|
675
661
|
<!-- commandsstop -->
|
|
@@ -93,7 +93,7 @@ export default class RunTestLogic extends SfCommand {
|
|
|
93
93
|
}),
|
|
94
94
|
'test-category': arrayWithDeprecation({
|
|
95
95
|
summary: messages.getMessage('flags.test-category.summary'),
|
|
96
|
-
options: ['
|
|
96
|
+
options: ['Apex', 'Flow'],
|
|
97
97
|
}),
|
|
98
98
|
};
|
|
99
99
|
cancellationTokenSource = new CancellationTok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B,CAAC;QAEF,oBAAoB;QACpB,MAAM,WAAW,GAAG,KAAK,IAAmB,EAAE;YAC5C,MAAM,IAAI,CAAC,uBAAuB,CAAC,WAAW,EAAE,CAAC;YACjD,OAAO,CAAC,IAAI,EAAE,CAAC;QACjB,CAAC,CAAC;QAEF,kEAAkE;QAClE,OAAO,CAAC,EAAE,CAAC,QAAQ,EAAE,WAAW,CAAC,CAAC;QAClC,kEAAkE;QAClE,OAAO,CAAC,EAAE,CAAC,SAAS,EAAE,WAAW,CAAC,CAAC;QAEnC,qCAAqC;QACrC,MAAM,UAAU,GAAG,KAAK,CAAC,YAAY,CAAC,CAAC,aAAa,CAAC,KAAK,CAAC,aAAa,CAAC,CAAC,CAAC;QAE3E,MAAM,OAAO,GAAG;YACd,KAAK;YACL,MAAM;YACN,UAAU;YACV,WAAW,EAAE,IAAI,CAAC,WAAW,EAAE;YAC/B,iBAAiB,EAAE,IAAI,CAAC,uBAAuB;YAC/C,GAAG,EAAE,CAAC,OAAe,EAAE,EAAE,CAAC,IAAI,CAAC,GAAG,CAAC,OAAO,CAAC;YAC3C,IAAI,EAAE,CAAC,OAAe,EAAE,EAAE,CAAC,IAAI,CAAC,IAAI,CAAC,OAAO,CAAC;SAC9C,CAAC;QAEF,OAAO,cAAc,CAAC,cAAc,CAAC,OAAO,CAAC,CAAC;IAChD,CAAC"}
|
|
@@ -42,7 +42,7 @@ export declare class TestRunService {
|
|
|
42
42
|
private static runTestAsynchronous;
|
|
43
43
|
/**
|
|
44
44
|
* Get test category based on command type and flags
|
|
45
|
-
* - apex command:
|
|
45
|
+
* - apex command: returns empty string for RunSpecifiedTests, 'Apex' for other test levels
|
|
46
46
|
* - logic command: returns test-category flag value or defaults to all categories
|
|
47
47
|
*/
|
|
48
48
|
private static getTestCategory;
|
|
@@ -60,7 +60,7 @@ export class TestRunService {
|
|
|
60
60
|
}
|
|
61
61
|
}
|
|
62
62
|
static async runTest(testService, flags, testLevel, config, cancellationToken) {
|
|
63
|
-
const testCategory = TestRunService.getTestCategory(flags, config);
|
|
63
|
+
const testCategory = TestRunService.getTestCategory(flags, config, testLevel);
|
|
64
64
|
const payload = {
|
|
65
65
|
...(await testService.buildSyncPayload(testLevel, flags.tests?.join(','), flags['class-names']?.join(','), testCategory)),
|
|
66
66
|
skipCodeCoverage: !flags['code-coverage'],
|
|
@@ -73,7 +73,7 @@ export class TestRunService {
|
|
|
73
73
|
}
|
|
74
74
|
}
|
|
75
75
|
static async runTestAsynchronous(testService, flags, testLevel, config, cancellationToken) {
|
|
76
|
-
const testCategory = TestRunService.getTestCategory(flags, config);
|
|
76
|
+
const testCategory = TestRunService.getTestCategory(flags, config, testLevel);
|
|
77
77
|
const payload = {
|
|
78
78
|
...(await testService.buildAsyncPayload(testLevel, flags.tests?.join(','), flags['class-names']?.join(','), flags['suite-names']?.join(','), testCategory)),
|
|
79
79
|
skipCodeCoverage: !flags['code-coverage'],
|
|
@@ -88,11 +88,14 @@ export class TestRunService {
|
|
|
88
88
|
}
|
|
89
89
|
/**
|
|
90
90
|
* Get test category based on command type and flags
|
|
91
|
-
* - apex command:
|
|
91
|
+
* - apex command: returns empty string for RunSpecifiedTests, 'Apex' for other test levels
|
|
92
92
|
* - logic command: returns test-category flag value or defaults to all categories
|
|
93
93
|
*/
|
|
94
|
-
static getTestCategory(flags, config) {
|
|
94
|
+
static getTestCategory(flags, config, testLevel) {
|
|
95
95
|
if (config.commandType === 'apex') {
|
|
96
|
+
if (testLevel === 'RunSpecifiedTests') {
|
|
97
|
+
return '';
|
|
98
|
+
}
|
|
96
99
|
return 'Apex';
|
|
97
100
|
}
|
|
98
101
|
// logic command
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"TestRunService.js","sourceRoot":"","sources":["../../src/shared/TestRunService.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;GAcG;AAEH,OAAO,EAAmE,WAAW,EAAE,MAAM,uBAAuB,CAAC;AACrH,OAAO,EAAE,EAAE,EAAE,MAAM,6B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I,OAAO,CAAC,UAAU,CAAC,IAAI,KAAK,EAAE,CAAC;YACxD,6DAAmC;QACrC,CAAC;QACD,qDAA+B;IACjC,CAAC;CACF"}
|
package/messages/logicgettest.md
CHANGED
|
@@ -4,7 +4,7 @@ Get the results of a test run.
|
|
|
4
4
|
|
|
5
5
|
# description
|
|
6
6
|
|
|
7
|
-
When you run
|
|
7
|
+
When you run 'sf logic run test' to test Apex classes and Flows asynchronously, it returns a test run ID. Use that ID with this command to see the results.
|
|
8
8
|
|
|
9
9
|
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 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.
|
|
10
10
|
|
|
@@ -12,11 +12,11 @@ To see code coverage results, use the --code-coverage flag with --result-format.
|
|
|
12
12
|
|
|
13
13
|
- Get the results for a specific test run ID in the default human-readable format; uses your default org:
|
|
14
14
|
|
|
15
|
-
<%= config.bin %> <%= command.id %> --test-run-id <test
|
|
15
|
+
<%= config.bin %> <%= command.id %> --test-run-id <test run id>
|
|
16
16
|
|
|
17
17
|
- Get the results for a specific test run ID, format them as JUnit, and save them to the "test-results/junit" directory; uses the org with alias "my-scratch":
|
|
18
18
|
|
|
19
|
-
<%= config.bin %> <%= command.id %> --test-run-id <test
|
|
19
|
+
<%= config.bin %> <%= command.id %> --test-run-id <test run id> --result-format junit --target-org my-scratch
|
|
20
20
|
|
|
21
21
|
# flags.test-run-id.summary
|
|
22
22
|
|
package/messages/runlogictest.md
CHANGED
|
@@ -1,34 +1,26 @@
|
|
|
1
1
|
# summary
|
|
2
2
|
|
|
3
|
-
Invoke tests for Apex
|
|
3
|
+
Invoke tests for Apex and Flows in an org.
|
|
4
4
|
|
|
5
5
|
# description
|
|
6
6
|
|
|
7
|
-
This command provides a single and unified way to run tests for multiple Salesforce features, such as Apex classes
|
|
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.
|
|
8
8
|
|
|
9
|
-
By default, the command executes asynchronously and returns a test run ID. Then use the
|
|
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.
|
|
10
10
|
|
|
11
|
-
To run specific tests, use the --tests flag and pass it the names of Apex
|
|
11
|
+
To run specific tests, use the --tests flag and pass it the names of Apex and Flow tests. For Apex, simply specify the name of the Apex test class. For Flows, use the format "FlowTesting.<name-of-flow-test>". To find the name of all the flow tests in your org, run this command and specify the Flow category, such as "sf logic run test --synchronous --test-category Flow --test-level RunAllTestsInOrg". The command displays a table of all the flow tests it ran; see the "TEST NAME" column for the full name of all available flow tests in your org.
|
|
12
12
|
|
|
13
|
-
|
|
14
|
-
- For Flows, use the format "FlowTesting.<name-of-flow-test>". To find the name of all the Flow tests in your org, run this command and specify the Flow category, such as "sf logic run test --synchronous --test-category Flow --test-level RunAllTestsInOrg". The command displays a table of all the Flow tests it ran; see the "TEST NAME" column for the full name of all available Flow tests in your org.
|
|
15
|
-
- For Agentforce agents, use the format "AgentTesting.<name-of-agent-test>". To find the names of all the Agentforce agent tests in your org, run the "sf agent test list" command. The command displays the available agent tests in the "API Name" column.
|
|
13
|
+
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-category and --test-level together. If neither of these flags 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.
|
|
16
14
|
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
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 Apex classes, Flows, or Agentforce agents. If you specify human-readable result format, use the --detailed-coverage flag to see detailed coverage results for each test method run.
|
|
15
|
+
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.
|
|
20
16
|
|
|
21
17
|
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.
|
|
22
18
|
|
|
23
19
|
# examples
|
|
24
20
|
|
|
25
|
-
- Run a specific
|
|
26
|
-
|
|
27
|
-
<%= config.bin %> <%= command.id %> --tests AgentTesting.Guest_Experience_Agent_Test
|
|
28
|
-
|
|
29
|
-
- Run a mix of specific Agentforce agent, Apex, and Flow tests asynchronously in your default org:
|
|
21
|
+
- Run a mix of specific Apex and Flow tests asynchronously in your default org:
|
|
30
22
|
|
|
31
|
-
<%= config.bin %> <%= command.id %> --tests
|
|
23
|
+
<%= config.bin %> <%= command.id %> --tests MyApexClassTest,FlowTesting.Modify_Account_Desc.Modify_Account_Desc_TestAccountDescription
|
|
32
24
|
|
|
33
25
|
- Run all local Apex and Flow tests and wait for the results to complete; run the tests in the org with alias "my-scratch":
|
|
34
26
|
|
|
@@ -44,8 +36,8 @@ You must have the "View All Data" org system permission to use this command. The
|
|
|
44
36
|
|
|
45
37
|
# flags.logicTests.summary
|
|
46
38
|
|
|
47
|
-
|
|
39
|
+
Comma-separated list of test names to run. Can include Apex test classes and Flow tests.
|
|
48
40
|
|
|
49
41
|
# flags.test-category.summary
|
|
50
42
|
|
|
51
|
-
Category of tests to run, such as
|
|
43
|
+
Category of tests to run, such as Apex or Flow.
|
package/oclif.manifest.json
CHANGED
|
@@ -980,10 +980,10 @@
|
|
|
980
980
|
"logic:get:test": {
|
|
981
981
|
"aliases": [],
|
|
982
982
|
"args": {},
|
|
983
|
-
"description": "When you run
|
|
983
|
+
"description": "When you run 'sf logic run test' to test Apex classes and Flows asynchronously, it returns a test run ID. Use that ID with this command to see the results.\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.",
|
|
984
984
|
"examples": [
|
|
985
|
-
"Get the results for a specific test run ID in the default human-readable format; uses your default org:\n<%= config.bin %> <%= command.id %> --test-run-id <test
|
|
986
|
-
"Get the results for a specific test run ID, format them as JUnit, and save them to the \"test-results/junit\" directory; uses the org with alias \"my-scratch\":\n<%= config.bin %> <%= command.id %> --test-run-id <test
|
|
985
|
+
"Get the results for a specific test run ID in the default human-readable format; uses your default org:\n<%= config.bin %> <%= command.id %> --test-run-id <test run id>",
|
|
986
|
+
"Get the results for a specific test run ID, format them as JUnit, and save them to the \"test-results/junit\" directory; uses the org with alias \"my-scratch\":\n<%= config.bin %> <%= command.id %> --test-run-id <test run id> --result-format junit --target-org my-scratch"
|
|
987
987
|
],
|
|
988
988
|
"flags": {
|
|
989
989
|
"json": {
|
|
@@ -1140,10 +1140,9 @@
|
|
|
1140
1140
|
"logic:run:test": {
|
|
1141
1141
|
"aliases": [],
|
|
1142
1142
|
"args": {},
|
|
1143
|
-
"description": "This command provides a single and unified way to run tests for multiple Salesforce features, such as Apex classes
|
|
1143
|
+
"description": "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.\n\nBy 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.\n\nTo run specific tests, use the --tests flag and pass it the names of Apex and Flow tests. For Apex, simply specify the name of the Apex test class. For Flows, use the format \"FlowTesting.<name-of-flow-test>\". To find the name of all the flow tests in your org, run this command and specify the Flow category, such as \"sf logic run test --synchronous --test-category Flow --test-level RunAllTestsInOrg\". The command displays a table of all the flow tests it ran; see the \"TEST NAME\" column for the full name of all available flow tests in your org.\n\nYou 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-category and --test-level together. If neither of these flags 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.\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 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.\n\nYou 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.",
|
|
1144
1144
|
"examples": [
|
|
1145
|
-
"Run a specific
|
|
1146
|
-
"Run a mix of specific Agentforce agent, Apex, and Flow tests asynchronously in your default org:\n<%= config.bin %> <%= command.id %> --tests AgentTesting.Guest_Experience_Agent_Test --tests MyApexClassTest --tests FlowTesting.Modify_Account_Desc.Modify_Account_Desc_TestAccountDescription",
|
|
1145
|
+
"Run a mix of specific Apex and Flow tests asynchronously in your default org:\n<%= config.bin %> <%= command.id %> --tests MyApexClassTest,FlowTesting.Modify_Account_Desc.Modify_Account_Desc_TestAccountDescription",
|
|
1147
1146
|
"Run all local Apex and Flow tests and wait for the results to complete; run the tests in the org with alias \"my-scratch\":\n<%= config.bin %> <%= command.id %> --test-level RunLocalTests --test-category Apex --test-category Flow --synchronous --target-org my-scratch",
|
|
1148
1147
|
"Run two methods in an Apex test class and an Apex test suite:\n<%= config.bin %> <%= command.id %> --class-names MyApexClassTest.methodA --class-names MyApexClassTest.methodB --suite-names MySuite",
|
|
1149
1148
|
"Run all local tests for all categories (the default behavior), save the JUnit results to the \"test-results\" directory, and include code coverage results:\n<%= config.bin %> <%= command.id %> --result-format junit --output-dir test-results --synchronous --code-coverage"
|
|
@@ -1308,7 +1307,7 @@
|
|
|
1308
1307
|
"test-category"
|
|
1309
1308
|
],
|
|
1310
1309
|
"name": "tests",
|
|
1311
|
-
"summary": "
|
|
1310
|
+
"summary": "Comma-separated list of test names to run. Can include Apex test classes and Flow tests.",
|
|
1312
1311
|
"delimiter": ",",
|
|
1313
1312
|
"hasDynamicHelp": false,
|
|
1314
1313
|
"multiple": true,
|
|
@@ -1351,12 +1350,11 @@
|
|
|
1351
1350
|
},
|
|
1352
1351
|
"test-category": {
|
|
1353
1352
|
"name": "test-category",
|
|
1354
|
-
"summary": "Category of tests to run, such as
|
|
1353
|
+
"summary": "Category of tests to run, such as Apex or Flow.",
|
|
1355
1354
|
"delimiter": ",",
|
|
1356
1355
|
"hasDynamicHelp": false,
|
|
1357
1356
|
"multiple": true,
|
|
1358
1357
|
"options": [
|
|
1359
|
-
"Agent",
|
|
1360
1358
|
"Apex",
|
|
1361
1359
|
"Flow"
|
|
1362
1360
|
],
|
|
@@ -1371,7 +1369,7 @@
|
|
|
1371
1369
|
"pluginType": "core",
|
|
1372
1370
|
"state": "beta",
|
|
1373
1371
|
"strict": true,
|
|
1374
|
-
"summary": "Invoke tests for Apex
|
|
1372
|
+
"summary": "Invoke tests for Apex and Flows in an org.",
|
|
1375
1373
|
"enableJsonFlag": true,
|
|
1376
1374
|
"isESM": true,
|
|
1377
1375
|
"relativePath": [
|
|
@@ -1392,5 +1390,5 @@
|
|
|
1392
1390
|
]
|
|
1393
1391
|
}
|
|
1394
1392
|
},
|
|
1395
|
-
"version": "3.8.
|
|
1393
|
+
"version": "3.8.2"
|
|
1396
1394
|
}
|
package/package.json
CHANGED
|
@@ -1,24 +1,24 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@salesforce/plugin-apex",
|
|
3
3
|
"description": "Apex commands",
|
|
4
|
-
"version": "3.8.
|
|
4
|
+
"version": "3.8.2",
|
|
5
5
|
"author": "Salesforce",
|
|
6
6
|
"bugs": "https://github.com/forcedotcom/cli/issues",
|
|
7
7
|
"dependencies": {
|
|
8
|
-
"@salesforce/apex-node": "^8.3.
|
|
8
|
+
"@salesforce/apex-node": "^8.3.3",
|
|
9
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"
|
|
13
13
|
},
|
|
14
14
|
"devDependencies": {
|
|
15
|
-
"@oclif/core": "^4.
|
|
15
|
+
"@oclif/core": "^4.5.4",
|
|
16
16
|
"@oclif/plugin-command-snapshot": "^5.3.6",
|
|
17
17
|
"@salesforce/cli-plugins-testkit": "^5.3.39",
|
|
18
18
|
"@salesforce/dev-scripts": "^11.0.4",
|
|
19
|
-
"@salesforce/plugin-command-reference": "^3.1.
|
|
19
|
+
"@salesforce/plugin-command-reference": "^3.1.72",
|
|
20
20
|
"eslint-plugin-sf-plugin": "^1.20.24",
|
|
21
|
-
"oclif": "^4.
|
|
21
|
+
"oclif": "^4.22.25",
|
|
22
22
|
"ts-node": "^10.9.2",
|
|
23
23
|
"typescript": "^5.8.3"
|
|
24
24
|
},
|
|
@@ -229,7 +229,7 @@
|
|
|
229
229
|
"exports": "./lib/index.js",
|
|
230
230
|
"type": "module",
|
|
231
231
|
"sfdx": {
|
|
232
|
-
"publicKeyUrl": "https://developer.salesforce.com/media/salesforce-cli/security/@salesforce/plugin-apex/3.8.
|
|
233
|
-
"signatureUrl": "https://developer.salesforce.com/media/salesforce-cli/security/@salesforce/plugin-apex/3.8.
|
|
232
|
+
"publicKeyUrl": "https://developer.salesforce.com/media/salesforce-cli/security/@salesforce/plugin-apex/3.8.2.crt",
|
|
233
|
+
"signatureUrl": "https://developer.salesforce.com/media/salesforce-cli/security/@salesforce/plugin-apex/3.8.2.sig"
|
|
234
234
|
}
|
|
235
235
|
}
|