Post

Playwright v1.63 was just released, and it has a new feature called "Test locks". This means only a single test with the same lock name can run at any one time. Great for tests that mutate shared resources that can not reasonably be generated uniquely for each test, but it has some limitations.

What happens if you have several CI jobs running at the same time accessing that same shared resource? Playwright has no way to know there are other test suites running, so will allow them, which risks tests mutating data relied upon by other currently running tests.

What if the reason for the lock is limited performance, and we actually want to allow 5 out of a 100 tests to run at the same time for a specific lock? Playwright does not allow you that level of control.

0 reposts1 like

Endform allows you to limit concurrent tests, which solves both these use cases. Configure a tag that you want to limit concurrency on, what the limit should be, and whether it should only apply within a specific run of your test suite, or globally across all runs happening at the same time.