Skip to content

Improvements to testing in Codespaces#65019

Merged
akoeplinger merged 1 commit intomainfrom
devcontainer-browser
Jan 13, 2026
Merged

Improvements to testing in Codespaces#65019
akoeplinger merged 1 commit intomainfrom
devcontainer-browser

Conversation

@akoeplinger
Copy link
Member

@akoeplinger akoeplinger commented Jan 12, 2026

  1. Playwright needs to disable the chromium sandbox as it doesn't work in the container
  2. Need to pass --disable-dev-shm-usage to Selenium as /dev/shm is too small in the container (Playwright does this by default: https://github.com/microsoft/playwright/blob/8914db58ad96135160234fab0b368fa2ee617d43/packages/playwright-core/src/server/chromium/chromiumSwitches.ts#L60)
  3. Other random fixes

1. Playwright needs to disable the chromium sandbox as it doesn't work in the container
2. Need to pass --disable-dev-shm-usage to Selenium as /dev/shm is too small in the container
3. Other random fixes
Copilot AI review requested due to automatic review settings January 12, 2026 11:29
@akoeplinger akoeplinger added the area-infrastructure Includes: MSBuild projects/targets, build scripts, CI, Installers and shared framework label Jan 12, 2026
Copy link
Contributor

Copilot AI left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pull request overview

This pull request improves testing support in container environments, particularly Codespaces, by addressing browser automation issues specific to containerized execution.

Changes:

  • Disables Chromium sandbox in Playwright for container environments where sandboxing doesn't work
  • Adds --disable-dev-shm-usage flag to Selenium Chrome options to work around limited /dev/shm size in containers
  • Fixes platform-specific issues including Windows-only API calls and IPv6/IPv4 any-address URL handling

Reviewed changes

Copilot reviewed 6 out of 6 changed files in this pull request and generated no comments.

Show a summary per file
File Description
src/Testing/src/HelixHelper.cs Returns empty string instead of null from GetTargetHelixQueue() for improved null safety
src/SignalR/server/SignalR/test/Microsoft.AspNetCore.SignalR.TrimmingTests/TestTypedClients.cs Replaces IPv6/IPv4 any-addresses with localhost in server URLs for client connections
src/Shared/E2ETesting/BrowserFixture.cs Adds --disable-dev-shm-usage argument to Chrome options for container compatibility
src/Shared/BrowserTesting/src/BrowserTestBase.cs Detects container environments and loads container-specific Playwright settings
src/Servers/IIS/IIS/test/Common.FunctionalTests/Infrastructure/SkipIfNotAdminAttribute.cs Adds Windows OS check before accessing Windows-specific APIs to prevent crashes on non-Windows platforms
src/ProjectTemplates/test/Templates.Blazor.Tests/playwrightSettings.container.json Adds new Playwright configuration file that disables Chromium sandbox for container environments

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

area-infrastructure Includes: MSBuild projects/targets, build scripts, CI, Installers and shared framework

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants