/
/
Copy a Ghost Inspector test to staging without touching the original
For QA engineers who want an existing test retargeted at another URL or browser, safely, by asking their AI assistant.
On this page
Connector
Connect Ghost Inspector, pick your AI tool and paste the prompt.
The problem
Retargeting a test risks breaking the original
Pointing a Ghost Inspector test at staging or another browser means duplicating it, finding the copy, renaming it and editing its settings. Pick the wrong source or edit the original and the production test quietly breaks.
Without PopdockAI
- Duplicate the test in Ghost Inspector
- Find the copy among similar names
- Rename it and edit its URL and browser
- Edit the original by mistake
With PopdockAI
- Exactly one source test must match and the new name must be free
- Every setting that will change is shown first
- It duplicates once and edits only the copy after you confirm
- The copy is read back, and the original is untouched
The prompt
Use this prompt
Copy it into any AI tool connected to PopdockAI. Swap the values in braces for your own.
**Objective:** Make a copy of the Ghost Inspector test named `{test-name}`, name the copy `{new-name}`, and point it at `{new-start-url}` and browser `{new-browser}` where those were given.
**Step 1: Identify the source test**
Call `ghost-inspector-get-test` with `name.contains` set to `{test-name}`. If more than one matches, list the matches with their suite, browser and start url and stop; copying the wrong test leaves clutter someone has to clean up. Keep the `id`, `start-url`, `browser`, `region` and `suite-name`.
**Step 2: Check the new name is free**
Call `ghost-inspector-get-test` with `name.contains` set to `{new-name}`. If a test by that name already exists, report it and stop; the user either meant to update that one or needs a different name.
**Step 3: Confirm the plan**
Show the user: the source test and its suite, the name the copy will take, and each setting that will change, old value to new value. Say plainly that the copy lands in the same suite as the original and will run on that suite's schedule. Ask for confirmation, and do not continue without an explicit yes.
**Step 4: Duplicate**
Call `ghost-inspector-duplicate-test` with `test-id` from step 1. Call it exactly once. Keep the `id` it returns, that is the new test. If it does not return an id, report the failure and stop; do not call it again, since a retry risks leaving two copies behind.
**Step 5: Retarget the copy**
Call `ghost-inspector-update-test` with `test-id` set to the NEW id from step 4, never the source id, and set `name` to `{new-name}` plus `start-url` and `browser` only where those parameters were supplied. Call it exactly once.
**Step 6: Verify and report**
Call `ghost-inspector-get-test` with `id` set to the new id and confirm the name, start url and browser are what was asked for. Report the new test's id, name, suite and settings, and state that the original is unchanged. Do not run the copy; say that a first run can be done with the rerun prompt once the user is ready.
**Rules and guidelines:**
* Only `ghost-inspector-duplicate-test` and `ghost-inspector-update-test` may write, once each, after the confirmation in step 3, and `ghost-inspector-update-test` may only ever be given the new test id.
* Do NOT call `ghost-inspector-execute-test`, `ghost-inspector-execute-suite`, `ghost-inspector-execute-on-demand-test`, `ghost-inspector-duplicate-suite`, `ghost-inspector-create-suite` or `ghost-inspector-update-suite`.
* If step 5 fails, say so explicitly and report the new test's id, because the copy exists and still carries the original settings.
**Validation:**
* If `{test-name}` matches nothing, list some test names and stop.
* If `{new-name}` is empty, ask for it and stop rather than leaving a copy called the same as the original.
* If the user declines the confirmation, stop without writing.
Who it's for
One answer, three teams that use it
QA engineers
Point a test at staging in one step
Get a correctly configured copy without touching the production test you rely on.
Copy the Checkout smoke test as Checkout smoke staging pointing at https://staging.fabrikam.com.
Test automation engineers
Run the same test in another browser
Clone a test for Firefox or Safari with only the browser changed.
Clone the Search results test in Ghost Inspector as Search results Safari, using Safari.
Developers
Test your feature environment
Make a copy pointed at your preview URL and know the original stays as it was.
Duplicate the Signup flow test as Signup flow preview with start URL https://preview.northwindtraders.com.
How it works
What PopdockAI does when you ask
You name the source test, the new name and any new URL or browser, and your AI assistant shows every change first. The copy is not run.
01
Ask
You name the source test, the new name and any new start URL or browser.
02
Check
It confirms one source test matches and the new name is free.
03
Confirm
You see every setting that will change and say yes.
04
Create
It duplicates once, edits only the copy and reads it back.
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-test
ghost-inspector-duplicate-test
ghost-inspector-update-test
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
A retargeted copy, with the original unchanged
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)
