I am trying to run Parametrized Playwright tests created with Node.js in Parallel.
SRC: https://playwright.dev/docs/test-parameterize
SRC: https://playwright.dev/docs/test-parallel
However, when I combine the two, the test cases run sequentially. Can the parametrised tests be executed in parallel in Playwright (Node.js)?
import fs from 'fs';
import path from 'path';
import { test } from '@playwright/test';
import { parse } from 'csv-parse/sync';
const records = parse(fs.readFileSync(path.join(__dirname,
'input.csv')), {
columns: true,
skip_empty_lines: true
});
for (const record of records) {
test(`foo: ${record.test_case}`, async ({ page }) => {
console.log(record.test_case, record.some_value,
record.some_other_value);
// Test Case Goes Here.
});
}