Skip to content

Testing Setup and Execution

Trae Yelovich edited this page Jun 10, 2026 · 9 revisions

Testing Setup and Execution

Use this page for detailed testing setup and test execution workflows.

If you are looking for unit test information, start with Unit Tests.

For development setup and contribution expectations that also reference unit test coverage, see Developer Setup and Contributor Guidance.

Contents

End-to-end tests (v3)

Set up and execute end-to-end tests for Zowe Explorer. Note: We recommend using Node v22.x for the tests until an issue is resolved with Node v24.x around Chromedriver access.

Test profile data

To run end-to-end tests, define a .env file in packages/zowe-explorer/__tests__/__e2e__ with environment variables for profile information, credentials, and test targets. Refer to .env.example for the complete list.

# Path to the Zowe home folder where configurations are stored (relative to current directory)
# Absolute paths are allowed.
ZOWE_TEST_DIR=".zowe"

# Profile variables
ZE_TEST_PROFILE_NAME="<profileName>" # The name of the profile in your Zowe config to use for testing
ZE_TEST_PROFILE_USER="testUser" # The user to leverage during the e2e tests

# USS variables
ZE_TEST_USS_FILTER="/u/users/testUser" # The filter to apply when searching on a USS profile*
ZE_TEST_USS_DIR="test" # The USS directory to use for edit and list testing - should be relative to USS filter*
ZE_TEST_USS_FILE="testFile.txt" # The USS file to edit and save with, relative to USS dir*

# Data Set variables
ZE_TEST_DS_FILTER="TESTUSER.*" # The filter to apply when searching on a Data Sets profile
ZE_TEST_PDS="TESTUSER.C" # The PDS to use for edit and list testing - matched by the defined filter*
ZE_TEST_PDS_MEMBER="TESTC" # The PDS member to use for edit and list testing - relative to the defined PDS*
ZE_TEST_PS="TESTUSER.TESTPS" # The PS to use for editing - matched by the defined filter*

# * means that the item must exist on the test system for it to be considered valid

Once configured:

  1. Change directory to packages/zowe-explorer.
  2. Build with pnpm build.
  3. Run tests with pnpm test:e2e.

Important

On macOS:

  • Additional setup is required: Native context menus are not Webdriver-controlled, so AppleScript is used. Grant Accessibility permission to VS Code in macOS Settings (Privacy & Security -> Accessibility).
  • ChromeDriver fails to launch: If chromedriver fails to launch (seen in test logs) or the VS Code window never opens, ensure that your Zowe Explorer repo folder is not in a protected location. Apple's TCC protects user locations such as the Desktop, Documents, and Downloads folders. If the repository is located in one of these protected folders, try re-locating it and then re-run the tests from the new path.

Execute from VS Code

  1. Build the extension.
  2. Open Run and Debug.
  3. Select End-to-end Tests.
  4. Start with the play button.

Output appears in the VS Code debug console. JUnit reports are written to packages/zowe-explorer/results.

Behavior-driven integration tests (v3)

Use integration tests to validate UI and command behavior across profile and tree interactions.

Test profile requirements

  • At least 3 profiles must exist in your Zowe config.
  • Profiles do not need valid credentials up front, but hostnames must be valid/reachable for validation paths.
  • A default profile must be set for the zosmf profile type.

Execute from VS Code

  1. Build the extension.
  2. Open Run and Debug.
  3. Select Behavior-driven Integration Tests.
  4. Start with the play button.

Output appears in the VS Code debug console. JUnit reports are written to packages/zowe-explorer/results.

Theia regression tests (v2 and below)

Run regression tests to verify compatibility with Theia.

Set up Theia workspace

  1. Install required components:
  2. Build a VSIX that contains your changes.
  3. Build and run the Theia browser example using Setting up your Theia workspace.
  4. Ensure your latest VSIX is in the plugins folder.
  5. Ensure Theia is running while tests execute.

Optional verification: open http://localhost:3000 and confirm Zowe Explorer is deployed.

Run regression tests

  1. Compile with:
yarn run compile
  1. Run tests with:
yarn run test:theia

Output appears in the VS Code debug console.

Run tests with Firefox UI visibility

Tests run in headless mode by default. To run with visible Firefox:

  1. Open __tests__/__theia__/.
  2. Comment out firefoxOptions.headless();.
  3. Compile the extension.
  4. Run Theia regression tests.

Firefox launches with a visible UI while tests run.

Clone this wiki locally