Skip to content

Commit c28bcfd

Browse files
committed
fix: [W-20148320] update readme
1 parent 99519f1 commit c28bcfd

File tree

3 files changed

+37
-18
lines changed

3 files changed

+37
-18
lines changed

.gitignore

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -37,3 +37,4 @@ yarn-error.log*
3737
.wireit
3838
/salesforcedx-vscode
3939
/.cursor
40+
/test-resources

README.md

Lines changed: 34 additions & 16 deletions
Original file line numberDiff line numberDiff line change
@@ -97,30 +97,48 @@ This repository is published and used as an npm module, currently imported by `s
9797

9898
The following environment variables can be used to configure the automation tests. These are managed by the `EnvironmentSettings` class.
9999

100-
| Environment Variable | Description | Default Value |
101-
| ------------------------------------- | ----------------------------------------------------------------------------------------------------- | -------------------------------------------- |
102-
| `VSCODE_VERSION` | VSCode version to use in tests | `'latest'` |
103-
| `SPEC_FILES` | Test spec filename(s) to run, will be prefixed with 'lib/specs/' | `[]` |
104-
| `VSIX_TO_INSTALL` | Path to directory containing VSIX files to install | `undefined` |
105-
| `DEV_HUB_ALIAS_NAME` | Alias for the DevHub org | `'vscodeOrg'` |
106-
| `DEV_HUB_USER_NAME` | Username for the DevHub org | - |
107-
| `SFDX_AUTH_URL` | URL for authenticating with Salesforce DX | `undefined` |
108-
| `EXTENSION_PATH` | Path to extensions directory | `{cwd}/../../salesforcedx-vscode/extensions` |
109-
| `SALESFORCEDX_VSCODE_EXTENSIONS_PATH` | Alternative path to extensions (takes precedence over EXTENSION_PATH) | - |
110-
| `THROTTLE_FACTOR` | Number to multiply timeouts by (used to slow down test execution) | `1` |
111-
| `JAVA_HOME` | Path to Java installation | `undefined` |
112-
| `USE_EXISTING_PROJECT_PATH` | Path to an existing project to use instead of creating a new one | `undefined` |
113-
| `E2E_LOG_LEVEL` | Log level for test execution (one of the valid log levels: 'error', 'warn', 'info', 'debug', 'trace') | `'info'` |
100+
| Environment Variable | Description | Default Value | Required? |
101+
| ------------------------------------- | ----------------------------------------------------------------------------------------------------- | -------------------------------------------- | --------- |
102+
| `VSCODE_VERSION` | VSCode version to use in tests | `'latest'` | No |
103+
| `SPEC_FILES` | Test spec filename(s) to run, will be prefixed with 'lib/specs/' | `[]` | No |
104+
| `VSIX_TO_INSTALL` | Path to directory containing VSIX files to install | `undefined` | Yes\* |
105+
| `DEV_HUB_ALIAS_NAME` | Alias for the DevHub org | `'vscodeOrg'` | Yes\*\* |
106+
| `DEV_HUB_USER_NAME` | Username for the DevHub org | - | Yes\*\* |
107+
| `SFDX_AUTH_URL` | URL for authenticating with Salesforce DX | `undefined` | Yes\*\* |
108+
| `EXTENSION_PATH` | Path to extensions directory | `{cwd}/../../salesforcedx-vscode/extensions` | No |
109+
| `SALESFORCEDX_VSCODE_EXTENSIONS_PATH` | Alternative path to extensions (takes precedence over EXTENSION_PATH) | - | No |
110+
| `THROTTLE_FACTOR` | Number to multiply timeouts by (used to slow down test execution) | `1` | No |
111+
| `JAVA_HOME` | Path to Java installation | `undefined` | No |
112+
| `USE_EXISTING_PROJECT_PATH` | Path to an existing project to use instead of creating a new one | `undefined` | Yes\* |
113+
| `E2E_LOG_LEVEL` | Log level for test execution (one of the valid log levels: 'error', 'warn', 'info', 'debug', 'trace') | `'info'` | No |
114+
| `TEST_RESOURCES` | Path to workspace directory where VS Code and test artifacts are stored | `[project_root]/test-resources` | Yes\* |
115+
116+
\* Required when used (conditional requirement)
117+
\*\* Required when org authorization is needed
114118

115119
#### Usage Notes
116120

117121
- **SPEC_FILES**: If specified, only the named test spec files will be run instead of all tests
118122

119123
- **EXTENSION_PATH**: If your folder structure does not match the standard folder structure shown in the Getting Started section, `EXTENSION_PATH` will need to be set to the correct relative path to 'salesforcedx-vscode/extensions'
120124

121-
- **SFDX_AUTH_URL**: To obtain this URL, run `sf org display -o <myDevHub> --verbose --json` in your terminal and extract the value from the `sfdxAuthUrl` property
125+
- **DEV_HUB_USER_NAME**: **Required** when org authorization is needed. Missing this will cause an initialization error when `verifyAliasAndUserName()`, `setupAndAuthorizeOrg()`, or `authorizeDevHub()` are called.
122126

123-
- **USE_EXISTING_PROJECT_PATH**: If specified, must point to a valid existing project directory. The test framework will use this project instead of creating a new one
127+
- **DEV_HUB_ALIAS_NAME**: **Required** when org authorization is needed. Has a default value of `'vscodeOrg'`, but must be set correctly to match an existing org. Missing this will cause an initialization error during org authorization setup.
128+
129+
- **SFDX_AUTH_URL**: **Required** when:
130+
131+
- `orgLoginSfdxUrl()` is called directly
132+
- `setupAndAuthorizeOrg()` is called and no existing authentication is found
133+
- `authorizeDevHub()` is called (which calls `orgLoginSfdxUrl()`)
134+
135+
To obtain this URL, run `sf org display -o <myDevHub> --verbose --json` in your terminal and extract the value from the `sfdxAuthUrl` property. Missing this will cause an initialization error when attempting to authenticate with Salesforce.
136+
137+
- **VSIX_TO_INSTALL**: **Required** when `installExtensions()` is called. If set, the directory must exist or an initialization error will be thrown.
138+
139+
- **USE_EXISTING_PROJECT_PATH**: If specified, must point to a valid existing project directory. The test framework will use this project instead of creating a new one. **Required** when set - the path must exist or an initialization error will be thrown.
140+
141+
- **TEST_RESOURCES**: **Required** when `validateTestConfig()` is called and neither `testResources` nor `workspacePath` is set. Has a default value, but if both are missing, an initialization error will be thrown.
124142

125143
- **THROTTLE_FACTOR**: Useful for debugging tests by slowing down UI interactions. For example, setting to `2` will make tests run at half speed
126144

package-lock.json

Lines changed: 2 additions & 2 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

0 commit comments

Comments
 (0)