/
/
Turn failing tests into BugHerd bugs, once each
For QA and development teams who want Ghost Inspector failures logged in BugHerd with the evidence attached, just by asking their AI assistant.
On this page
Connector
Connect Ghost Inspector, pick your AI tool and paste the prompt.
The problem
Writing up each failure by hand creates duplicate bugs
After a failed nightly run, someone opens each result, finds the failed step, copies console errors and writes a BugHerd task. Done for every failure, it leads to duplicate tasks or a screenshot change logged as a bug.
Without PopdockAI
- Open each failed result in Ghost Inspector
- Copy the failed step and console errors
- Search BugHerd for an existing task
- Raise duplicates and screenshot only bugs
With PopdockAI
- Tests still failing are found with the failed step and console errors
- Tests with an existing BugHerd task are skipped
- Screenshot only failures are listed apart
- You approve the list before one task per test is created
The prompt
Use this prompt
Copy it into any AI tool connected to PopdockAI. Swap the values in braces for your own.
**Objective:** Log a BugHerd task in the project `{project-name}` for each test in the Ghost Inspector suite `{suite-name}` that failed in the last `{lookback-days}` days (default 1) and has no task yet.
A BugHerd task raised from a failing test carries "ghost-inspector:<test id>" in its external-id, so one test never gets two tasks.
**Step 1: Find the failures**
Call `ghost-inspector-get-suite` with `name.contains` set to `{suite-name}`. If nothing matches, say so and stop. If several match, list their names and ids and ask which one. Then call `ghost-inspector-get-test-result` with `suite-id`, `passing` false and `date-created.from` set to the start of the period. Keep only the latest failing result per test-id, and drop tests whose latest result overall (call `ghost-inspector-get-test-result` with `test-id` and `max-records` 1) is passing again.
**Step 2: Gather the evidence**
For each failing result:
* Call `ghost-inspector-get-test-step` with `test-result-id` and `passing` false: the first failed step's command, target, value and url.
* Call `ghost-inspector-get-console-log` with `test-result-id` and `error` true: up to three error lines.
**Step 3: Skip what is already logged**
Call `bugherd-get-projects` with `name.contains` set to `{project-name}`. If nothing matches, say so and stop. If several match, list their names and project-id values and ask which one; do not guess. For each test, call `bugherd-get-tasks` with `project-id` and `external-id` set to "ghost-inspector:<test id>". If an open task exists, list it under "already logged" and skip the test.
**Step 4: Confirm, then write**
Show the tasks you will create (one per test) and wait for an explicit yes; accept removals. Then for each approved test:
1. Call `bugherd-add-task` once with `project-id`, `external-id` "ghost-inspector:<test id>", `severity` important (critical when the test's start-url is the site's home page or a checkout or login page), and `description`: the test name, the failed step (command, target, value), the step url, the browser and region, the console errors, and the date of the failing run.
2. Call `ghost-inspector-add-test-result-comment` once with `result-id` set to the failing result's id and `message` "Logged in BugHerd as task #<task number>." (read the task number back with `bugherd-get-tasks` and `external-id`).
**Step 5: Report**
Tables of tasks created, tests already logged, and anything that failed.
**Rules & Guidelines:**
* Tools named bugherd-... are on the bugherd MCP server; tools named ghost-inspector-... are on the ghost-inspector MCP server. If either set of tools is missing, say which server is not connected and stop.
* The only write tools this prompt may call are `bugherd-add-task` and `ghost-inspector-add-test-result-comment`, once per approved test.
* Do not re-run tests or accept screenshots.
**Validation:**
* If no test failed in the period, say so and stop.
* A failure on a screenshot comparison only (screenshot-compare-passing false, every step passing) is a visual change, not necessarily a bug: list it separately and do not log it unless the user asks.Who it's for
One answer, three teams that use it
QA engineers
Log failures without the copying
Each task arrives with the failed step and console errors already in it.
Log today's failing tests from the Fabrikam Store suite as bugs in the BugHerd project Fabrikam Store.
Developers
Get bugs with real evidence
Tasks include the failed step and errors, and higher severity for home, checkout or login pages.
Turn the failing Login suite tests from the last 2 days into BugHerd tasks in Contoso Web.
Project managers
Keep the bug list free of duplicates
Tests that already have a task are skipped, so the board stays clean.
Raise BugHerd tasks for new failures in the Northwind Checkout suite this week, skipping ones already logged.
How it works
What PopdockAI does when you ask
You name the suite, the BugHerd project and a period, and your AI assistant drafts one task per real failure. Nothing is created until you approve the list, and tests are never re run.
01
Ask
You name the Ghost Inspector suite, the BugHerd project and how far back to look.
02
Gather
It finds tests still failing and collects the failed step and console errors.
03
Check
It skips tests that already have a BugHerd task and lists screenshot only changes apart.
04
Create
You approve the list, then it adds one BugHerd task per test and notes the task number on the failing result.
What PopdockAI provides
The tools behind the answer
Ready made tools for Ghost Inspector and one secure connection to your AI tool. No code, no exports.
ghost-inspector-get-suite
ghost-inspector-get-test-result
ghost-inspector-get-test-step
ghost-inspector-get-console-log
bugherd-get-projects
bugherd-get-tasks
bugherd-add-task
ghost-inspector-add-test-result-comment
This report is built from Get data tools only. PopdockAI applies the row, field and parameter rules your admin sets, and every query is written to the audit trail.
The outcome
One documented bug per real failure
Related use cases
More ways to put this data to work
One prompt template with infinite possibilities.
Your AI assistant adapts its approach, tone, and capabilities to match each unique context while you maintain a single, manageable workflow.
Join forward-thinking companies that are transforming their operations with intelligent, secure AI automation.

.webp)
