admin管理员组文章数量:1410705
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.
本文标签: Long testing time in PlaywrightStack Overflow
版权声明:本文标题:Long testing time in Playwright - Stack Overflow 内容由网友自发贡献,该文观点仅代表作者本人, 转载请联系作者并注明出处:http://www.betaflare.com/web/1745044597a2639285.html, 本站仅提供信息存储空间服务,不拥有所有权,不承担相关法律责任。如发现本站有涉嫌抄袭侵权/违法违规的内容,一经查实,本站将立刻删除。
发表评论