Connectors

/

Ghost Inspector

/

Trace a Ghost Inspector test failure to GitHub commits
Report
Cross-Connector

Find the GitHub commits that may have broken a Ghost Inspector test

For developers who want to know what changed between a test's last pass and first failure, by asking their AI assistant.

Try PopdockAI free
Get a live demo
Trace a Ghost Inspector test failure to GitHub commits
What changed in GitHub between the last pass and first failure of the Product search test in Ghost Inspector?
The Product search test last passed at 09:10 UTC on 5 October and first failed at 13:40 UTC. - Commits in the gap: 4 - Likely suspect: a1b2c3d by Jordan Lee, Refactor search filters - Workflow runs: Deploy web succeeded at 12:55 UTC This is correlation, not proof. Want the other three commits?
Ghost Inspector
Sample figures. Your results come from your own account.
ghost-inspector-get-test
ghost-inspector-get-test-result
github-get-commit
github-get-workflow-run

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

What changed between the last pass and the first failure

When a Ghost Inspector test starts failing, the first question is what changed. Answering it means finding the last pass and first failure, then listing GitHub commits and runs in that gap while allowing for time zones.

Without PopdockAI

  • Find the last pass and first failure by hand
  • Convert times between the two systems
  • List GitHub commits and workflow runs in the gap
  • Assume the nearest commit is to blame

With PopdockAI

  • The failing streak and the last pass before it are found
  • Commits and workflow runs in the gap are listed, compared in UTC
  • Commits mentioning the tested page are marked as likely suspects
  • Suspects are labelled as inference, 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 code changes most likely to have broken the Ghost Inspector test named `{test-name}`, searching back `{lookback-days}` days (default 14).

**Step 1: Find the test (Ghost Inspector)**

Call `ghost-inspector-get-test` with `name.contains` set to `{test-name}`. If nothing matches, report that and stop. If more than one test matches, list them with their suite name and id and stop so the user can choose.

**Step 2: Find the break point (Ghost Inspector)**

Call `ghost-inspector-get-test-result` with `test-id` set to the test's id and `date-created.from` set to `{lookback-days}` days ago. Order the results by `date-execution-started` yourself. Find the earliest failing result that is not followed by a pass (the first failure of the current failing streak) and the last passing result before it.

* If the test is currently passing, say so and stop.
* If there is no passing result in the window, report that the test has failed for the whole window, suggest a longer `{lookback-days}`, and continue using the start of the window as the lower bound.

**Step 3: Carry the window across (GitHub)**

The window is from the last passing result's `date-execution-started` to the first failing result's `date-execution-started`. Call `github-get-commit` with `commit-date.from` and `commit-date.to` set to those two times. Then call `github-get-workflow-run` with `created-date.from` and `created-date.to` set to the same window to see which builds and deploys ran.

Ghost Inspector and GitHub may report times in different time zones. Compare them in UTC, and if either side has no zone, widen the window by one hour on each side and say that you did.

**Step 4: Report**

* The test: name, suite, id, and the last-pass and first-fail times.
* Commits in the window: sha (short), author, date and first line of the message, newest first.
* Workflow runs in the window: name, branch, conclusion, created date and url.
* A short judgement of which commits are the strongest suspects, based on whether the message mentions the page, feature or URL the test covers (its `start-url` and name). Label this as inference.

**Rules & Guidelines:**

* `ghost-inspector-get-test` and `ghost-inspector-get-test-result` are on the ghost-inspector server; `github-get-commit` and `github-get-workflow-run` are on the github server.
* This prompt is read-only. Do NOT call `ghost-inspector-execute-test`, `ghost-inspector-add-test-result-comment`, `github-add-issue` or `github-add-issue-comment`.

**Validation:**

* If no commits fall in the window, say so plainly: the cause is more likely data, environment or the test itself than code, and point the user at the failing result's steps and console log.
* Never claim a commit caused the failure. Report correlation only.

Who it's for

One answer, three teams that use it

Developers

Find the commit to look at first

Commits mentioning the page or feature the test covers are marked as likely suspects.

What GitHub commits landed between the last pass and first failure of the Cart update test?

QA engineers

Rule out code changes

When no commit falls in the window, you know to look at data, environment or the test.

Did anything change in GitHub before the Wishlist test started failing in Ghost Inspector?

Tech leads

Triage a broken test quickly

A short suspect list helps you assign the investigation to the right person.

List the GitHub workflow runs and commits around the first failure of the Payment test.

How it works

What PopdockAI does when you ask

You name the test, and your AI assistant lists the GitHub changes between its last pass and first failure. When nothing falls in the window, it points to data, environment or the test itself.

01

Ask

You name the test.

Your AI tool

02

Find

It finds the start of the failing streak and the last pass before it.

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

03

Compare

It lists GitHub commits and workflow runs in that gap, comparing times in UTC.

github-get-commit
github-get-workflow-run

04

Report

You get likely suspects labelled as inference, never as proven cause.

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

github-get-commit

Returns GitHub commits from a repository. Filter by SHA, author name, message text and commit date range.
get-data

github-get-workflow-run

Returns GitHub Actions workflow runs with their status and conclusion. Filter by workflow name, run number, branch, triggering event, status, conclusion and created date range.
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

Suspect commits, with correlation kept separate from 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