Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[Feature] Configure web servers per project #22496

Open
lughino opened this issue Apr 19, 2023 · 2 comments
Open

[Feature] Configure web servers per project #22496

lughino opened this issue Apr 19, 2023 · 2 comments
Labels
feature-test-runner Playwright test specific issues

Comments

@lughino
Copy link

lughino commented Apr 19, 2023

I would love to have the possibility to configure local web servers per project.
In my use case, I have a full suite that runs against a local build of my application and a mock server, and a subset of those tests are used as smoke tests against production.

The problem is that playwright always executes the webservers configured when I run only the smoke-tests project.

If I had the possibility to configure the webServers per project, I would be able to avoid waiting for the local applications to be instantiated, like:

export default defineConfig({
  projects: [
    {
      name: 'functional-chromium',
      grepInvert: /@smoke/,
      use: { ...devices['Desktop Chrome'], baseURL: 'http://localhost:3000' },
      webServer: [
        {
           command: 'yarn serve',
           url: 'http://localhost:3000',
           timeout: 380 * 1000,
           reuseExistingServer: true,
        },
        {
           command: 'yarn mock-server',
           port: 3001,
           reuseExistingServer: true,
        },
      ],
    },
    {
       name: 'smoke-chromium',
       grep: /@smoke/,
       use: { ...devices['Desktop Chrome'], baseURL: 'https://production.app.com' },
    },
  ],
});
@dgozman dgozman added the feature-test-runner Playwright test specific issues label Apr 19, 2023
@aoj2
Copy link

aoj2 commented Apr 28, 2023

This would indeed be a great feature to have! We are having a lot of different unrelated test projects in one pw-config, to be able to set up different web servers for those would be awesome!

@mastrzyz
Copy link
Contributor

Yeah we have a need to have a "Live" project and a project with a Local server. one for CI one for Local so having a way to configure based on project would be great!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
feature-test-runner Playwright test specific issues
Projects
None yet
Development

No branches or pull requests

4 participants