Skip to content

Add support for custom Chrome/browser flags in patrol test command #2832

@ccrambert-ship-it

Description

@ccrambert-ship-it

Use case

When running Flutter web integration tests with Patrol, developers often need to customize the browser environment to match their testing requirements. Currently, there's no way to pass custom flags to the Chrome browser launched by Playwright.

Problem:

I'm developing a Flutter web application that connects to local backend services during integration tests. I frequently encounter these issues:

  1. CORS restrictions: When testing against local Spring Boot backends running on different ports, browser CORS policies block requests even though this is a legitimate testing scenario
  2. Port conflicts: The default web server port may conflict with other services running locally
  3. Browser configuration: Need to disable certain security features (like web security, same-origin policy) in test environments that are safe in CI/CD but blocked by default Chrome settings

Proposal

Add command-line options to patrol test that allow passing custom flags to the underlying browser:

Single flag

patrol test -d chrome --web-browser-flag="--disable-web-security"

Custom web port

patrol test -d chrome --web-port=8080

Metadata

Metadata

Assignees

No one assigned

    Labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions