I have simple tests, default in the example.spec.ts file. Before hooks alone takes a long time for such a simple case. I have already limited the tests to only one browser and even then, having two tests to run, it sometimes takes even 15 seconds
`C:\Projects\PW-Artem-B>npx playwright test
Running 2 tests using 2 workers 2 passed (13.1s)`
enter image description here
This is content from example.spec.ts
import { test, expect } from '@playwright/test';
test('has title', async ({ page }) => {
await page.goto('/');
// Expect a title "to contain" a substring.
await expect(page).toHaveTitle(/Playwright/);
});
test('get started link', async ({ page }) => {
await page.goto('/');
// Click the get started link.
await page.getByRole('link', { name: 'Get started' }).click();
// Expects page to have a heading with the name of Installation.
await expect(page.getByRole('heading', { name: 'Installation' })).toBeVisible();
});
I only commented in the file playwright.config.ts other browsers than chromium.
I use a work laptop: win11, dell latitude 5550. Node version: 22.12.0, PW version: 1.50.1. Maybe it's a problem with the work laptop, maybe it has some strange setup that causes this situation?
In this situation I tried uninstalling VSC with all components and reinstalling, nothing helped.