Connectors

/

Ghost Inspector

/

Diagnose a failing Ghost Inspector test
Report

Find the step that broke a Ghost Inspector test, and why

For developers and QA engineers who want the cause of a red test backed by evidence, by asking their AI assistant.

Try PopdockAI free
Get a live demo
Diagnose a failing Ghost Inspector test
Why did the Add to cart test fail in Ghost Inspector this week?
The latest failure looks like a timing problem, not a product defect. - Run: 5 October, Chrome, us-east-1 - Failing step: 7, click on #add-to-cart, element not found - Before it: the product page was still loading its price widget - Console: no errors at that point Next step: add a wait for the price widget before step 7.
Ghost Inspector
Sample figures. Your results come from your own account.
ghost-inspector-get-test
ghost-inspector-get-test-result
ghost-inspector-get-test-step
ghost-inspector-get-console-log
ghost-inspector-get-test-result-comment

On this page

The problem

The problem

The prompt

Who it's for

How it works

Tools used

Connector

Ghost Inspector

Ghost Inspector
Run it on your own Ghost Inspector data.

Connect Ghost Inspector, pick your AI tool and paste the prompt.

Try PopdockAI free

The problem

A timing issue gets logged as a product bug

Working out why a Ghost Inspector test failed means opening the failed run, finding the broken step, reading what came before and checking the console. Without that evidence people guess, and a timing issue gets logged as a bug.

Without PopdockAI

  • Open the latest failed run
  • Scroll to the step that broke
  • Read the steps before it
  • Guess at the cause without the console

With PopdockAI

  • The latest failed run and its failing step are found
  • The full step sequence before it is read
  • Console errors and earlier comments are checked
  • A likely cause is given, or unexplained, and nothing is changed

The prompt

Use this prompt

Copy it into any AI tool connected to PopdockAI. Swap the values in braces for your own.

Prompt
**Objective:** Find the cause of the most recent failure of the Ghost Inspector test named `{test-name}`, looking back `{lookback-days}` days (default 7), and report the failing step with supporting evidence.

**Step 1: Identify the test**

Call `ghost-inspector-get-test` with `name.contains` set to `{test-name}`. If more than one test matches, list the matches with their suite and id and stop, asking which one is meant. If nothing matches, say so and stop.

**Step 2: Find the failing run**

Call `ghost-inspector-get-test-result` filtered by the `test-id` from step 1, `passing` false, and `date-created.from` set to the start of the lookback window. Take the most recent result. Record its `id`, that is the test result id every later step needs. If there are no failing runs in the window, say the test has not failed in that period and stop.

**Step 3: Locate the failing step**

Call `ghost-inspector-get-test-step` with `test-result-id` set to the id from step 2 and `passing` false. Then call it again without the `passing` filter to get the full sequence, so you can say what the test had done up to that point.

* the `command`, `target` and `value` say what the step tried to do
* the `sequence` says how far through the test it got
* a failing assert or click usually means the page did not reach the expected state, not that the assertion itself is wrong

**Step 4: Check the browser console**

Call `ghost-inspector-get-console-log` with `test-result-id` set to the id from step 2 and `error` true. Match any errors against the time and url of the failing step. If there are no errors, call it again without the `error` filter and look for warnings around the same url.

**Step 5: Check whether anyone has already looked**

Call `ghost-inspector-get-test-result-comment` with `test-result-id` set to the id from step 2. If someone has already commented, quote it rather than repeating their analysis.

**Step 6: Report**

* Test, suite, browser and region
* When it last failed, and the run url it started from
* The failing step: sequence number, command, target, value
* What the test had successfully done before that point, in one or two lines
* Console errors that look related, quoted
* Your best explanation, and whether this looks like an application defect, a timing problem or a stale test

**Rules and guidelines:**

* This is a read only investigation. Do NOT call `ghost-inspector-execute-test`, `ghost-inspector-execute-suite`, `ghost-inspector-update-test`, `ghost-inspector-duplicate-test`, `ghost-inspector-add-suite-result-comment` or any other tool that changes or runs anything.
* Do not guess at a cause the evidence does not support. If the step data and the console are both clean, say the failure is unexplained by the captured evidence and recommend a rerun.

**Validation:**

* If `{test-name}` matches nothing, report that and list a few test names from `ghost-inspector-get-test` so the user can correct it.
* If the step list comes back empty, say the run recorded no steps and report only what the result row itself carries.

Who it's for

One answer, three teams that use it

QA engineers

Find the broken step fast

The failing step and the steps before it come with console errors, so you see what happened.

Why did the Login with SSO test fail in Ghost Inspector yesterday?

Developers

Know if it is your bug

A best explanation as a product defect, timing problem or stale test tells you whether to act.

Is the Product filter test failure in Ghost Inspector a real defect or a timing issue?

QA leads

Reuse earlier analysis

Comments already left on the run are quoted, so nobody repeats the same investigation.

Diagnose the latest failure of the Checkout guest test and include what people already said about it.

How it works

What PopdockAI does when you ask

You name the test, and your AI assistant gathers the evidence around the failure. It calls it a defect, timing problem or stale test only when the evidence supports it.

01

Ask

You name the test.

Your AI tool

02

Read

It finds the latest failed run and reads the failing step and the steps before it.

ghost-inspector-get-test
ghost-inspector-get-test-result
ghost-inspector-get-test-step

03

Check

It reads console errors at that point and any comments already left.

ghost-inspector-get-console-log
ghost-inspector-get-test-result-comment

04

Report

You get the failing step and a likely cause, or unexplained if the evidence is clean.

Your AI tool

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.

get-data

ghost-inspector-get-test

Returns the browser tests defined in Ghost Inspector, with the suite they belong to, their schedule and run settings, and whether the last run passed. Filter by suite, name, browser, region, creation date or current pass state, or fetch a single test by its Ghost Inspector ID.
get-data

ghost-inspector-get-test-result

Returns individual Ghost Inspector test runs, including whether the run passed, how long it took, and the test and suite it belongs to. Filter by test, suite, browser, date range, pass state, or a minimum execution time for finding slow runs. This is the tool to start from when investigating a failure.
get-data

ghost-inspector-get-test-step

Returns the individual steps executed within a Ghost Inspector test run, in sequence, with the command, the target element and whether the step passed. Pass a test result ID to see that run's steps. Filter to failing steps only, or to a single command such as click or assign, to find exactly where a test broke.
get-data

ghost-inspector-get-console-log

Returns the browser console output captured during a Ghost Inspector test run, flagging which entries were errors. Pass a test result ID to see that run's output, and filter to errors only or to a date range. Useful for telling an application bug apart from a flaky selector.
get-data

ghost-inspector-get-test-result-comment

Returns the comments people have left on Ghost Inspector test results, filtered by test result or by date. Use it to see whether a failure has already been explained.
Read only.Nothing in Ghost Inspector Changes

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.

How Popdock AI secures your data

The outcome

From a red test to a likely cause

Try PopdockAI free
Get a live demo

Related use cases

More ways to put this data to work

All Ramp use cases

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.

Try PopdockAI Free
See Documentation