I want to run the same test for some urls (1000+) and I want to be the quickest as possible. I loop the test for each url, but when the number of urls exceeds 10, it will cause a timeout error. I guess this may be because each test is ran sequentially, do we have a way to run test in parallel?
const queries = getQueries();
for (let i=0; i < queries.length; i++){
test.describe('LinkBroken'+ i.toString(), () => {
test(queries[i].split('\t')[2], async ({ page }, testInfo) => {
const url = getUrl(queries[i])
await page.goto(url);
const locators = page.locator('#b_content').locator('a:visible');
const locator_count = await locators.count()
for (let i=0; i <locator_count; i++){
const link = locators.nth(i);
await link.highlight();
await link.click({trial:true});
}
});
})
}
I tried to set playwright config as below, but it still doesn't work with fullyParallel: true
and workers: 10
.