---
title: "Generate tests from app"
method: POST
path: "/api/apps/{app_id}/testing-agent/flows/generate-from-app-context"
---

# Generate tests from app

`POST /api/apps/{app_id}/testing-agent/flows/generate-from-app-context`

<Info>This API is in beta. Endpoints, fields, and behavior may still change, so avoid depending on it in production.</Info>

Has Base44 read the app's code and builder conversation, write up to 5 tests for its main features, and save them. The response lists the saved tests. Start them with [Run test](/api-reference/run-test).

This makes AI calls and costs credits for the tests it saves. It runs while you wait, usually for 30 seconds to a minute. The call is refused when the workspace is out of credits.

The app needs room for 5 more tests, so it can have at most 245 when you call this. An app with no pages or entities yet gets no tests and no charge, with `no_changes` set to `true`.

Each call adds new tests, even when similar ones exist. To get ideas that avoid the tests you have, use [Suggest new tests](/api-reference/suggest-new-tests). This call also saves a generation checkpoint, as [Save test generation checkpoint](/api-reference/save-test-generation-checkpoint) does.

This is limited to 20 requests per minute per caller for each app. Some workspaces have a different limit.

<Note>This endpoint accepts a personal API key belonging to a user with editor access to the app. Read-only keys and workspace API keys are refused.</Note>

<Warning>The response includes fields beyond the ones documented here. Don't rely on undocumented response fields, as they can change at any time.</Warning>

## Path parameters

- `app_id` string, required — ID of the app.

## Response `200`

The tests Base44 saved.

- GeneratedTests — Tests Base44 generated and saved.
  - `flows` FlowResponse[], required — The saved tests, up to 5. Empty when `no_changes` is `true`.
    - `id` string, required — ID of the test.
    - `app_id` string, required — ID of the app the test belongs to.
    - `name` string, required — Short name of the test.
    - `goal` string, required — What the testing agent tries to do, in plain language.
    - `role` string, nullable — Role set on the test, or `null` when none is set. A test without one can still run as a role its name or goal names. The run's `flow_role` shows the role actually used.
    - `source` string, required — `manual` for a test you created, `app_context` for one Base44 generated from the app.
    - `revision` integer, required — Starts at 1 and goes up each time the test is edited.
    - `created_date` string, required — When the test was created, as an ISO 8601 UTC timestamp.
    - `updated_date` string, required — When the test last changed, as an ISO 8601 UTC timestamp.
  - `no_changes` boolean, required — `true` when the app has no pages or entities yet, so nothing was generated or charged.

## Other responses

- `400` — The app has more than 245 tests, or the workspace is out of credits.
- `401` — Missing or invalid credentials.
- `403` — You don't have editor access to this app, the app is blocked, or your API key is read-only or a workspace API key.
- `404` — App not found.
- `409` — Your workspace requires an unlocked SSO session.
- `429` — Rate limit exceeded.

## Changes

> 28 revisions in range; 1 not diffed.

- **2026-10-06** `dddf17e0f9f0` — 1 info
  - endpoint added

[Change history](https://skmtc.dev/adexad/apis/base44-app-management-api/changes/api/apps/:app_id/testing-agent/flows/generate-from-app-context/post.md)

---

[API](https://skmtc.dev/adexad/apis/base44-app-management-api.md) · [All operations](https://skmtc.dev/adexad/apis/base44-app-management-api/llms.txt) · [OpenAPI document](https://skmtc.dev/adexad/apis/base44-app-management-api/revisions/99df85f579f9?raw)
