Jeanluca Scaljeri
Jeanluca Scaljeri

Reputation: 29179

How to select a playwright project for you tests inside vscode

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?

Upvotes: 0

Views: 3086

Answers (1)

Yevhen Laichenkov
Yevhen Laichenkov

Reputation: 8692

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

Upvotes: 3

Related Questions