Connectors

/

Jira

/

File a Jira bug for a Ghost Inspector test failure
Write
Cross-Connector

Turn a Ghost Inspector failure into one well-evidenced Jira bug

For QA and developers who want test failures raised in Jira with the evidence and links both ways, by asking their AI assistant.

Try PopdockAI free
Get a live demo
File a Jira bug for a Ghost Inspector test failure
File a Jira bug in WEB for yesterday's failed Guest checkout result in Ghost Inspector.
The result is a real failure, and WEB has no open bug for Guest checkout. - Summary: Guest checkout fails at step 7, #pay not found - Evidence: failing step and 2 console errors - Run: 6 October, Chrome, us-east-1 - Links: Jira bug to result, and the key commented on the result Shall I raise it?
Jira
Sample figures. Your results come from your own account.
ghost-inspector-get-test-result
ghost-inspector-get-test-step
ghost-inspector-get-console-log
ghost-inspector-get-test-result-comment
jira-get-issue
jira-add-issue
jira-add-issue-comment
jira-get-issue-watcher
jira-add-issue-remote-link
ghost-inspector-add-test-result-comment
jira-get-issue-type

On this page

The problem

The problem

The prompt

Who it's for

How it works

Tools used

Connector

Jira

Jira
Run it on your own Jira data.

Connect Jira, pick your AI tool and paste the prompt.

Try PopdockAI free

The problem

Test failure bugs arrive without evidence or links

Raising a useful Jira bug from a Ghost Inspector failure means copying the failing step, console errors and run details, then checking nobody filed it already. Linking the bug and the result both ways is the step usually skipped.

Without PopdockAI

  • Copy the failing step and console errors
  • Search Jira for an existing bug
  • Write up the bug by hand
  • Skip linking the bug and the test result

With PopdockAI

  • The run is confirmed as failed first
  • The first failing step and console errors are collected
  • An existing open bug on the same test stops it
  • After you confirm, one bug is created and linked both ways

The prompt

Use this prompt

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

Prompt
**Objective:** Turn Ghost Inspector test result {test-result-id} into a fully evidenced bug in the Jira project whose numeric id is {jira-project-id}, then link the Jira issue and the Ghost Inspector result to each other. This prompt writes to both systems, once each, and only after the confirmation in Step 4.

**Step 1: Confirm the failure is real**

Call `ghost-inspector-get-test-result` on the ghost-inspector server with `id` set to {test-result-id}.

If it returns nothing, report that the result id was not found and stop. If the result is passing, report that the run passed and stop without writing anything. Otherwise keep the test name, suite, browser, region, start URL, creation date and execution time.

**Step 2: Gather the evidence**

Call `ghost-inspector-get-test-step` with `test-result-id` set to {test-result-id} and `passing` set to false. Keep the first failing step in sequence order, with its command, target, value and URL. That step is where the test broke; the ones after it are usually consequences.

Call `ghost-inspector-get-console-log` with `test-result-id` set to {test-result-id} and `error` set to true, `max-records` 20. Keep the output and URL of each entry.

Call `ghost-inspector-get-test-result-comment` with `test-result-id` set to {test-result-id}. If any comment already contains the text `Ghost Inspector result id` or a Jira issue key, a ticket already exists for this result. Report that key and stop without writing anything.

**Step 3: Check Jira does not already have it**

Call `jira-get-issue` on the jira server with `summary.contains` set to the test name. If an issue is returned whose status is not Done, Closed or Resolved, report its key and stop. Do not raise a duplicate.

**Step 4: Confirm before writing**

Show the user the summary line, the failing step, the console errors, and the project id and issue type id that will be used. Ask for explicit confirmation. Do not proceed without it.

**Step 5: Raise the issue**

Call `jira-add-issue` on the jira server with `project-id` set to {jira-project-id}, `issue-type-id` set to {jira-issue-type-id}, and `summary` set to `Ghost Inspector failure: ` followed by the test name. If {assignee-account-id} was supplied, pass it as `assignee-account-id`.

`jira-add-issue` returns no fields, so the new issue's identifier does not come back. Recover it by calling `jira-get-issue` with `summary.contains` set to the same summary text and taking the most recently created match. If nothing comes back, report that the issue may have been created but could not be located, and stop rather than creating a second one.

**Step 6: Record the evidence and the link**

Call `jira-add-issue-comment` with `issue-id` set to the issue key recovered in Step 5 and `body` set to a comment containing, on separate lines: the line `Ghost Inspector result id: ` followed by {test-result-id}; the suite, browser, region and start URL; the failing step's command, target and value; and each console error. If `jira-add-issue-comment` rejects the issue key, resolve the numeric issue id by calling `jira-get-issue-watcher` with `issue-key` set to that key and reading the issue id it returns, then retry once. If it still fails, report the issue key and the comment text you were unable to post, and continue.

Call `jira-add-issue-remote-link` with the same identifier as `issue-id`, `url` set to the Ghost Inspector result URL, `title` set to the test name, `application-name` set to `Ghost Inspector`, and `global-id` set to {test-result-id}.

Call `ghost-inspector-add-test-result-comment` on the ghost-inspector server with `result-id` set to {test-result-id} and `message` set to the Jira issue key and summary.

**Step 7: Report**

State the Jira issue key, the Ghost Inspector result id, and which of the three write calls in Step 6 succeeded. Name any that did not, so the link can be completed by hand.

**Rules & Guidelines:**

* `ghost-inspector-get-test-result`, `ghost-inspector-get-test-step`, `ghost-inspector-get-console-log`, `ghost-inspector-get-test-result-comment` and `ghost-inspector-add-test-result-comment` are on the ghost-inspector server. `jira-get-issue`, `jira-get-issue-type`, `jira-add-issue`, `jira-add-issue-comment`, `jira-add-issue-remote-link` and `jira-get-issue-watcher` are on the jira server. All three servers must be connected.
* The linking convention used by every prompt on this server: a Jira issue raised from a Ghost Inspector failure has a summary beginning `Ghost Inspector failure: ` followed by the test name, and its first comment contains the line `Ghost Inspector result id: ` followed by the result id. Matching in both directions depends on this, so do not vary the wording.
* Call `jira-add-issue` at most once. If any later step fails, do not start over from Step 5.
* Do NOT call `ghost-inspector-execute-test`, `ghost-inspector-execute-suite` or `ghost-inspector-accept-screenshot`. Re-running the test and accepting a new visual baseline are separate decisions.
* Do NOT call `jira-update-issue` or `jira-assign-issue` to change anything beyond the issue this prompt created.

**Validation:**

* If the test result has no failing steps and no console errors, still raise the issue but say plainly in the comment that no step-level or console evidence was captured.
* If {jira-project-id} or {jira-issue-type-id} is not a valid id, `jira-add-issue` will fail. Before writing, call `jira-get-issue-type` with `project-key` set to the project you expect and confirm the issue type id appears for it.
* If the user does not confirm at Step 4, stop and write nothing.

Who it's for

One answer, three teams that use it

QA engineers

File bugs with the evidence attached

Turn a failed run into a bug with the failing step and console errors, in one request.

File a Jira bug in MOB for this morning's failed Login flow result in Ghost Inspector.

Developers

Get bugs you can act on

Bugs arrive with the first failing step and console output, so you can start debugging straight away.

Raise a Jira bug in WEB for the latest failed Checkout test in Ghost Inspector, with the console errors.

QA leads

Avoid duplicate test bugs

An open bug for the same test stops a second one, and both sides are linked for traceability.

Is there already a Jira bug for the failing Search results test? If not, file one in WEB.

How it works

What PopdockAI does when you ask

You give the test result and Jira project, and your AI assistant gathers the evidence and checks for a duplicate. Nothing is written until you confirm.

01

Ask

You give the test result and the Jira project.

Your AI tool

02

Gather

It confirms the run failed and collects the first failing step and console errors.

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

03

Check

It looks for an open bug on the same test and stops if one exists.

ghost-inspector-get-test-result-comment
jira-get-issue

04

Confirm

You approve, then it creates the bug once and links it both ways.

Your AI tool

What PopdockAI provides

The tools behind the answer

Ready made tools for Jira and one secure connection to your AI tool. No code, no exports.

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.
get-data

jira-get-issue

Returns Jira issues with their project, issue type, status, assignee, reporter, dates and estimates. Filter by project, status, assignee or date range to pull a backlog, a sprint or one person's open work.
run-action

jira-add-issue

Creates a new issue in a Jira project. Takes the project, issue type, summary and description, with optional assignee, priority and due date.
run-action

jira-add-issue-comment

Adds a comment to a Jira issue, which is the usual way to record why something was reprioritised, reassigned or closed.
get-data

jira-get-issue-watcher

Returns the users watching Jira issues, with the issue and project they are watching, so you can see who is following a piece of work.
run-action

jira-add-issue-remote-link

Links a Jira issue to a page or record in another system, with a title and a URL. Issue linking must be enabled in Jira.
run-action

ghost-inspector-add-test-result-comment

Adds a comment to a Ghost Inspector test result, which is how a failed run gets a record of why it failed and what was done about it.
get-data

jira-get-issue-type

Returns the issue types available in each Jira project, such as Task, Bug, Story and Epic. Use it to pick a valid issue type before creating an issue.
Read only.Nothing in Jira 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

One well evidenced bug per failure

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