# Preview and runtime validation

> Validate the rendered artifact, network dependencies, authorization behavior, and the exact version selected for publication.

[Canonical page](https://rogueon.ai/docs/preview-and-testing)

## Understand the test surface

The embedded preview renders the generated page in an iframe. Desktop and mobile controls resize that surface while preserving its state; they do not emulate an operating system, browser engine, network connection, or fresh user session. Reproduce critical flows in a separate tab and on the target browser or device.

Identify the preview URL and version before recording a failure. For frontend diagnosis, open browser DevTools on the generated page: inspect console errors and the failed network request, including status, response, and origin. Redact authorization headers, cookies, tokens, and personal payloads before sharing evidence.

## Validation matrix

| Layer | Checks |
| --- | --- |
| Rendering | No unhandled errors; assets load; empty, loading, and error states appear when expected. |
| Interaction | Keyboard, focus, input validation, repeated submission, and navigation preserve the contract. |
| Persistence | Data survives reload and appears in another client when it must be shared. |
| Authorization | User A cannot read or change B's private records; anonymous access follows the rules. |
| Services | Responses come from the intended service; failures and limits do not become fabricated success. |
| Publication | The public address serves the approved version and its main flow remains functional. |

## Capture a reproducible failure

**Runtime defect report**

```text
Version / URL: [tested artifact]
Environment: [browser, viewport, signed-in or anonymous]
Preconditions: [synthetic records and initial state]
Steps: [smallest sequence]
Expected: [contract]
Actual: [visible result]
Evidence: [redacted console message or request status]
Regression checks: [behaviors that must remain unchanged]
Fix the cause and report which checks were actually executed.
```

## Verify the release candidate

Retest the defect against the revised artifact and run the surrounding regression checks. A static render does not validate database permissions or a payment workflow. Use test accounts and provider test environments where available; distinguish simulated behavior from completed external actions.

After publication, repeat the critical path at the public address. Source changes, deployed files, and runtime configuration can diverge; validate the destination rather than inferring it from the build result.

- [Diagnose preview failures](https://rogueon.ai/docs/troubleshooting#preview)

## Related guides

- [Build lifecycle and revisions](https://rogueon.ai/docs/build-and-refine)
- [Authentication, data, and permissions](https://rogueon.ai/docs/data-and-permissions)
- [Publication and version selection](https://rogueon.ai/docs/publishing)

