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
This plugin will also save its output to a text file, `runTests.txt` by default unless you provide a different file path via the `--output` flag.
31
+
The command's output is designed to be used with the Salesforce CLI (`sf`) deployment command. So when you want to deploy or validate Apex metadata, you can wrap this command with the deploy command to dynamically build the list of specified tests:
32
32
33
-
You could then save the contents of this text file to a variable and use that variable in the `sf project deploy` command:
34
33
35
34
```
36
-
sf apex-tests-git-delta delta --from "c7603c25581afe7c443c57e687f2d6abd654ea77" --to "HEAD" --output "runTests.txt"
37
-
testclasses=$(<runTests.txt)
38
-
sf project deploy start -x package/package.xml -l RunSpecifiedTests -t $testclasses
**NOTE:** The test classes will only be added to the output if they are found in one of your package directories as listed in the `sfdx-project.json` in the `--to` commit's file-tree. If the test class name was not found in any package directory, a warning will be printed to the terminal. The plugin will not fail if no test classes are included in the final output. The output and text file will simply be empty if no delta test classes were found in any commit message or no test classes were validated against a package directory.
@@ -68,12 +65,11 @@ This command will determine the root folder of the repo and look for the `sfdx-p
$ sf apex-tests-git-delta delta -f <value> -t <value> [--json]
72
69
73
70
FLAGS
74
71
-f, --from=<value> Commit SHA from where the commit message log is done. This SHA's commit message will not be included in the results.
75
72
-t, --to=<value> [default: HEAD] Commit SHA to where the commit message log is done.
76
-
--output=<value> [default: runTests.txt] The text file to save the delta test classes to.
77
73
78
74
GLOBAL FLAGS
79
75
--json Format output as json.
@@ -82,5 +78,5 @@ DESCRIPTION
82
78
Given 2 git commits, this plugin will parse all of the commit messages between this range and return the delta Apex test class string. This can be used to execute delta deployments.
83
79
84
80
EXAMPLES
85
-
$ sf apex-tests-git-delta delta --from "c7603c255" --to "HEAD" --output "runTests.txt"
81
+
$ sf apex-tests-git-delta delta --from "HEAD~1" --to "HEAD"
0 commit comments