Back to Library
API

API Negative Scenario

Prompt

Generate Playwright API test that sends invalid payload and validates error response structure.

Example Code

const res = await request.post('/api',{data:{}}); expect(res.status()).toBe(400);

Quick Actions

PRO TIP

Paste this prompt as a comment in your .spec.ts file and let Copilot generate the test.

Next Steps
Browse Prompts