Loading…
Loading…
This test has passed on every run for three months:
1test("newly created products appear in the catalog", async ({ request }) => {
2 const created = await request.post("/api/admin/products", {
3 headers: { Authorization: `Bearer ${adminToken}` },
4 data: { sku: "SKU-9001", name: "Test Monitor", description: "Seeded by test", category: "display", price: 199.99, stock: 5 },
5 });
6 expect(created.status()).toBe(201);
7
8 const catalog = await request.get("/api/products?pageSize=50");
9 expect(catalog.status()).toBe(200);
10 const body = await catalog.json();
11 expect(body.meta.total).toBeGreaterThan(0);
12});Support reports that products created by admins do not appear in the catalog until the service is restarted. You reproduce it manually in thirty seconds. The test still passes.
Your task: explain exactly why the test passes while the defect is real, then rewrite it. Finally, describe how you would find every other test in the suite with the same weakness.
Write your own answer first — the defect report, the case table, the locator, whatever the question asks for. An interviewer grades your reasoning, not your recall.
Practice this live with an AI interviewer
Starts a QA mock interview pre-filled with this problem — you can edit the brief before starting.