Skip to main content

Overview

Frontend QA opens a deployed pull request preview in a real browser, restores or creates a test-user session, and exercises the UI behavior changed by that pull request. Each run can produce scoped findings, screenshots, and a browser recording.
Frontend QA is available for selected GitHub customers. You need CodeAnt administrator access. If Settings → Code Review → QA Agent is not visible, contact support@codeant.ai.

Prerequisites

Before configuring a repository, confirm that:
  • The GitHub repository is connected to CodeAnt AI.
  • Pull requests receive a successful GitHub deployment_status event from the preview provider.
  • The event identifies an open pull request commit and includes an environment_url or target_url, or GitHub exposes the URL through the deployment or commit status APIs.
  • The preview is publicly reachable over HTTPS from CodeAnt AI.
  • You have a dedicated, least-privilege test account with non-production data.
  • The test account can access the workspace and features being changed, and the preview contains the data needed to exercise them. A successful login alone does not establish these prerequisites.
  • You know whether the application stores authentication in cookies, localStorage, IndexedDB, or a combination of these.
Do not use a production administrator account. Browser recordings and screenshots can contain data visible to the configured test user.

Configure a repository

Open the CodeAnt AI dashboard, select your organization, and go to Settings → Code Review → QA Agent.

1. Select the repository

Choose the repository that owns the frontend preview. Settings are repository-scoped; configuring one repository does not automatically configure another.

2. Configure the preview

Select Dynamic (CI / Vercel) when every pull request gets a different preview hostname. This is the current settings-page label; the option supports Amplify, Netlify, and other CI preview providers in addition to Vercel.In Trusted preview host, enter an app-specific hostname pattern—not a regular expression and not a full URL.A hostname without * trusts that exact hostname and its subdomains. For example, example-app-id.amplifyapp.com also accepts pr-42.example-app-id.amplifyapp.com.The pattern must follow these rules:
  • Hostname only—do not include https://, a port, path, query string, or fragment.
  • * can appear inside a hostname label, but ** is not supported.
  • The final two labels cannot contain *; patterns such as *.amplifyapp.com are intentionally rejected because they are not app-specific.

3. Set the deployment environment

In GitHub deployment environment, enter the environment name reported by the successful GitHub deployment event. Common values are Preview, Staging, and Production. Use the exact value shown in GitHub. A run starts only when:
  • the QA Agent is enabled;
  • the deployment state is success;
  • the deployment environment matches this setting;
  • the commit belongs to an open pull request; and
  • the resolved URL matches the trusted preview host.

If deployment_status is not being sent

First, check whether the preview provider creates GitHub deployments for the pull request head SHA:
The second response must contain a status whose state is success, whose environment exactly matches GitHub deployment environment, and whose environment_url or target_url is the ready preview URL. If deployment happens in GitHub Actions, add an environment and URL to the existing deployment job, for example in .github/workflows/deploy-preview.yml. GitHub then creates the deployment and its status automatically:
.github/workflows/deploy-preview.yml
If the provider deploys outside GitHub Actions and does not publish a deployment status, add this step to a workflow after the preview is ready. Replace the dummy URL with the URL returned by your deployment step: Job fragment: merge into your existing job.
.github/workflows/deploy-preview.yml
GitHub requires Deployments: write for the workflow that creates the status. The installed CodeAnt GitHub App must have at least Deployments: read and be subscribed to deployment_status. If GitHub shows the successful deployment status but CodeAnt does not start a run, contact support@codeant.ai with the repository, pull request, deployment environment, and GitHub delivery ID. See GitHub’s deployment REST API and deployment status API for the underlying event model.

4. Choose an authentication mode

Use Saved session for SSO, MFA, OAuth, or any login that a person should complete once and CodeAnt should replay later.
  1. In Authentication source URL, enter the stable login page for the application being tested, for example https://app.example.com/login.
  2. Click Connect browser session.
  3. Click Open secure browser and complete every login step in the isolated browser.
  4. Confirm that the application shows a signed-in state.
  5. Click I’m logged in — save session.
The secure browser expires after 15 minutes. CodeAnt encrypts the captured cookies and site storage. Saved sessions are not automatically renewed by QA runs; reconnect the secure browser and save a fresh session when authentication expires.
The authentication source is your application—not the CodeAnt dashboard. Do not enter https://app.codeant.ai. CodeAnt dashboard cookies cannot authenticate a separate customer preview.
For dynamic previews, CodeAnt can copy source-origin localStorage and IndexedDB data to a validated preview origin. Cookies are never rewritten; a cookie is retained only when its domain is already valid for the preview hostname.
Pull-request code runs on the preview origin and can read any bearer token or reusable credential copied into that origin’s localStorage or IndexedDB. Origin filtering does not protect those values from same-origin JavaScript. Use a disposable, least-privilege QA account with non-production data, rotate it regularly, and prefer programmatic login or short-lived preview-scoped credentials when testing untrusted pull requests.
For example, cookies captured on app.example.com cannot authenticate pr-42.app-id.amplifyapp.com. For a cookie-only application on unrelated domains, use a same-origin programmatic login, a customer-owned preview domain with compatible cookie scope, or configure the identity provider to support the preview callback.

5. Add runtime variables

QA runtime variables are optional encrypted KEY=value entries. Use one entry per line:
Variable names must start with a letter or underscore and contain only letters, numbers, and underscores. Reference a value as ${NAME} in programmatic login JSON. Runtime variables can also be used in supported preview templates. These values belong to the QA worker. They do not add or change environment variables in the deployed preview. When a stored badge is shown, leaving this field blank preserves the existing encrypted values; enter the complete replacement set when rotating them.

6. Add navigation guidance

Use Navigation guidance when the relevant feature is inside a workspace or is difficult to reach through the visible navigation. In Workspace entry paths, enter the paths the agent may open on the preview, one per line. Replace these examples with paths that exist in your application:
Paths must start with a single /. Do not include a hostname, query parameters, whitespace, backslashes, or credentials. You can provide up to 10 paths, each at most 500 characters. CodeAnt attaches each path to the resolved preview origin: /workspaces/qa becomes https://pr-42.example.com/workspaces/qa when that is the PR’s preview host. In Navigation instructions, describe how to reach the feature, for example: Select the QA workspace, then open Analytics from its menu. This field accepts up to 4,000 characters and must not contain secrets. Guidance helps the agent navigate; it does not grant permissions, create test data, or expand the check beyond the PR’s changes. The agent must still verify the account’s access and the required prerequisites. To remove guidance, clear the fields and click Save.

7. Enable and save

Turn on Enable QA agent, then click Save. Saving validates the settings; a QA run is still needed to verify preview availability, authentication, and access to the changed feature.

Complete AWS Amplify example

The following example configures dynamic previews such as https://pr-42.example-app-id.amplifyapp.com. All domains and repository names below are dummy values: After saving, connect the secure browser and sign in at https://app.acme.example/login. If the application stores its session only in cookies scoped to acme.example, those cookies cannot be copied to amplifyapp.com; use programmatic login or a compatible custom preview domain instead.

Validate the setup

Use Run now before relying on automatic triggers:
  1. Enter an open pull request number that has a deployed preview.
  2. Click Run QA now.
  3. Confirm that the result shows the expected preview URL, then read the verification outcome and the passed, failed, and blocked check counts.
  4. Review each check’s explanation, screenshots, and browser recording. For blocked checks in the PR comment, use View check evidence to open that check in the dashboard.
Dynamic preview runs require a PR number so CodeAnt can resolve its current deployment. A static-preview run can omit the PR number to check authentication only; Login successful does not mean any changed UI behavior was verified. For the best validation, use a pull request with one small, observable UI change and describe the expected behavior in the PR description. Frontend QA reports only failures related to the pull request description and changed code; unrelated or pre-existing issues are discarded.

Understand the result

Older runs without verification details show Verification unavailable. Neither a completed execution nor zero findings proves that the UI checks passed.

Settings reference

Authentication-source and preview-host rules

The two settings serve different purposes:
  • Authentication source URL is the stable page where a person signs in once.
  • Trusted preview host constrains which deployment URLs CodeAnt may test.
They do not need to be the same hostname, but the captured authentication data must be reusable on the preview:

Troubleshooting

Confirm that you are using GitHub, have CodeAnt administrator access, and that Frontend QA is enabled for your organization. Contact support@codeant.ai if the page is still unavailable.
Confirm that the QA Agent is enabled, the GitHub deployment status is success, the environment matches GitHub deployment environment, and the deployed commit belongs to an open pull request. The GitHub event must reach CodeAnt AI before the run can be queued.
Verify that the deployment publishes an environment_url or target_url and that its hostname matches Trusted preview host. Enter a hostname pattern only, without a path or regular expression. For a dynamic manual run, provide the PR number.
Confirm that the preview deployment has finished and that the login page opens. CodeAnt makes up to three navigation attempts within a 60-second readiness budget for transient HTTP or connection failures. HTTP 404 and 410 stop this recovery immediately.If login fails after the browser observes a transient HTTP error from the preview origin, CodeAnt can retry login once while its retry window remains open. Rejected credentials or permission responses are not retried.If the preview expired or was destroyed, redeploy it, wait for the ready deployment, and click Run QA now with the PR number. A new run resolves the PR’s current preview. Retrying cannot restore a destroyed environment.
Make sure Authentication source URL points to the customer application and that you completed login before saving. Dynamic previews require source-origin web storage or cookies already valid for the trusted preview host. A cookie scoped only to an unrelated production domain cannot be copied to an Amplify, Vercel, or Netlify domain.
Reconnect the saved session if it expired. For cross-domain cookie authentication, use programmatic login, a compatible custom preview domain, or an identity-provider callback that supports the preview URL. CodeAnt never rewrites cookie domains.
Use a relative or same-origin endpoint, valid JSON objects for headers and request data, and a POST or PUT method. Confirm that the endpoint returns a successful response and directly creates a browser session without relying on a redirect.
Open View check evidence from the PR comment and read what the agent could not verify. Sign in to a fresh preview with the same test account, then confirm that you can reach the named workspace, feature, and test data.If access is missing, configure the required test-account permissions, workspace membership, or feature availability in your application. If the feature is available but hard to find, add its path and navigation instructions under Navigation guidance, save, and start a new run. Guidance does not replace missing permissions or data.
Check the verification outcome and check counts. Login successful, No applicable checks, and Blocked can all have zero findings without verifying the changed behavior. Use a PR with a small, observable UI change, describe the expected behavior, and ensure the required test data is present.
If the reason remains unclear, contact support@codeant.ai with the repository, PR URL, QA run link, and the reported error or blocked reason.

Security notes

  • Credentials, saved browser state, programmatic login recipes, and runtime variables are encrypted at rest.
  • Stored secret values are not returned to the settings page; a stored badge indicates that encrypted data exists.
  • Saved browser state is filtered to approved origins before use.
  • Dynamic preview URLs must match the configured app-specific hostname pattern.
  • Cloned repository context is limited to changed frontend files, and QA findings are kept only when they are grounded in the pull request description and code changes.