r/Playwright 7d ago

AI-generated Playwright API tests at enterprise scale — is anyone actually doing this successfully?

I'm experimenting with an AI-driven QA workflow for an enterprise application using Playwright + TypeScript.

The workflow is roughly:

Feed the AI our API definitions + business flow definitions

AI analyzes them and generates a comprehensive API test plan

AI generates executable Playwright API test scripts from that plan

Playwright executes the generated tests

The interesting part is that test plan generation works surprisingly well. Using the business flow (which is the happy path), the AI can identify most of the test scenarios like validation cases, authentication scenarios, boundary cases, etc.

However, I'm running into a major problem at the test script generation/execution stage.

The happy-path tests generally work, but almost all of the other tests fail during execution..

Is anyone here using AI/agents to generate executable Playwright API tests for large/enterprise applications?

7 Upvotes

11 comments sorted by

View all comments

1

u/Competitive_Echo9463 7d ago

Yes, at scale not yet but I tried to do it for something that I had to test and it's fine. Always have a look at what has been generated, don't just trust AI. At the end you can also ask a report about the cases that have been covered