@salesforce/plugin-apex 3.8.0 → 3.8.1-dev.0
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 +54 -34
- package/lib/commands/logic/run/test.js +1 -1
- package/lib/commands/logic/run/test.js.map +1 -1
- package/messages/logicgettest.md +3 -3
- package/messages/runlogictest.md +19 -9
- package/oclif.manifest.json +11 -9
- package/package.json +3 -3
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.0/src/commands/apex/get/log.ts)_
|
|
153
|
+
_See code: [src/commands/apex/get/log.ts](https://github.com/salesforcecli/plugin-apex/blob/3.8.1-dev.0/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.0/src/commands/apex/get/test.ts)_
|
|
213
|
+
_See code: [src/commands/apex/get/test.ts](https://github.com/salesforcecli/plugin-apex/blob/3.8.1-dev.0/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.0/src/commands/apex/list/log.ts)_
|
|
253
|
+
_See code: [src/commands/apex/list/log.ts](https://github.com/salesforcecli/plugin-apex/blob/3.8.1-dev.0/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.0/src/commands/apex/run.ts)_
|
|
300
|
+
_See code: [src/commands/apex/run.ts](https://github.com/salesforcecli/plugin-apex/blob/3.8.1-dev.0/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.0/src/commands/apex/run/test.ts)_
|
|
446
|
+
_See code: [src/commands/apex/run/test.ts](https://github.com/salesforcecli/plugin-apex/blob/3.8.1-dev.0/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.0/src/commands/apex/tail/log.ts)_
|
|
489
|
+
_See code: [src/commands/apex/tail/log.ts](https://github.com/salesforcecli/plugin-apex/blob/3.8.1-dev.0/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
|
-
with this command to see the results.
|
|
519
|
+
When you run "sf logic run test" to test Apex classes, Flows, and Agentforce agents asynchronously, it returns a test
|
|
520
|
+
run ID. Use that ID 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.0/src/commands/logic/get/test.ts)_
|
|
537
|
+
_See code: [src/commands/logic/get/test.ts](https://github.com/salesforcecli/plugin-apex/blob/3.8.1-dev.0/src/commands/logic/get/test.ts)_
|
|
538
538
|
|
|
539
539
|
## `sf logic run test`
|
|
540
540
|
|
|
541
|
-
Invoke tests for Apex and
|
|
541
|
+
Invoke tests for Apex, Flows, and Agentforce agents 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
|
-
Apex|Flow...] [-r human|tap|junit|json] [-w <value>] [-y] [-v -c] [--concise]
|
|
547
|
+
Agent|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
|
-
tests.
|
|
560
|
+
-t, --tests=<value>... List of test names to run. Can include Apex test classes, Flow tests, and Agentforce
|
|
561
|
+
agent 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,40 +566,58 @@ 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 Apex or Flow.
|
|
570
|
-
<options: Apex|Flow>
|
|
569
|
+
--test-category=<option>... Category of tests to run, such as Agent, Apex, or Flow.
|
|
570
|
+
<options: Agent|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 and
|
|
577
|
+
Invoke tests for Apex, Flows, and Agentforce agents 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. Running the tests together with a single command ensures seamless interoperability
|
|
579
|
+
This command provides a single and unified way to run tests for multiple Salesforce features, such as Apex classes,
|
|
580
|
+
Flows, and Agentforce agents. Running the tests together with a single command ensures seamless interoperability
|
|
581
|
+
between the features.
|
|
581
582
|
|
|
582
|
-
By default, the command executes asynchronously and returns a test run ID. Then use the "sf logic get test"
|
|
583
|
-
retrieve the results. If you want to wait for the test run to complete and see the results in the command
|
|
584
|
-
the --synchronous flag.
|
|
583
|
+
By default, the command executes asynchronously and returns a test run ID. Then use the displayed "sf logic get test"
|
|
584
|
+
command to retrieve the results. If you want to wait for the test run to complete and see the results in the command
|
|
585
|
+
output, use the --synchronous flag.
|
|
585
586
|
|
|
586
|
-
To run specific tests, use the --tests flag
|
|
587
|
-
|
|
588
|
-
|
|
589
|
-
|
|
590
|
-
the
|
|
587
|
+
To run specific tests, use the --tests flag and pass it the names of Apex, Flow, and Agentforce agent tests. Here's
|
|
588
|
+
how to find the name of each type of test:
|
|
589
|
+
|
|
590
|
+
- For Apex, simply specify the name of the Apex test class.
|
|
591
|
+
- For Flows, use the format "FlowTesting.<name-of-flow-test>". To find the name of all the Flow tests in your org, run
|
|
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.
|
|
598
|
+
|
|
599
|
+
You can also run specific test methods, although if you run the tests synchronously, the methods must belong to a
|
|
600
|
+
single Apex class, Flow test, or Agentforce agent test. To run all tests of a certain category, use --test-category
|
|
601
|
+
and --test-level together. If neither of these flags is specified, all local tests for all categories are run by
|
|
602
|
+
default. You can also use the --class-names and --suite-names flags to run Apex test classes or suites.
|
|
591
603
|
|
|
592
604
|
To see code coverage results, use the --code-coverage flag with --result-format. The output displays a high-level
|
|
593
|
-
summary of the test run and the code coverage values for the tested classes or
|
|
594
|
-
result format, use the --detailed-coverage flag to see detailed coverage results for each test
|
|
605
|
+
summary of the test run and the code coverage values for the tested Apex classes, Flows, or Agentforce agents. If you
|
|
606
|
+
specify human-readable result format, use the --detailed-coverage flag to see detailed coverage results for each test
|
|
607
|
+
method run.
|
|
595
608
|
|
|
596
609
|
You must have the "View All Data" org system permission to use this command. The permission is disabled by default and
|
|
597
610
|
can be enabled only by a system administrator.
|
|
598
611
|
|
|
599
612
|
EXAMPLES
|
|
600
|
-
Run a
|
|
613
|
+
Run a specific Agentforce agent test asynchronously in your default org:
|
|
614
|
+
|
|
615
|
+
$ sf logic run test --tests AgentTesting.Guest_Experience_Agent_Test
|
|
601
616
|
|
|
602
|
-
|
|
617
|
+
Run a mix of specific Agentforce agent, Apex, and Flow tests asynchronously in your default org:
|
|
618
|
+
|
|
619
|
+
$ sf logic run test --tests AgentTesting.Guest_Experience_Agent_Test --tests MyApexClassTest --tests \
|
|
620
|
+
FlowTesting.Modify_Account_Desc.Modify_Account_Desc_TestAccountDescription
|
|
603
621
|
|
|
604
622
|
Run all local Apex and Flow tests and wait for the results to complete; run the tests in the org with alias
|
|
605
623
|
"my-scratch":
|
|
@@ -643,13 +661,15 @@ FLAG DESCRIPTIONS
|
|
|
643
661
|
For multiple suites, repeat the flag for each.
|
|
644
662
|
--suite-names Suite1 --suite-names Suite2
|
|
645
663
|
|
|
646
|
-
-t, --tests=<value>...
|
|
664
|
+
-t, --tests=<value>...
|
|
665
|
+
|
|
666
|
+
List of test names to run. Can include Apex test classes, Flow tests, and Agentforce agent tests.
|
|
647
667
|
|
|
648
668
|
If you specify --tests, you can't specify --class-names or --suite-names
|
|
649
669
|
For multiple tests, repeat the flag for each.
|
|
650
670
|
--tests Test1 --tests Test2
|
|
651
671
|
```
|
|
652
672
|
|
|
653
|
-
_See code: [src/commands/logic/run/test.ts](https://github.com/salesforcecli/plugin-apex/blob/3.8.0/src/commands/logic/run/test.ts)_
|
|
673
|
+
_See code: [src/commands/logic/run/test.ts](https://github.com/salesforcecli/plugin-apex/blob/3.8.1-dev.0/src/commands/logic/run/test.ts)_
|
|
654
674
|
|
|
655
675
|
<!-- 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: ['Apex', 'Flow'],
|
|
96
|
+
options: ['Agent', 'Apex', 'Flow'],
|
|
97
97
|
}),
|
|
98
98
|
};
|
|
99
99
|
cancellationTokenSource = new CancellationTokenSource();
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"test.js","sourceRoot":"","sources":["../../../../src/commands/logic/run/test.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;GAcG;AAEH,OAAO,EAAE,uBAAuB,EAAE,MAAM,uBAAuB,CAAC;AAChE,OAAO,EACL,oBAAoB,EACpB,KAAK,EACL,QAAQ,EACR,iCAAiC,EACjC,+BAA+B,EAC/B,SAAS,GACV,MAAM,6BAA6B,CAAC;AACrC,OAAO,EAAE,QAAQ,EAAE,MAAM,kBAAkB,CAAC;AAC5C,OAAO,EAAE,gBAAgB,EAAE,gBAAgB,EAAE,MAAM,mBAAmB,CAAC;AACvE,OAAO,EAAE,cAAc,EAAE,eAAe,EAAmC,MAAM,mCAAmC,CAAC;AAErH,QAAQ,CAAC,kCAAkC,CAAC,MAAM,CAAC,IAAI,CAAC,GAAG,CAAC,CAAC;AAC7D,MAAM,QAAQ,GAAG,QAAQ,CAAC,YAAY,CAAC,yBAAyB,EAAE,cAAc,CAAC,CAAC;AAClF,MAAM,WAAW,GAAG,QAAQ,CAAC,YAAY,CAAC,yBAAyB,EAAE,SAAS,CAAC,CAAC;AAEhF,MAAM,uBAAuB,GAAG,CAAC,aAAa,EAAE,aAAa,EAAE,OAAO,EAAE,eAAe,CAAC,CAAC;AACzF,MAAM,CAAC,OAAO,OAAO,YAAa,SAAQ,SAA2B;IAC5D,MAAM,CAAU,OAAO,GAAG,QAAQ,CAAC,UAAU,CAAC,SAAS,CAAC,CAAC;IACzD,MAAM,CAAU,WAAW,GAAG,QAAQ,CAAC,UAAU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|
|
7
|
+
When you run "sf logic run test" to test Apex classes, Flows, and Agentforce agents 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,24 +1,34 @@
|
|
|
1
1
|
# summary
|
|
2
2
|
|
|
3
|
-
Invoke tests for Apex and
|
|
3
|
+
Invoke tests for Apex, Flows, and Agentforce agents 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 and
|
|
7
|
+
This command provides a single and unified way to run tests for multiple Salesforce features, such as Apex classes, Flows, and Agentforce agents. 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 "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.
|
|
9
|
+
By default, the command executes asynchronously and returns a test run ID. Then use the displayed "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
|
|
11
|
+
To run specific tests, use the --tests flag and pass it the names of Apex, Flow, and Agentforce agent tests. Here's how to find the name of each type of test:
|
|
12
12
|
|
|
13
|
-
|
|
13
|
+
- For Apex, simply specify the name of the Apex test class.
|
|
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.
|
|
16
|
+
|
|
17
|
+
You can also run specific test methods, although if you run the tests synchronously, the methods must belong to a single Apex class, Flow test, or Agentforce agent 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.
|
|
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.
|
|
14
20
|
|
|
15
21
|
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.
|
|
16
22
|
|
|
17
23
|
# examples
|
|
18
24
|
|
|
19
|
-
- Run a
|
|
25
|
+
- Run a specific Agentforce agent test asynchronously in your default org:
|
|
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:
|
|
20
30
|
|
|
21
|
-
<%= config.bin %> <%= command.id %> --tests MyApexClassTest
|
|
31
|
+
<%= config.bin %> <%= command.id %> --tests AgentTesting.Guest_Experience_Agent_Test --tests MyApexClassTest --tests FlowTesting.Modify_Account_Desc.Modify_Account_Desc_TestAccountDescription
|
|
22
32
|
|
|
23
33
|
- Run all local Apex and Flow tests and wait for the results to complete; run the tests in the org with alias "my-scratch":
|
|
24
34
|
|
|
@@ -34,8 +44,8 @@ You must have the "View All Data" org system permission to use this command. The
|
|
|
34
44
|
|
|
35
45
|
# flags.logicTests.summary
|
|
36
46
|
|
|
37
|
-
|
|
47
|
+
List of test names to run. Can include Apex test classes, Flow tests, and Agentforce agent tests.
|
|
38
48
|
|
|
39
49
|
# flags.test-category.summary
|
|
40
50
|
|
|
41
|
-
Category of tests to run, such as Apex or Flow.
|
|
51
|
+
Category of tests to run, such as Agent, 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, Flows, and Agentforce agents 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,9 +1140,10 @@
|
|
|
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 and
|
|
1143
|
+
"description": "This command provides a single and unified way to run tests for multiple Salesforce features, such as Apex classes, Flows, and Agentforce agents. 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 displayed \"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, Flow, and Agentforce agent tests. Here's how to find the name of each type of test:\n\n- For Apex, simply specify the name of the Apex test class.\n- 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- 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.\n\nYou can also run specific test methods, although if you run the tests synchronously, the methods must belong to a single Apex class, Flow test, or Agentforce agent 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 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.\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
|
|
1145
|
+
"Run a specific Agentforce agent test asynchronously in your default org:\n<%= config.bin %> <%= command.id %> --tests AgentTesting.Guest_Experience_Agent_Test",
|
|
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",
|
|
1146
1147
|
"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",
|
|
1147
1148
|
"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",
|
|
1148
1149
|
"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"
|
|
@@ -1307,7 +1308,7 @@
|
|
|
1307
1308
|
"test-category"
|
|
1308
1309
|
],
|
|
1309
1310
|
"name": "tests",
|
|
1310
|
-
"summary": "
|
|
1311
|
+
"summary": "List of test names to run. Can include Apex test classes, Flow tests, and Agentforce agent tests.",
|
|
1311
1312
|
"delimiter": ",",
|
|
1312
1313
|
"hasDynamicHelp": false,
|
|
1313
1314
|
"multiple": true,
|
|
@@ -1350,11 +1351,12 @@
|
|
|
1350
1351
|
},
|
|
1351
1352
|
"test-category": {
|
|
1352
1353
|
"name": "test-category",
|
|
1353
|
-
"summary": "Category of tests to run, such as Apex or Flow.",
|
|
1354
|
+
"summary": "Category of tests to run, such as Agent, Apex, or Flow.",
|
|
1354
1355
|
"delimiter": ",",
|
|
1355
1356
|
"hasDynamicHelp": false,
|
|
1356
1357
|
"multiple": true,
|
|
1357
1358
|
"options": [
|
|
1359
|
+
"Agent",
|
|
1358
1360
|
"Apex",
|
|
1359
1361
|
"Flow"
|
|
1360
1362
|
],
|
|
@@ -1369,7 +1371,7 @@
|
|
|
1369
1371
|
"pluginType": "core",
|
|
1370
1372
|
"state": "beta",
|
|
1371
1373
|
"strict": true,
|
|
1372
|
-
"summary": "Invoke tests for Apex and
|
|
1374
|
+
"summary": "Invoke tests for Apex, Flows, and Agentforce agents in an org.",
|
|
1373
1375
|
"enableJsonFlag": true,
|
|
1374
1376
|
"isESM": true,
|
|
1375
1377
|
"relativePath": [
|
|
@@ -1390,5 +1392,5 @@
|
|
|
1390
1392
|
]
|
|
1391
1393
|
}
|
|
1392
1394
|
},
|
|
1393
|
-
"version": "3.8.0"
|
|
1395
|
+
"version": "3.8.1-dev.0"
|
|
1394
1396
|
}
|
package/package.json
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@salesforce/plugin-apex",
|
|
3
3
|
"description": "Apex commands",
|
|
4
|
-
"version": "3.8.0",
|
|
4
|
+
"version": "3.8.1-dev.0",
|
|
5
5
|
"author": "Salesforce",
|
|
6
6
|
"bugs": "https://github.com/forcedotcom/cli/issues",
|
|
7
7
|
"dependencies": {
|
|
@@ -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.0.crt",
|
|
233
|
-
"signatureUrl": "https://developer.salesforce.com/media/salesforce-cli/security/@salesforce/plugin-apex/3.8.0.sig"
|
|
232
|
+
"publicKeyUrl": "https://developer.salesforce.com/media/salesforce-cli/security/@salesforce/plugin-apex/3.8.1-dev.0.crt",
|
|
233
|
+
"signatureUrl": "https://developer.salesforce.com/media/salesforce-cli/security/@salesforce/plugin-apex/3.8.1-dev.0.sig"
|
|
234
234
|
}
|
|
235
235
|
}
|