ScreenshotNeo

BlogHow-to

How to Test QA Issues Faster with Deploy Previews

Use deploy previews to reproduce QA issues against a real proposed change, then automate focused browser checks before production.

By the ScreenshotNeo team4 October 20269 min read

A deploy preview is a deployed version of a proposed change that QA and reviewers can open before it reaches production. To test a QA issue faster, link the issue to a focused pull request, let your hosting platform deploy that change to a preview URL, share the exact URL and commit with QA, then reproduce the issue and run a targeted browser test against that deployment.

This makes the proposed change available to test without requiring every reviewer to run the project locally. It does not guarantee an immediate preview or a specific time saving: deployment completion, access settings, and the services the issue depends on all matter.

1. Connect the QA issue to a focused change

  1. Create a branch for the fix or proposed change. Keep it narrow enough that the preview tests the behavior described in the issue.
  2. Link the issue in the pull request. Include the observed behavior, expected behavior, and steps to reproduce.
  3. Note any prerequisites: a test account, seed data, feature flag, or route that QA must use. Never put credentials or secrets in a public issue or pull request.

A frontend-only preview may not reproduce an issue that depends on backend code, production data, secrets, or an external service. Identify those dependencies before asking QA to verify the fix.

2. Let CI deploy a preview

Connect the repository to a hosting platform and enable the relevant pull-request or branch deployment workflow. The platform builds and deploys the proposed change, then exposes a URL for review.

  • Netlify: Connected pull or merge requests can create Deploy Previews automatically. The first preview URL may return Not Found while the initial deploy is pending. Later successful pushes update the preview content. A deploy permalink identifies a deployment whose contents do not change after a later redeployment; the preview URL follows successful updates to the branch. Previews can remain available until deleted. Netlify Deploy Previews documentation
  • Vercel: Preview is a deployment environment alongside Local and Production. Preview deployments can be created for non-production branch pushes and supported pull requests. A branch-specific URL follows the latest changes for that branch, while a commit-specific URL identifies one deployment. Vercel environments documentation

Do not share a link as ready until the deployment has completed successfully. The precise triggers and URL behavior depend on repository integration and project settings.

3. Share the right preview URL with QA

Put the preview link in the issue or pull-request discussion where the reproduction steps live. Include the route, the commit under review, and safe setup instructions. If someone needs to review an immutable build, use a commit-specific URL or deploy permalink when your platform provides one. If they need the latest branch build, use the branch preview URL and state that it can change after another push.

Check the preview’s access policy before sharing. Netlify documents that preview URLs may be accessible to anyone who has the link unless they are protected, and supports password protection. Vercel deployments may also have Deployment Protection enabled. Use the access controls appropriate for the code and data, and give reviewers a supported way to access a protected preview. Netlify preview options

4. Reproduce the issue, then run focused browser checks

  1. Open the exact route from the issue on the preview deployment.
  2. Follow the reproduction steps with the stated browser, device, account state, and test data.
  3. Check the expected behavior and any nearby behavior that the change could affect.
  4. Run a small automated end-to-end test for the affected flow. Keep the test pointed at the deployed preview rather than relying on a developer’s local build.
  5. Report the preview URL or commit, steps run, browser/device, and whether the issue is fixed or still reproducible.

For example, a Playwright test can take its base URL from an environment variable so CI can target the deployment. Save the following as tests/qa-issue.spec.js in a project that has Playwright installed:

import { test, expect } from '@playwright/test';

test('the issue reproduction now shows the expected result', async ({ page }) => {
  const baseURL = process.env.PREVIEW_URL;
  if (!baseURL) throw new Error('Set PREVIEW_URL to the deployed preview URL');

  await page.goto(new URL('/affected-route', baseURL).toString());
  await page.getByRole('button', { name: 'Save changes' }).click();
  await expect(page.getByText('Changes saved')).toBeVisible();
});

Replace the route, action, and expected result with the issue’s actual behavior. Run it locally against a preview URL with:

PREVIEW_URL='https://your-preview.example' npx playwright test tests/qa-issue.spec.js

This test assumes the page has a button named “Save changes” and displays “Changes saved” after success. Use stable accessible roles and names where possible; if the application requires authentication, provide a dedicated test account through your CI’s secret store and follow your platform’s access rules.

Run the check after deployment in GitHub Actions

One practical pattern is to start the browser check after the hosting platform has completed its preview deployment, then pass the deployed URL as PREVIEW_URL. Vercel documents a GitHub Actions and Playwright workflow for this purpose. If Deployment Protection is enabled, configure Protection Bypass for Automation so the automated test can reach the deployment. Store any bypass credential as a protected CI secret; do not commit it. See Vercel’s end-to-end testing guide for its platform-specific workflow.

The key pieces in any CI implementation are: wait for deployment readiness, obtain the URL for the deployment associated with this change, set that URL for the browser test, and fail the check if the test fails. Avoid testing a moving branch URL if another deployment can replace it during the run; use the deployment-specific URL when your platform exposes one.

5. Keep preview configuration safe and representative

Previews need enough configuration to exercise the issue, but should not accidentally use production credentials or mutate production data. Use preview-specific environment values and non-production services or data where practical. Netlify supports values for the Deploy Preview context; Vercel documents environment-specific variables. Netlify environment variables · Vercel environment variables

  • Check that the preview has the feature flags and API endpoints needed for the issue.
  • Use test data that can be reset and test credentials with limited scope.
  • Confirm that required backend changes are deployed to a compatible preview environment.
  • Keep preview secrets out of client-side bundles, logs, issues, and screenshots.
  • Make sure automated tests can access the preview without weakening access controls for other users.

6. Choose a useful preview workflow

Compare platforms by the operational details that affect review, rather than assuming one is universally faster:

Question Why it matters
Which branch or pull-request events create a preview? QA needs a deployment for the change being reviewed, and teams need to know which repository events trigger it.
Does the URL follow the branch or identify one deployment? A branch URL is convenient for ongoing review; an immutable deployment URL helps tie results to an exact commit.
How can reviewers access the preview? Public links, passwords, or team-level protection have different sharing and automation implications.
Can preview configuration differ from production? Separate variables and test services reduce the chance that QA changes production data or uses production-only credentials.
Can CI wait for readiness and run browser tests? Automation must target the deployed build and handle authentication or deployment protection safely.
Where does feedback live? Keeping observations connected to the pull request or issue makes it easier to identify which change and build they refer to. Netlify describes feedback workflows connected to tools including GitHub, GitLab, and Jira; verify the integration and plan details that apply to your setup.

7. Troubleshoot common preview QA failures

Symptom Likely cause What to do
The preview URL returns Not Found The first deployment is still pending, or the deployment failed. Check deployment status and build logs; retry the URL after a successful deploy. Netlify notes that an initial PR preview URL may not serve content before its first deploy completes.
QA sees an older version The link points to an earlier deployment, the latest build has not finished, or a branch URL updated after the reviewer opened it. Confirm the commit shown in deployment details, wait for the latest successful deploy, then share the correct branch or deployment-specific URL.
The preview asks for authentication or automation gets a 401/403 Preview protection is enabled and the reviewer or test runner lacks access. Use the platform’s supported reviewer access or automation bypass configuration. Do not disable protection broadly just to make a test pass.
The page loads but the bug cannot be reproduced Preview environment variables, feature flags, backend deployment, data, account state, or external services differ from the conditions that triggered the issue. Compare the reproduction prerequisites and preview configuration. Reproduce with safe test data and the compatible backend/service versions.
The browser test times out waiting for an element The app is still loading, the selector is unstable, or the expected state never occurs. Inspect the page and browser logs, assert on a user-visible state, use stable role/name locators, and verify the action succeeded before increasing timeouts.
CI tests the wrong deployment The workflow uses a stale URL or a branch alias that changed during the run. Associate the URL with the current pull request deployment and commit; use an immutable deployment URL where available.
Preview works locally but not for QA Local environment values, cookies, network access, or test data differ from the hosted preview. Document the needed setup and validate from a clean browser session using the shared preview URL.

8. Performance, reliability, and cost considerations

A preview adds a deployment step and browser checks to the route from a change to QA. Keep the feedback loop practical by running the smallest relevant test first, then broader suites when the change warrants them. The cited platform documentation describes preview and test workflows but does not quantify time saved or compare deployment speed, so treat actual turnaround as something to observe in your own CI.

Preview reliability depends on successful builds, available test services, correct configuration, and a URL that points to the intended deployment. Record the commit with test results, retry only transient deployment or service failures, and distinguish a failed test from a preview that never became ready.

Cost depends on your hosting, CI, and test-runner arrangements and their current plan terms. Review those terms directly; the sources cited here do not establish a universal cost or price comparison. Remove previews when they are no longer needed if your workflow or platform does not clean them up automatically.

Or skip the browser setup

If you need a screenshot of the deployed preview for an issue or review, ScreenshotNeo takes one GET request with the page URL and returns a PNG, JPEG, WebP, or PDF. See the ScreenshotNeo API documentation for the request options.

curl -G "https://api.screenshotneo.com/v1/shot" \
  -d access_key=YOUR_API_KEY \
  --data-urlencode url=https://your-preview.example/affected-route \
  -o preview.webp
import requests

r = requests.get(
    "https://api.screenshotneo.com/v1/shot",
    params={
        "access_key": "YOUR_API_KEY",
        "url": "https://your-preview.example/affected-route",
    },
    timeout=90,
)
r.raise_for_status()
with open("preview.webp", "wb") as f:
    f.write(r.content)
const q = new URLSearchParams({
  access_key: 'YOUR_API_KEY',
  url: 'https://your-preview.example/affected-route',
});
const res = await fetch(`https://api.screenshotneo.com/v1/shot?${q}`);
if (!res.ok) throw new Error(`Screenshot request failed: ${res.status}`);
const fs = await import('node:fs/promises');
await fs.writeFile('preview.webp', Buffer.from(await res.arrayBuffer()));

ScreenshotNeo removes cookie banners, newsletter popups, and chat widgets before capture; bot checks, blank pages, and failed loads are never billed; an MCP server lets AI agents take screenshots; and 1,000 screenshots a month are free with no card, with paid plans starting at $5 for 3,000. Sign up for 1,000 free screenshots a month, with no card required.

FAQ

Can QA test a pull request without running the app locally?

Yes, when the repository is connected to a preview deployment workflow and the reviewer can access the resulting URL. The preview must include the configuration and dependencies needed to reproduce the issue.

Should I share a branch URL or a deployment URL?

Use a branch URL when reviewers should see the latest successful changes. Use a commit-specific URL or deploy permalink when the review record must point to one fixed build.

Does a screenshot prove that a bug is fixed?

No. A screenshot records a rendered state at a moment in time. Verify interactions and state changes with manual steps or browser automation as well.

Can previews safely use production data?

That depends on the data and access controls. Prefer isolated test data and preview-specific configuration, and follow your organization’s rules for sensitive information.