You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Feature Request: Continue Running Tests in Serial Mode
I would like to request a new feature for the Playwright testing framework. It would be incredibly useful to have a mode where tests within a describe block continue to run even if one test fails when running in serial mode. This functionality would be valuable for many users who need to ensure that all tests are executed, regardless of individual test failures.
Example
Setup in playwright.configure.ts
import { defineConfig } from '@playwright/test';
export default defineConfig({
// Set the number of parallel workers
workers: 4, // Adjust this number based on your requirements
});
in Test file
import { test, expect } from '@playwright/test';
test.describe.configure({ mode: 'serial' });
test.describe('Test Suite 1', () => {
test('Test 1.1', async ({ page }) => {
// Your test code here
});
test('Test 1.2', async ({ page }) => {
// Your test code here
});
});
test.describe('Test Suite 2', () => {
test('Test 2.1', async ({ page }) => {
// Your test code here
});
test('Test 2.2', async ({ page }) => {
// Your test code here
});
});
Motivation
By combining these configurations, you can run multiple test.describe blocks in parallel, with each block running its tests in serial mode. This approach maximizes test efficiency while maintaining the desired test execution order within each block.
The text was updated successfully, but these errors were encountered:
The idea behind serial mode is to force a specific execution order, because those tests somehow depend on one another. That makes it impossible to continue on failure.
It sounds like in your usecase, the tests don't depend on a specific order, but they can't run in parallel because they're using a shared resource. Is that understanding correct? In that case, take a look at https://playwright.dev/docs/test-parallel#disable-parallelism.
🚀 Feature Request
Feature Request: Continue Running Tests in Serial Mode
I would like to request a new feature for the Playwright testing framework. It would be incredibly useful to have a mode where tests within a describe block continue to run even if one test fails when running in serial mode. This functionality would be valuable for many users who need to ensure that all tests are executed, regardless of individual test failures.
Example
Setup in playwright.configure.ts
import { defineConfig } from '@playwright/test';
export default defineConfig({
// Set the number of parallel workers
workers: 4, // Adjust this number based on your requirements
});
in Test file
import { test, expect } from '@playwright/test';
test.describe.configure({ mode: 'serial' });
test.describe('Test Suite 1', () => {
test('Test 1.1', async ({ page }) => {
// Your test code here
});
test('Test 1.2', async ({ page }) => {
// Your test code here
});
});
test.describe('Test Suite 2', () => {
test('Test 2.1', async ({ page }) => {
// Your test code here
});
test('Test 2.2', async ({ page }) => {
// Your test code here
});
});
Motivation
By combining these configurations, you can run multiple test.describe blocks in parallel, with each block running its tests in serial mode. This approach maximizes test efficiency while maintaining the desired test execution order within each block.
The text was updated successfully, but these errors were encountered: