Files
Dmitriy Vasyura 05642a313f Retry browser-test page.goto on connection-refused (#315504)
On Windows + Firefox the integration test runner intermittently hits NS_ERROR_CONNECTION_REFUSED on page.goto right after launching a fresh code-server. The server prints 'Web UI available at <url>' before the HTTP listener is fully accepting connections, causing a race when sub-suites (e.g. Git tests) start a new server back-to-back.

Add a small retry loop around the initial page.goto to absorb the transient connection-refused error and reduce CI flakiness.
2026-05-09 20:36:11 -07:00
..
2026-01-30 13:12:58 -08:00

Integration test

Compile

Make sure to run the following commands to compile and install dependencies:

cd test/integration/browser
npm i
npm run compile

Run (inside Electron)

scripts/test-integration.[sh|bat]

All integration tests run in an Electron instance. You can specify to run the tests against a real build by setting the environment variables INTEGRATION_TEST_ELECTRON_PATH and VSCODE_REMOTE_SERVER_PATH (if you want to include remote tests).

Run (inside browser)

scripts/test-web-integration.[sh|bat] --browser [chromium|webkit] [--debug]

All integration tests run in a browser instance as specified by the command line arguments.

Add the --debug flag to see a browser window with the tests running.

Note: you can enable verbose logging of playwright library by setting a DEBUG environment variable before running the tests (https://playwright.dev/docs/debug#verbose-api-logs)

Debug

All integration tests can be run and debugged from within VSCode (both Electron and Web) simply by selecting the related launch configuration and running them.