@provartesting/provardx-cli 1.1.3 → 1.2.1
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 +67 -1
- package/oclif.manifest.json +1 -1
- package/package.json +1 -1
- package/scripts/postInstall.js +10 -2
package/README.md
CHANGED
|
@@ -6,7 +6,7 @@
|
|
|
6
6
|
|
|
7
7
|
# What is the ProvarDX CLI?
|
|
8
8
|
|
|
9
|
-
The Provar DX CLI is a Salesforce CLI plugin for Provar customers who want to automate the execution of tests and the reporting of test results and other quality-related
|
|
9
|
+
The Provar DX CLI is a Salesforce CLI plugin for Provar customers who want to automate the execution of tests using Provar Automation, and the reporting of test results and other quality-related metrics to Provar Manager.
|
|
10
10
|
|
|
11
11
|
# Installation, Update, and Uninstall
|
|
12
12
|
|
|
@@ -36,6 +36,8 @@ $ sf plugins uninstall @provartesting/provardx-cli
|
|
|
36
36
|
- [`sf provar automation project compile`](#sf-provar-automation-project-compile)
|
|
37
37
|
- [`sf provar automation metadata download`](#sf-provar-automation-metadata-download)
|
|
38
38
|
- [`sf provar automation test run`](#sf-provar-automation-test-run)
|
|
39
|
+
- [`sf provar manager connect`](#sf-provar-manager-connect)
|
|
40
|
+
- [`sf provar manager testcase retrieve`](#sf-provar-manager-testcase-retrieve)
|
|
39
41
|
|
|
40
42
|
## `sf provar automation config generate`
|
|
41
43
|
|
|
@@ -237,3 +239,67 @@ EXAMPLES
|
|
|
237
239
|
|
|
238
240
|
$ sf provar automation test run
|
|
239
241
|
```
|
|
242
|
+
|
|
243
|
+
## `sf provar manager connect`
|
|
244
|
+
|
|
245
|
+
Load the alias or username to be used in subsequent commands to connect to Provar Manager.
|
|
246
|
+
|
|
247
|
+
```
|
|
248
|
+
USAGE
|
|
249
|
+
$ sf provar manager connect -o <value> [--json]
|
|
250
|
+
|
|
251
|
+
FLAGS
|
|
252
|
+
-o, --target-org=<value> (required) Username or alias set in the SF CLI which corresponds to the Provar Manager org.
|
|
253
|
+
|
|
254
|
+
GLOBAL FLAGS
|
|
255
|
+
--json Format output as json.
|
|
256
|
+
|
|
257
|
+
DESCRIPTION
|
|
258
|
+
Load the alias or username to be used in subsequent commands to connect to Provar Manager.
|
|
259
|
+
|
|
260
|
+
EXAMPLES
|
|
261
|
+
Connect to the Provar Manager org that has been previously authorised using the SF CLI, and stored with the alias "ProvarManager":
|
|
262
|
+
|
|
263
|
+
$ sf provar manager connect -o ProvarManager
|
|
264
|
+
```
|
|
265
|
+
|
|
266
|
+
## `sf provar manager testcase retrieve`
|
|
267
|
+
|
|
268
|
+
Retrieve test cases related to the provided user stories (issues) or metadata components, for a given test project.
|
|
269
|
+
|
|
270
|
+
```
|
|
271
|
+
USAGE
|
|
272
|
+
$ sf provar manager testcase retrieve -p <value> -t Apex|ProvarAutomation [--json] [--flags-dir <value>] [-m <value>] [-f <value>] [-i <value>] [-o <value>] [-n <value>]
|
|
273
|
+
|
|
274
|
+
FLAGS
|
|
275
|
+
-f, --metadata-file=<value> Path to a text file that contains the list of metadata components in source format.
|
|
276
|
+
-i, --issues=<value> A comma-separated list of issue IDs, keys, or external IDs.
|
|
277
|
+
-m, --metadata-components=<value> Semicolon-separated list of metadata components, grouped and prefixed by their metadata type.
|
|
278
|
+
-n, --ignore-metadata=<value> Semicolon-separated list of metadata types to ignore from METADATA-COMPONENTS or METADATA-FILE.
|
|
279
|
+
-o, --output=<value> Output to a specific file instead of stdout.
|
|
280
|
+
-p, --test-project=<value> (required) Test Project key to filter by.
|
|
281
|
+
-t, --test-automation-tool=<option> (required) Test Automation tool used to automate the tests.
|
|
282
|
+
<options: Apex|ProvarAutomation>
|
|
283
|
+
|
|
284
|
+
DESCRIPTION
|
|
285
|
+
Retrieve test cases related to the provided user stories (issues) or metadata components, for a given test project.
|
|
286
|
+
|
|
287
|
+
EXAMPLES
|
|
288
|
+
Retrieve Apex unit test class ids from the test project "Salesforce Project" with key "SFP" that cover the "NewLeadFormController" and "ExistingLeadFormController" Apex classes:
|
|
289
|
+
|
|
290
|
+
$ sf provar manager testcase retrieve -p SFP -t Apex -m "ApexClass:NewLeadFormController,ExistingLeadFormController"
|
|
291
|
+
|
|
292
|
+
Retrieve Provar Automation test case paths from the test project with key "PAT" related to the user story with key "TM-766", in JSON format:
|
|
293
|
+
|
|
294
|
+
$ sf provar manager testcase retrieve -p PAT -t ProvarAutomation -i "TM-766" --json
|
|
295
|
+
|
|
296
|
+
Retrieve Provar Automation test case paths from the test project with key "PAT" related to the metadata listed in the file "changes.txt", ignoring changes to custom objects, output to "testcases.txt":
|
|
297
|
+
|
|
298
|
+
$ sf provar manager testcase retrieve -p PAT -t ProvarAutomation -f changes.txt -n CustomObject -o testcases.txt
|
|
299
|
+
|
|
300
|
+
Example of a list of metadata changes:
|
|
301
|
+
|
|
302
|
+
base/main/default/layouts/Release__c-Release Layout.layout-meta.xml
|
|
303
|
+
base/main/default/objects/Sprint__c/fields/Sprint_Goal__c.field-meta.xml
|
|
304
|
+
|
|
305
|
+
```
|
package/oclif.manifest.json
CHANGED
package/package.json
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@provartesting/provardx-cli",
|
|
3
3
|
"description": "A plugin for the Salesforce CLI to orchestrate testing activities and report quality metrics to Provar Manager",
|
|
4
|
-
"version": "1.1
|
|
4
|
+
"version": "1.2.1",
|
|
5
5
|
"license": "BSD-3-Clause",
|
|
6
6
|
"dependencies": {
|
|
7
7
|
"@oclif/core": "^3.26.2",
|
package/scripts/postInstall.js
CHANGED
|
@@ -1,8 +1,16 @@
|
|
|
1
1
|
import { exec } from 'child_process';
|
|
2
2
|
|
|
3
|
-
const
|
|
3
|
+
const commandToInstallAutomationPlugin = 'echo y | sfdx plugins:install @provartesting/provardx-plugins-automation';
|
|
4
|
+
const commandToInstallManagerPlugin = 'echo y | sfdx plugins:install @provartesting/provardx-plugins-manager';
|
|
4
5
|
|
|
5
|
-
exec(
|
|
6
|
+
exec(commandToInstallAutomationPlugin, (error) => {
|
|
7
|
+
if (error) {
|
|
8
|
+
console.error(`Error: ${error.message}`);
|
|
9
|
+
return;
|
|
10
|
+
}
|
|
11
|
+
});
|
|
12
|
+
|
|
13
|
+
exec(commandToInstallManagerPlugin, (error) => {
|
|
6
14
|
if (error) {
|
|
7
15
|
console.error(`Error: ${error.message}`);
|
|
8
16
|
return;
|