> ## Documentation Index
> Fetch the complete documentation index at: https://docs.puggy.dev/llms.txt
> Use this file to discover all available pages before exploring further.

# AI bug reports and test scripts

> Generate a bug report or a Playwright test script from a session, review it, and track your monthly AI credits.

The right panel of every [session detail page](https://docs.puggy.dev/console/session-details.md) has two tabs: **Bug report** and **Test script**. Both can be written by hand or generated with AI from the session's evidence.

AI works without any setup. Generating a bug report or a test script uses one of your monthly [AI credits](#ai-usage-and-credits).

## Bug report

### Generate a report

![The Bug report tab: the Draft this report with AI card with Focus on and Generate bug report, above the Title, Severity, Description, Steps to reproduce, and Expected behavior fields](https://mintcdn.com/anoclap/hpVVUQ1W_GXTEu9W/images/console/bug-report-light.webp?fit=max\&auto=format\&n=hpVVUQ1W_GXTEu9W\&q=85\&s=a998982ae4cd0c0893aefe2dcdc08544)

1. Open a session. If the right panel is closed, open it with the **Bug report** icon on the right edge of the page.
2. Optionally fill in any fields you already know, such as the **Title** or **Description**. They become your draft.
3. In **Focus on**, choose which evidence the report should lean on: **Best evidence** (the default), **Video**, **Console**, or **Network**.
4. Choose **Generate bug report**. Puggy reads the recording, console, and network logs and fills in every field. If you wrote a draft, turn on **Enhance my draft instead** first: Puggy keeps what you wrote and fills in the gaps.
5. Review and edit the result.
6. Choose **Save**.

The report has a **Title**, **Severity** (**Critical**, **High**, **Medium**, or **Low**; Medium by default), **Description**, **Steps to reproduce**, **Expected behavior**, and **Actual behavior**. You can edit any field after generating.

A generated report isn't kept until you choose **Save**: the footer says **Not saved yet** until you do. Use **Regenerate** to try again. Saved reports show whether they were **Generated by** a model or **Written by hand**.

### Post the report

Once the report is saved, **Post** in the footer offers every connected tracker: **Post to Jira**, GitHub, Linear, ClickUp, YouTrack, or Slack. Pick the destination (project, repository, team, list, or channel) and post. The ticket is linked to the session and listed under **Posted to** and on the **Info** tab.

While you have unsaved edits, **Save** replaces **Post**, so you always file the version you can see.

No trackers connected? Ask an admin to [connect one](https://docs.puggy.dev/integrations/setup.md).

## Test script

Puggy writes a Playwright test from the interactions captured in the session. Recordings need **Interactions** turned on in the extension for this to work well.

### Review the proposed checks

Open the **Test script** tab. Under **What the test checks**, Puggy proposes the checks the test should make, such as a field being visible or a button being enabled at the end of the flow. Each check says when it applies (for example **At the end**) and what kind of check it is (for example **Visible**).

![The Test script tab: What the test checks, with Reset and Propose again, and proposed checks each with accept, edit, and reject buttons](https://mintcdn.com/anoclap/hpVVUQ1W_GXTEu9W/images/console/test-script-checks-light.webp?fit=max\&auto=format\&n=hpVVUQ1W_GXTEu9W\&q=85\&s=b69ca022b6d18453729ebdc1e54f6fb7)

* **Accept** (✓), **Edit** (pencil), or **Reject** (✕) each check, or **Add** your own.
* Only accepted checks go into the script. If none is accepted, the script contains a review marker where the outcome check belongs.
* **Propose again** asks for a fresh set of checks. Proposals are free and don't use credits; you can ask for up to 3 new proposals per session.
* **Reset** puts the list back the way it was proposed.
* Steps Puggy left out as noise are listed under **Steps left out as noise**; **Restore** puts one back.

Sessions recorded with an older version of the extension show a notice at the top: they didn't capture page state, so the checks are limited and some selectors may be brittle. Update the extension to get full checks on new recordings.

### Generate and use the script

Choose **Generate test script**. Then:

* **Save** keeps it with the session.
* **Copy** or **Download** takes the script to your test suite.
* **Copy prompt for your repo** copies a prompt you can give a coding agent, so it adapts the test to your codebase.

The script lists any review markers with their line numbers. Check selectors and assertions before you commit the test. Generating the script uses one credit; if generation fails, no credit is spent.

## AI usage and credits

Open **AI Usage** in the sidebar to see how your AI credits are being spent.

* Every member gets **20 AI credits a month**. Credits reset on the 1st.
* Each bug report, test script, or video transcript generated on Puggy's key uses one credit. Proposing test checks is free.
* If your organization has its own AI key, generations use it instead and don't spend credits.

![The AI Usage page: Monthly credits showing 0 of 20 used and On track, AI calls by month for six months, By feature, and How credits work](https://mintcdn.com/anoclap/hpVVUQ1W_GXTEu9W/images/console/ai-usage-light.webp?fit=max\&auto=format\&n=hpVVUQ1W_GXTEu9W\&q=85\&s=88fa1f6e0ee7688066ba5fc254fcd44f)

The page shows:

* **Monthly credits**: whose key you're on (for example **Puggy's shared AI key**), credits used out of 20, how many are left, when they reset, and a status: **On track**, **Running low**, **Almost out**, or **Quota reached**.
* **AI calls by month** for the last six months.
* **By feature**: how many bug reports, test scripts, video narratives, and test assertion proposals ran, and how many used your organization's own key.
* A month picker (**This month** by default), a refresh button, and **How credits work**.

When your credits are used up, AI generation stops until they reset on the 1st. You can still write reports and scripts by hand.


This documentation is built and hosted on [Mintlify](https://mintlify.com), a developer documentation platform.