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
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 Quality Hub.
10
11
11
12
# Installation, Update, and Uninstall
12
13
14
+
**Requires Node.js 18–24 (LTS 22 recommended).** Node 25+ is not yet supported due to a breaking change in a transitive dependency. Check with `node --version`.
15
+
13
16
Install the plugin
14
17
15
18
```sh-session
16
-
$ sf plugins install @provartesting/provardx-cli
19
+
$ sf plugins install @provartesting/provardx-cli@beta
17
20
```
18
21
19
22
Update plugins
@@ -30,33 +33,56 @@ $ sf plugins uninstall @provartesting/provardx-cli
30
33
31
34
# MCP Server (AI-Assisted Quality)
32
35
33
-
The Provar DX CLI includes a built-in **Model Context Protocol (MCP) server** that connects AI assistants (Claude Desktop, Claude Code, Cursor) directly to your Provar project. Once connected, an AI agent can inspect your project structure, generate Page Objects and test cases, validate every level of the test hierarchy with quality scores that match the Provar Quality Hub API, and work with NitroX (Hybrid Model) component page objects for LWC, Screen Flow, Industry Components, Experience Cloud, and HTML5.
36
+
The Provar DX CLI includes a built-in **Model Context Protocol (MCP) server** that connects AI assistants (Claude Desktop, Claude Code, Cursor) directly to your Provar project. Once connected, an AI agent can inspect your project structure, generate Page Objects and test cases, validate every level of the test hierarchy with quality scores, and work with NitroX (Hybrid Model) component page objects for LWC, Screen Flow, Industry Components, Experience Cloud, and HTML5.
37
+
38
+
Validation runs in two modes: **local only** (structural rules, no key required) or **Quality Hub API** (170+ rules, quality scoring — requires a `pv_k_` API key). Don't have an account? **[Request access](https://aqqlrlhga7.execute-api.us-east-1.amazonaws.com/dev/auth/request-access)**.
39
+
40
+
## Quick setup
41
+
42
+
**Requires:** Provar Automation IDE installed with an activated license.
34
43
35
44
```sh
36
-
sf provar mcp start --allowed-paths /path/to/your/provar/project
45
+
# 1. Install the plugin (if not already installed)
46
+
sf plugins install @provartesting/provardx-cli@beta
47
+
48
+
# 2. (Optional) Authenticate for full 170+ rule validation
49
+
sf provar auth login
37
50
```
38
51
39
-
📖 **See [docs/mcp.md](https://github.com/ProvarTesting/provardx-cli/blob/main/docs/mcp.md) for full setup and tool documentation.**
52
+
**Claude Code** — run once to register the server:
40
53
41
-
## License Validation
54
+
```sh
55
+
claude mcp add provar -s user -- sf provar mcp start --allowed-paths /path/to/your/provar/project
56
+
```
42
57
43
-
The MCP server verifies your Provar license before accepting any connections. Validation is automatic — no extra flags are required for standard usage.
58
+
**Claude Desktop** — add to your config file and restart the app:
1.**Auto-detection** — the server reads `~/Provar/.licenses/*.properties` (the same files written by Provar's IDE plugins). If a valid, activated license is found the server starts immediately.
48
-
2.**Cache** — successful validations are cached at `~/Provar/.licenses/.mcp-license-cache.json` (2 h TTL). Subsequent starts within the TTL window skip the disk scan.
49
-
3.**Grace fallback** — if the IDE license files cannot be found or read and the cache is stale (but ≤ 48 h old), the server starts with a warning on stderr using the cached result so CI pipelines are not broken by transient local file-access issues.
50
-
4.**Fail closed** — if no valid license is detected the command exits with a non-zero exit code and a clear error message.
| Provar Automation IDE | ≥ 2.x | Must be installed with an **activated licence** on the same machine. The MCP server reads the licence from `~/Provar/.licenses/`. |
| An MCP-compatible AI client | — | Claude Desktop, Claude Code, or Cursor |
30
-
| Node.js |≥ 18| Installed automatically with the SF CLI|
30
+
| Node.js |18–24| Installed automatically with the SF CLI. **Node 25+ is not supported** — a transitive dependency crashes on startup. Use Node 22 LTS.|
31
31
32
32
---
33
33
@@ -48,7 +48,7 @@ sf --version
48
48
### 2. Install the Provar DX CLI plugin
49
49
50
50
```sh
51
-
sf plugins install @provartesting/provardx-cli
51
+
sf plugins install @provartesting/provardx-cli@beta
52
52
```
53
53
54
54
Verify:
@@ -165,6 +165,9 @@ Prompt your AI assistant:
165
165
-`validity_score` and `quality_score` both returned (0–100)
166
166
- Specific rule violations called out (e.g. TC_010 missing test case ID, TC_001 missing XML declaration)
-`validation_source: "local"` if no API key is configured, `"quality_hub"` if authenticated
169
+
170
+
> **Tip:** Run `sf provar auth login` before this scenario to unlock Quality Hub API validation (170+ rules). Without a key the tool still returns useful results using local rules only.
168
171
169
172
---
170
173
@@ -226,6 +229,24 @@ Pre-requisite: `sf org login web -a MyQHOrg` then `sf provar quality-hub connect
226
229
227
230
---
228
231
232
+
### Scenario 8: Quality Hub API Validation
233
+
234
+
**Goal:** Confirm that `provar.testcase.validate` upgrades from local rules to the full Quality Hub API ruleset when an API key is present.
235
+
236
+
**Setup:** Run `sf provar auth login` and complete the browser login, then confirm with `sf provar auth status`.
237
+
238
+
> "Validate the test case at `/path/to/project/tests/LoginTest.testcase` and tell me what validation_source was used."
239
+
240
+
**What to look for:**
241
+
242
+
-`validation_source: "quality_hub"` in the response — confirms the API path is active
243
+
-`quality_score` reflecting the full 170+ rule evaluation
244
+
- If the API is unreachable, `validation_source: "local_fallback"` and a `validation_warning` field explaining why
245
+
246
+
**To reset and test the fallback:** run `sf provar auth clear`, repeat the prompt, and verify `validation_source` reverts to `"local"`.
**Goal:** Have the AI discover, understand, and generate NitroX component page objects.
@@ -323,7 +344,9 @@ The MCP server uses **stdio transport** exclusively. Communication travels over
323
344
324
345
### Credential handling
325
346
326
-
The Quality Hub and Automation tools invoke `sf` subprocesses. Salesforce org credentials are managed entirely by the Salesforce CLI and stored in its own credential store. The Provar MCP server never reads, parses, or transmits those credentials.
347
+
**Salesforce org credentials** — the Quality Hub and Automation tools invoke `sf` subprocesses. Salesforce org credentials are managed entirely by the Salesforce CLI and stored in its own credential store (`~/.sf/`). The Provar MCP server never reads, parses, or transmits those credentials.
348
+
349
+
**Provar API key** — the `provar.testcase.validate` tool optionally reads a `pv_k_` API key to enable Quality Hub API validation. The key is stored at `~/.provar/credentials.json` (written by `sf provar auth login`) or read from the `PROVAR_API_KEY` environment variable. The key is sent to the Provar Quality Hub API only when a validation request is made — it is never logged or written anywhere other than `~/.provar/credentials.json`.
327
350
328
351
### Path policy enforcement
329
352
@@ -393,7 +416,7 @@ After editing `claude_desktop_config.json`, you must fully restart Claude Deskto
393
416
394
417
**Server starts but immediately exits**
395
418
396
-
Check that the SF CLI plugin is installed: `sf plugins | grep provardx`. If missing, run `sf plugins install @provartesting/provardx-cli`.
419
+
Check that the SF CLI plugin is installed: `sf plugins | grep provardx`. If missing, run `sf plugins install @provartesting/provardx-cli@beta`.
0 commit comments