Skip to content

refactor(e2e): migrate remaining tests to TestContainer abstraction#143

Merged
rgarcia merged 1 commit intomainfrom
migrate-e2e-chromium-tests-to-testcontainer
Feb 4, 2026
Merged

refactor(e2e): migrate remaining tests to TestContainer abstraction#143
rgarcia merged 1 commit intomainfrom
migrate-e2e-chromium-tests-to-testcontainer

Conversation

@rgarcia
Copy link
Contributor

@rgarcia rgarcia commented Feb 4, 2026

Summary

  • Migrate all tests in e2e_chromium_test.go from the old manual docker exec pattern to the TestContainer abstraction
  • Remove old helper functions (runContainer, stopContainer, waitHTTPOrExit, etc.)
  • Use NewTestContainer/Start/Stop pattern with dynamic port allocation
  • Update execCombinedOutput and helper functions to accept *TestContainer
  • Add t.Parallel() to all tests for parallel execution
  • Update logCDPDiagnostics in e2e_combined_flow_test.go for new signature

This enables parallel test execution and removes ~300 lines of duplicate container management code. All e2e tests now consistently use the TestContainer abstraction.

Tests migrated

  • TestDisplayResolutionChange
  • TestExtensionUploadAndActivation
  • TestScreenshotHeadless
  • TestScreenshotHeadful
  • TestInputEndpointsSmoke
  • TestCDPTargetCreation
  • TestWebBotAuthInstallation

Test plan

  • CI passes
  • E2E tests execute successfully in parallel

Made with Cursor


Note

Medium Risk
Medium risk because it refactors test harness/container lifecycle and enables t.Parallel() across Docker-backed E2E tests, which can surface port allocation, readiness, or race-condition issues without changing production code.

Overview
Refactors e2e_chromium_test.go to run all Chromium E2E scenarios via the TestContainer abstraction (dynamic ports + WaitReady/WaitDevTools) instead of hard-coded docker run/kill/wait helpers, and removes the old container-management utilities.

Enables parallel execution for these E2E tests (t.Parallel()), updates remote exec helpers (execCombinedOutput, getXvfbResolution, listCDPTargets) to take *TestContainer, and adjusts the combined-flow diagnostics helper (logCDPDiagnostics) to exec inside the specific test container.

Written by Cursor Bugbot for commit 873044a. This will update automatically on new commits. Configure here.

Cursor Bugbot reviewed your changes and found no issues for commit 873044a

Migrate all tests in e2e_chromium_test.go from the old manual docker
exec pattern to the TestContainer abstraction used by other e2e tests.

Key changes:
- Remove old helper functions (runContainer, stopContainer, waitHTTPOrExit, etc.)
- Use NewTestContainer/Start/Stop pattern with dynamic port allocation
- Update execCombinedOutput and helper functions to accept *TestContainer
- Add t.Parallel() to all tests for parallel execution
- Update logCDPDiagnostics in e2e_combined_flow_test.go for new signature

This enables parallel test execution and removes ~300 lines of duplicate
container management code.

Co-authored-by: Cursor <cursoragent@cursor.com>
@rgarcia rgarcia merged commit bb9d3d7 into main Feb 4, 2026
4 checks passed
@rgarcia rgarcia deleted the migrate-e2e-chromium-tests-to-testcontainer branch February 4, 2026 21:28
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants