0

A 有多个测试文件到扩展名为 spec.ts 的特定文件夹中,我如何使用 Playwright 运行特定文件。当前配置设置为测试文件夹,并将从中运行所有文件(测试):

testDir: './smokeTests',

假设这是配置文件中的某个选项,但问题是哪一个

4

1 回答 1

2

在配置中使用 testMatch:

testMatch:['sampleTest.spec.ts']

https://playwright.dev/docs/api/class-testconfig#test-config-test-match

于 2021-12-23T14:39:29.650 回答