Skip to content
AI

Copy-for-AI prompt

The prompt the API returns for a failed attempt, ready for an assistant with the repository open.

Get a test’s attempts in a run, with the Copy-for-AI prompt. Every attempt of one test in one run, oldest first, each with its errors, code frame and a ready-made prompt for an assistant that has the repository open (null for an attempt without a real failure). Cheap.

curl "https://app.squally.dev/api/v1/projects/$PROJECT/runs/{runId}/tests/{testName}" \
-H "Authorization: Bearer $SQUALLY_API_KEY"

A prompt for an assistant that has the repository open, byte-identical to the text that Copy prompt copies under Fix in your agent, Without MCP, on the attempt page. null for an attempt without a real failure (a pass, a test.fail() marker, no error text).

The prompt for a failed first try of a test that then passed on its retry (invented data):

You have the repository open. Find the test below, explain the failure and propose a fix.
Failing test: chromium > checkout.spec.ts > Checkout > applies a coupon code
File: tests/checkout.spec.ts
Project: chromium
Run branch: main
Attempt: first try
Outcome: a later retry of this test passed - a flaky run.
Error message:
Error: expect(locator).toHaveText(expected) failed
Locator: getByTestId('order-total')
Expected: "€ 45.00"
Received: "€ 50.00"
Timeout: 5000ms
Stack (top frames):
at /home/runner/work/storefront-web/tests/checkout.spec.ts:48:52
Attempt duration: 6210 ms
Failure category: Assertion
Last 30 days on CI: flaky rate 50% (4/8), failure rate 0% (0/8)

Every parameter and the whole response: API reference.