Home > Back-end >  How to select a playwright project for you tests inside vscode
How to select a playwright project for you tests inside vscode

Time:04-19

I have a Playwright config file with 2 project, one for development and one for ci:

projects: [
{
  ...devices['Desktop Chrome'],
  name: 'Default',
  retries: 2,
  use: {
    baseURL: 'http://localhost:8000'
  },
},
{
  ...devices['Desktop Chrome'],
  name: 'CI',
  retries: 0,
  use: {
    baseURL: 'https://my-dev-url/app'
  },
},

Then when I start the test inside vscode

enter image description here

it always uses the CI project. The weird thing is, when I swap the projects it doesn't matter. So my question, how can I define the project to use in vscode?

CodePudding user response:

Actually, by default, it should select the first project as a run profile. However, you can change the project inside the Test Explorer tab.

Also, please make sure that you have the latest playwright and plugin versions as well.

change project profile

  • Related