# Get a session
Source: https://docs.getdecipher.com/api-reference/endpoint/get-session
GET /api/v1/sessions/{sessionId}
Retrieve detailed information about a specific session replay, including user info, pages visited, AI-generated tags, and a timeline overview.
# Get session clicks
Source: https://docs.getdecipher.com/api-reference/endpoint/get-session-clicks
GET /api/v1/sessions/{sessionId}/clicks
Retrieve all click interactions from a session with before/after screenshot URLs. Includes click metadata (text, tag, CSS class) and navigation information. Screenshot URLs are time-limited (~3 hours).
# Get session timeline
Source: https://docs.getdecipher.com/api-reference/endpoint/get-session-timeline
GET /api/v1/sessions/{sessionId}/timeline
Retrieve the full AI-generated timeline of what happened in a session, broken down by page with detailed activity summaries, behavior tags, and loading issue analysis.
# Get step screenshots
Source: https://docs.getdecipher.com/api-reference/endpoint/get-step-screenshots
GET /api/v1/test-runs/{runId}/screenshots/{stepNumber}
Retrieve before and after screenshots for a specific step in a test run. Returns time-limited signed URLs (valid for ~3 hours).
You can also get all screenshots at once by passing `?include=screenshots` on the [Get a test run](/api-reference/endpoint/get-test-run) endpoint. This endpoint is useful when you only need screenshots for specific steps or need a fresh TTL on the signed URLs.
# Get a test
Source: https://docs.getdecipher.com/api-reference/endpoint/get-test
GET /api/v1/tests/{testId}
Retrieve information about a specific test, including owners and who recorded the source session.
# Get a test run
Source: https://docs.getdecipher.com/api-reference/endpoint/get-test-run
GET /api/v1/test-runs/{runId}
Retrieve detailed information about a specific test run, including step-by-step execution results, failure analysis, and AI-generated fix suggestions.
# List collection sessions
Source: https://docs.getdecipher.com/api-reference/endpoint/list-collection-sessions
GET /api/v1/monitoring/issue-collections/{collectionId}/sessions
Retrieve a paginated list of sessions associated with an issue collection. Returns lightweight session summaries by default, with optional includes for timeline, clicks, and screenshots.
# List issue collections
Source: https://docs.getdecipher.com/api-reference/endpoint/list-issue-collections
GET /api/v1/monitoring/issue-collections
Retrieve a paginated list of recent monitoring issue collections. Supports filtering by resolved status and URL regex against collection shortened paths. Results are ordered by most recent occurrence within the time window.
# List sessions
Source: https://docs.getdecipher.com/api-reference/endpoint/list-sessions
GET /api/v1/sessions
Retrieve a paginated list of session replays for the organization. Supports filtering by user email, user ID, URL visited, and time range, with cursor-based pagination.
# List runs for a test
Source: https://docs.getdecipher.com/api-reference/endpoint/list-test-runs
GET /api/v1/tests/{testId}/runs
Retrieve a paginated list of test runs for a specific test. Supports filtering by status and time range, with cursor-based pagination.
# Start a test run
Source: https://docs.getdecipher.com/api-reference/endpoint/start-test-run
POST /api/v1/tests/{testId}/runs
Trigger a new run for a specific test. Returns immediately with a queued run object. Poll `GET /test-runs/{runId}` until the status becomes `passed` or `failed`.
The test must have completed validation to be executed.
# API Reference
Source: https://docs.getdecipher.com/api-reference/introduction
Programmatic access to your Decipher data
The Decipher API lets you retrieve test results, session replays, AI-generated timelines, screenshots, and monitoring issue data programmatically. Use it to integrate Decipher into your CI/CD pipelines, build custom dashboards, analyze user behavior, monitor production issues, or trigger alerts in external systems.
**Base API URL:** `https://api.getdecipher.com`
## Authentication
All API requests require an API key. You can create and manage API keys from [Settings > API Keys](https://app.getdecipher.com/settings?section=api-keys) in the Decipher dashboard.
Include your key in the `Authorization` header:
```bash theme={null}
curl https://api.getdecipher.com/api/v1/tests/456 \
-H "Authorization: Bearer dcp_live_your_api_key_here"
```
Alternatively, you can use the `X-API-Key` header:
```bash theme={null}
curl https://api.getdecipher.com/api/v1/tests/456 \
-H "X-API-Key: dcp_live_your_api_key_here"
```
API keys are scoped to your organization. Any test or run belonging to your organization is accessible with your key.
## Errors
The API uses standard HTTP status codes and returns a consistent error object:
```json theme={null}
{
"error": {
"type": "not_found_error",
"code": "not_found",
"message": "The requested test was not found."
}
}
```
| Status | Type | Meaning |
| ------ | ---------------------- | ------------------------------------------ |
| 401 | `authentication_error` | Missing or invalid API key |
| 403 | `authorization_error` | Key doesn't have access to this resource |
| 404 | `not_found_error` | Resource doesn't exist or isn't accessible |
| 422 | `validation_error` | Invalid request parameters |
| 429 | `rate_limit_error` | Too many requests |
| 500 | `api_error` | Internal server error |
## Pagination
List endpoints use cursor-based pagination. The response includes:
* `hasMore` — whether more results exist
* `nextCursor` — pass this as the `cursor` query parameter to fetch the next page
```bash theme={null}
# First page
curl "https://api.getdecipher.com/api/v1/tests/456/runs?limit=10" \
-H "Authorization: Bearer dcp_live_..."
# Next page
curl "https://api.getdecipher.com/api/v1/tests/456/runs?limit=10&cursor=eyJpZCI6..." \
-H "Authorization: Bearer dcp_live_..."
```
# Advanced Setup
Source: https://docs.getdecipher.com/pages/advanced/advanced
The Decipher AI setup process allows for some additional customizability beyond the defaults.
**⏱ Estimated Time To Completion: 10 minutes**
## Understand the basics
Before diving into advanced configurations, ensure you have completed the basic setup as outlined in the [Quickstart guide](./quickstart). The advanced configurations build upon the initial setup.
Custom configuration is achieved by adjusting the Sentry `init` call in your project; options vary by language/framework.
For a full list of options and more information, refer to the [official Sentry documentation](https://docs.sentry.io/).
Below we provide some common examples and recommended configuration options.
## Example: Customizing Sentry Initialization for NextJS
```typescript sentry.client.config.ts theme={null}
import * as Sentry from "@sentry/nextjs";
Sentry.init({
dsn: process.env.DECIPHER_DSN, // Replace with your Decipher DSN.
integrations: [
// Capture session replay data.
Sentry.replayIntegration({
maskAllText: false,
maskAllInputs: false,
blockAllMedia: false,
networkDetailAllowUrls: [/^.*$/],
}),
// Capture request bodies for failed HTTP requests.
Sentry.httpClientIntegration()
],
tracesSampleRate: 1.0, // Adjust based on your needs.
replaysSessionSampleRate: 0.5, // Adjust session replay sample rate.
replaysOnErrorSampleRate: 1.0, // Ensure all error sessions are captured.
beforeSend(event) {
// Modify or drop events before sending them to Decipher
if (event.exception) {
// For example, filter out non-production errors.
// (You can also do this via the `enabled` param.)
if (process.env.NODE_ENV !== 'production') {
return null;
}
}
return event;
},
});
```
# Logs
Source: https://docs.getdecipher.com/pages/advanced/logs
Learn how to set up capture for console/application logs.
**⏱ Estimated Time To Completion: 2 minutes**
## Add `captureConsoleIntegration` to your initialization
To automatically begin capturing console API calls, simply add `Sentry.captureConsoleIntegration` to your
existing `Sentry.init` call.
```typescript sentry.client.config.ts theme={null}
Sentry.init({
// ... (existing setup)
Sentry.captureConsoleIntegration(), // Add this to capture logs
});
```
You may pass a `levels` arg to `captureConsoleIntegration` in order to customize log levels that are captured.
```typescript sentry.client.config.ts theme={null}
Sentry.init({
// ... (existing setup)
// Only capture warning and error-level logs.
Sentry.captureConsoleIntegration({ levels: ['warn', 'error'] }),
});
```
That's it! Decipher will automatically capture the configured logs and include them in session replays.
# Customize Privacy
Source: https://docs.getdecipher.com/pages/advanced/privacy
You can easily customize what data is masked in the session replays
**⏱ Estimated Time To Completion: 2 minutes**
## Options
To mask specific fields, use the `mask` option, which lets you mask sensitive fields based on CSS selectors. For example, to mask credit card fields:
```typescript theme={null}
Sentry.init({
...
integrations: [
new Sentry.replayIntegration({
maskAllText: false,
maskAllInputs: false,
mask: 'input[type="creditcard"], .credit-card', // Mask specific fields
}),
],
...
});
```
You can also directly use sentry-mask to mask fields or elements in your code. This provides a simple way to manage privacy without altering your JavaScript configuration.
``
For more details head to [https://docs.sentry.io/platforms/javascript/session-replay/privacy/](https://docs.sentry.io/platforms/javascript/session-replay/privacy/).
# SSO via SAML
Source: https://docs.getdecipher.com/pages/advanced/saml
Enterprise users can enable SAML authentication to access their account.
Decipher supports SSO integrations for **Microsoft Entra ID (formerly Azure Active Directory)**, **Google Workspace**, and **Okta Workforce** as IdPs. However, you can also integrate with any other IdP that supports the SAML protocol.
In order to enable SAML, you must:
1. Reach out to your Decipher point-of-contact and request a SAML integration.
2. From there, we'll request configuration related to your SAML provider. This differs depending on your provider, and may include:
* A metadata URL
* An SSO URL
* An IdP entity ID
* An IdP x.509 certificate, and so on.
3. Your Decipher point-of-contact will then send you the ACS and Metadata URL used to configure your account.
4. Your Decipher point-of-contact will work with you to correctly map attributes to ensure fully functioning sign in.
5. It's important to note that once SAML is enabled, users must sign in via SAML. If you're not on an enterprise plan, contact us [here](mailto:team@getdecipher.com), and we'll get you set up.
Contact us [here](mailto:team@getdecipher.com) for questions.
# Tags (with Sentry)
Source: https://docs.getdecipher.com/pages/advanced/tags
Add custom tags to your sessions for better filtering and organization. Tags can also be used to track events from other platforms like Segment.
**⏱ Estimated Time To Completion: 2 minutes**
## Overview of Tags
Tags in Decipher allow you to add custom metadata to your sessions, making it easier to filter, search, and organize session replays. By using the `setExtras` method from the Sentry SDK, you can attach key-value pairs to your sessions that will be available for filtering within Decipher.
These key-values can be arbitrary and you will be able to filter replays by these tags in Decipher.
## Why Tags?
* **Targeted Analysis**: Focus on specific user segments or feature implementations
* **Issue Prioritization**: Quickly identify which segments are most affected by issues
* **Customer Support**: Filter sessions by company to assist specific customers
* **Feature Adoption**: Track which segments are using new features
## Adding Tags to Your Sessions
To add custom tags to your sessions, use the `setExtras` method from the Sentry SDK. This method accepts an object containing key-value pairs that will be attached to the current session.
```javascript theme={null}
import * as Sentry from "@sentry/browser";
// Add custom tags to this session (example tags)
Sentry.setExtras({
feature_enabled: true,
customer_tier: "premium",
experiment_group: "A",
});
```
## Integrating with Segment
If you're using [Segment](https://segment.com) for analytics, you can easily integrate it with Decipher to enrich your session data:
```javascript theme={null}
import * as Sentry from "@sentry/browser";
import { analytics } from "@segment/analytics-next";
// Initialize Segment
analytics.load("YOUR_SEGMENT_WRITE_KEY");
// Track an event with Segment and add the same properties to Sentry
function trackWithSegmentAndSentry(eventName, properties) {
// Track with Segment
analytics.track(eventName, properties);
// Add the same properties as tags in Sentry
// Include the event name as `segment_event_name`
// to ensure it's available in Decipher
Sentry.setExtras({
segment_event_name: eventName,
...properties,
});
}
// Example usage
trackWithSegmentAndSentry("Feature Used", {
featureName: "dashboard",
userType: "admin",
companySize: "enterprise",
});
```
## Best Practices
* **Avoid sensitive data**: Don't include PII or sensitive information in tags
* **Combine with user identification**: Use tags alongside `setUser` for the most comprehensive session data
That's it! With just a few lines of code, you can add powerful filtering capabilities to your use of Decipher.
# Users
Source: https://docs.getdecipher.com/pages/advanced/users
Easily tag and identify users with errors, session replays, and traces.
**⏱ Estimated Time To Completion: 2 minutes**
## Overview of User Fields
Users in Decipher are identified by calling `Sentry.setUser` and passing **at least one** of the following fields:
* **email**: The user's email address. This is the **strongly recommended** identifier if available.
* **id**: Your internal identifier for the user.
* **username**: The username, typically used as a more readable label than the internal id.
Below is the full list of natively supported fields in Decipher, but you can add any arbitrary key/values in the `setUser` call as well.
| Field in `setUser` | Meaning |
| ------------------ | ----------------------------------------------------------------- |
| `email` | Recommended identifier to set |
| `id` | Optional: use if email not available |
| `username` | Optional: use if email not available |
| `account` | Recommended: Which account/organization is this user a member of? |
| `created_at` | Recommended: date this user signed up |
| `role` | Optional: what is this user's role/type? |
We strongly recommend providing the `created_at` field to tell Decipher when the user originally signed up.
You can also provide arbitrary **additional key/value pairs** beyond these reserved names, and Decipher will store them with the user information. For example,
you can set a key like **"paymentTier"** to values like `"free"` or `"paid"` to represent your user's payment plan, and any other field specific to your application or users
Anywhere in your application where you have user information, call the `setUser` (or `set_user`, depending on language) method.
Make sure to call `setUser` in your **frontend** to ensure replays are tagged correctly.
## Sentry SDK
```typescript theme={null}
// Set user information in Decipher via the Sentry TypeScript SDK
Sentry.setUser({
"email": "jane.doe@example.com", // Recommended identifier to set
"id": "your_internal_unique_identifier", // Optional: use if email not available
"username": "unique_username", // Optional: use if email not available
"account": "AcmeCo", // Recommended: Which account/organization is this user a member of?
"created_at": "2025-04-01T15:30:00Z", // Recommended: date this user signed up.
"role": "client", // Optional: what is this user's role/type?
// You can add more user information here as key/value pairs.
});
```
```python theme={null}
# Set user information in Decipher via the Sentry Python SDK
import sentry_sdk
sentry_sdk.set_user({
"email": "jane.doe@example.com", # Recommended identifier to set.
"id": "your_internal_unique_identifier",
"username": "unique_username",
"role": "client",
# Additional user information can be added here
"account": "AcmeCo", # Which account/organization is this user a member of?
"created_at": "2025-04-01T15:30:00Z", # Recommended: date this user signed up.
"role": "client", # Optional: what is this user's role/type?
})
```
```csharp theme={null}
// Set user information in Sentry for C#
SentrySdk.ConfigureScope(scope =>
{
scope.User = new User
{
Id = "unique_user_id", // Unique identifier for the user
Email = "jane.doe@example.com", // User's email address
Username = "username", // User's username
Role: "client",
// Additional user information can be added here
};
});
```
# Monitoring Quickstart
Source: https://docs.getdecipher.com/pages/browser-quickstart
Add a small script to your HTML or install with a package manager to collect session replays, generate automated tests, and get alerted on issues.
Already using Sentry to collect replays? Check out the [Sentry migration guide](/pages/migrations/coming-from-sentry) instead.
**⏱ Estimated Time To Completion: 3 minutes**
Decipher uses the Sentry SDK for frontend integration. You can choose to get started with the Sentry SDK by using the HTML script tag or via a package manager below.
Log in to [Decipher](https://app.getdecipher.com) with your work email. You will receive a snippet to paste into your HTML head, which will look
something like the example below:
**Important for automated testing:** If you're using Decipher's automated testing feature, you'll need to set `maskAllInputs: false` on the environment where you'll record test steps (usually localhost or staging). This ensures that input interactions are captured correctly for test generation.
```javascript Initialization (copy and paste) theme={null}
```
This should be pasted into your website's HTML head as early as possible. You can configure some of the parameters (e.g. to adjust capture rate).
Identify users where user information is available **in your application frontend**, typically after authentication or login.
For Next.js applications, ensure that this code is placed in a file that includes the `"use client"` directive at the top.
```typescript theme={null}
// Set user information in Decipher via the Sentry TypeScript SDK
Sentry.setUser({
"email": "jane.doe@example.com", // Recommended identifier to set
"id": "your_internal_unique_identifier", // Optional: use if email not available
"username": "unique_username", // Optional: use if email not available
"account": "AcmeCo", // Recommended: Which account/organization is this user a member of?
"created_at": "2025-04-01T15:30:00Z", // Recommended: date this user signed up.
"role": "client", // Optional: what is this user's role/type?
// You can add more user information here as key/value pairs.
});
```
Once you're done, simply use your website to validate that Decipher is collecting session replay data.
Using your package manager of choice, install the `@sentry/browser` SDK. This is the **only package** you need, no matter what framework
and libraries your frontend is using.
```bash npm theme={null}
npm install @sentry/browser --save
```
```bash yarn theme={null}
yarn add @sentry/browser
```
```bash pnpm theme={null}
pnpm add @sentry/browser
```
```bash bun theme={null}
bun add @sentry/browser
```
Log in to [Decipher](https://app.getdecipher.com) with your work email. You will receive a snippet to initialize the SDK —
paste this at the root of your project frontend/client code. It will look something like this:
**Important for automated testing:** If you're using Decipher's automated testing feature, you'll need to set `maskAllInputs: false` on the environment where you'll record test steps (usually localhost or staging). This ensures that input interactions are captured correctly for test generation.
```typescript theme={null}
Sentry.init({
dsn: "YOUR_DSN_FROM_DECIPHER", // This will be set for you once you're logged in.
integrations: [
Sentry.replayIntegration({
maskAllText: false,
blockAllMedia: false,
maskAllInputs: true // Set to false if using automated testing on this environment
}),
// You can optionally specify log levels (see further docs)
Sentry.captureConsoleIntegration(),
Sentry.browserTracingIntegration(),
],
replaysOnErrorSampleRate: 1.0,
replaysSessionSampleRate: 1.0,
tracesSampleRate: 1.0,
});
```
You can configure some of the parameters (e.g. to adjust capture rate).
Identify users where user information is available **in your application frontend**, typically after authentication or login.
For Next.js applications, ensure that this code is placed in a file that includes the `"use client"` directive at the top.
```typescript theme={null}
// Set user information in Decipher via the Sentry TypeScript SDK
Sentry.setUser({
"email": "jane.doe@example.com", // Recommended identifier to set
"id": "your_internal_unique_identifier", // Optional: use if email not available
"username": "unique_username", // Optional: use if email not available
"account": "AcmeCo", // Recommended: Which account/organization is this user a member of?
"created_at": "2025-04-01T15:30:00Z", // Recommended: date this user signed up.
"role": "client", // Optional: what is this user's role/type?
// You can add more user information here as key/value pairs.
});
```
Once you're done, simply use your website to validate that Decipher is collecting session replay data.
Need help? Get white-glove onboarding support from the team, totally free.
# Alerts
Source: https://docs.getdecipher.com/pages/features/alerts
Decipher allows configuring alerts to be notified when there are issues.
> Please make sure [you've set Decipher up](/pages/browser-quickstart) in your application before continuing.
## Create a Replay Issue Alert
Go to the [Alerts](https://app.getdecipher.com/alerts) page.
1. Click the + button and choose Replay Issue Alerts
2. Enter an alert name
3. Click Add Condition and select filters (e.g., Group, URL, Roles, Frequency)
4. At the bottom, pick notification methods: via email, via Slack, or both
5. If using email, select an email summary frequency after adding at least one address
6. Click Save Alert
You can set up multiple alert definitions with different filter sets and Slack channels.
## Conditions
When you set up a Slack channel, you can add conditions to limit which issues trigger that alert. Multiple conditions are combined with AND logic.
| Filter | What it does |
| ------------------------- | -------------------------------------------------------------------------------------------------------------------- |
| Group | Trigger alerts for a specific Group you’ve created and selected. |
| URL patterns | Match issues whose page URL contains any of the specified substrings (e.g., `/checkout`, `/api/payments`). |
| User roles | Restrict to users with specific roles configured via your SDK initialization. |
| User plans | Alert only for users on selected subscription plans. |
| Accounts | Include specific accounts and optionally toggle priority accounts from settings. |
| Projects | Limit alerts to particular projects within your org. |
| Issue frequency threshold | Alert when the number of issue instances reaches a threshold within a time window (30 minutes, 1 hour, or 24 hours). |
Use a small set of precise URL patterns and add a frequency threshold to cut noise during spikes.
## Integrations
1. Navigate to **Integrations** using the sidebar and click **Connect Slack**
2. For private channels: Use the Slack command `/invite @Decipher Alerts`
Public channels are automatically accessible after connecting.
1. Go to the Discord channel where you want to receive Decipher AI alert notifications.
2. From the channel menu, choose **Edit Channel**.
3. Click on **Integrations**.
4. If there are no webhooks set up, click **Create Webhook**. Otherwise, select **View Webhooks** and then click **New Webhook**.
5. Enter a name for the bot that will send the messages.
6. (Optional) Modify the bot's avatar if desired.
7. Copy the URL from the **WEBHOOK URL** field.
8. Click **Save**.
On the Decipher Alerts page, click the **Integrate Discord Alerts** and provide Decipher with your Webhook URL.
That's it! Decipher will now send alerts to this channel.
# Groups
Source: https://docs.getdecipher.com/pages/features/groups
Organize issues into smart, reusable buckets to monitor what matters most
## What are Groups?
Groups let you define high-level buckets of issues you care about (for example, “Payment failures” or “Login not loading”). Once created, Decipher will automatically find matching sessions and keep these groups up to date.
* **Why use groups**:
* **Persistent monitoring**: Keep a continuous watch on a category of problems.
* **Shareable context**: Give your team one place to track a problem area and its impact.
* **Actionable views**: Filter alerts, funnels, and metrics around a specific theme.
## How to create a Group
1. Go to All Issues → Groups → New Group
2. Fill in the form:
* **Group name**: A clear title (e.g., “Payment failures after Pay Now click”)
* **Error type**: Choose the type that best fits: Error, Loading Issue, or Rage Click
* **URL matching**: Track all URLs or limit to specific paths (e.g., `/checkout`)
* **Issue matching method**:
* Contains: simple substring match in error text (only for Error type)
* AI-powered: semantic matching using your description
* **Issue description**: Plain-English description of what should match
3. Click Create Group
Start broad, then narrow URL filters or wording if you see unrelated matches. Use Contains when you know the exact error phrase; use AI-powered for conceptual matching.
Use when the problem can be described in natural language. Decipher will semantically match your description to sessions.
Works best with specific, verifiable details (page, action, UI pattern, message).
Use when you know an exact error phrase (e.g., "Client Side Exception"). Only available for the Error type.
Use precise, stable phrases to avoid unrelated matches.
## Testing groups before creating
Use Test Group to preview how your definition performs before saving.
* **What happens when you test**:
* We find similar collections for your org based on your inputs
* Up to the first 100 are analyzed for matches
* You’ll see results in three buckets:
* Matched
* Rejected
* To be analyzed (includes skipped beyond the first 100)
If results look off, tweak the description, URL filters, or matching method and test again.
During testing, only the first 100 similar collections are analyzed; the rest are shown as Skipped so you can quickly iterate on your definition.
## What makes a good prompt (AI-powered)
Write a short, specific description that an AI could verify against a session.
* “Users click Pay now and see ‘Payment failed’ message”
* “Loading spinner never disappears after login submit”
* Feature or page (e.g., “Bank Accounts page”)
* UI pattern (e.g., “modal error”, “banner warning”)
* “Stuff breaks”
* “Seems slow sometimes”
“User clicks Pay now and sees a error modal with an error code that prevents from paymenting.”
“Login page fails to load and shows a full-page error 'client side exception' instead of the form.”
“User has an issue with the delete button with no response from the UI.”
Once saved, Decipher continuously matches new sessions to your group so your team can monitor, triage, and share progress from one place.
## Alerts for Groups
Get notified when a group you care about has activity.
Go to Alerts and click Create alert. Give it a clear name (e.g., "Payment failures – daily summary").
Click Add Condition → choose Group → select the group you want to monitor.
At the bottom, select via email, via Slack, or both. Add email recipients and/or pick Slack channel(s).
Pick how often you want email summaries (e.g., Daily). Frequency is enabled once at least one email is added.
Click Save Alert. You can edit or disable it any time from the Alerts page.
Email summary frequency appears after you add at least one email recipient.
# Issues
Source: https://docs.getdecipher.com/pages/features/issue
Automatically detect and track product issues and user frustrations
Decipher automatically detects issues and frustrations in your product by watching
every user session. When something goes wrong, Decipher surfaces it on the Issues
page.
## How It Works
Decipher's AI watches session replays and identifies moments where users experience
frustration or encounter problems. These are automatically grouped and prioritized by impact.
## Types of Issues
Decipher detects various frustrations like:
* Error messages appearing
* Users clicking repeatedly
* Clicks that don't do anything
* Pages not loading properly
* Unexpected product behavior
## Custom Issues
You can also define your own custom issues to track specific problems unique to your
product. Decipher will find and tag all matching sessions automatically. Just go to Define Custom under Issues.
## The Issues Page
The Issues page shows:
* All detected issues andfrustrations
* How many users are affected
* When issues started
* Summaries
* Direct access to relevant session replays
Filter and investigate issues to understand exactly what's frustrating your users and
prioritize fixes based on real impact.
## Creating A Ticket
Just click "Export" and you can send the issue to your favorite ticketing system
## Automatic Fixes
Click on "Fix with Cursor" and Decipher will generate a prompt with tons of relevant context so that your coding agent can kick off a fix.
# Login Identities
Source: https://docs.getdecipher.com/pages/features/login-identities
Create and manage login identities to test authenticated user flows
## Overview
Login Identities are reusable login profiles that let your tests start from an authenticated state. Decipher supports two types:
* **Credentials** — Stores a username and password. Decipher logs in automatically before each test run.
* **2FA / Magic Link** — For login flows that require human interaction (2FA codes, magic links, OTPs). You log in once in a live browser session, and Decipher saves the browser state.
## Credentials Identity
1. Go to [**Tests → Identities**](https://app.getdecipher.com/tests/identities) and click **Create Identity**
2. Select **Credentials**
3. Fill in **Name**, **Login URL**, **Username/Email**, **Password**, and optionally a **PIN**
4. Click **Create Identity**
That's it — Decipher will automatically log in with these credentials before each test run. No manual login session needed.
## 2FA / Magic Link Identity
1. Go to [**Tests → Identities**](https://app.getdecipher.com/tests/identities) and click **Create Identity**
2. Select **2FA / Magic Link**
3. Fill in **Name** and **Login URL**
4. Click **Create Identity**
After creating the identity, you need to run a login session to establish the browser state:
1. Click **Run Login** on the identity
2. Complete the login in the live browser session (enter credentials, approve 2FA, click magic link, etc.)
3. Click **End Session** when done
Decipher saves the browser state so future test runs can start from this authenticated session.
Create separate identities for different user roles (admin, standard user, etc.) to test role-specific functionality.
## Using Identities in Tests
When creating a test, select an **Identity** from the dropdown. The test will use that identity's stored credentials or saved browser session to start in an authenticated state.
## Managing Identities
* **Edit** — Select an identity, click **Edit**, update fields, and **Save Changes**. If active test validations use this identity, you'll be prompted to restart them with the new credentials.
* **Delete** — Select an identity, click **Delete**, and confirm. This also removes all associated login attempts.
***
*Need help? [Contact our support team](mailto:team@getdecipher.com).*
# Metrics
Source: https://docs.getdecipher.com/pages/features/metrics
Track issues and product usage with the Metrics feature
Decipher collects extensive usage data and enables you to easily build dashboards that track issues and product usage patterns.
## Creating a New Metric
To create a custom metric:
1. Go to the [Decipher Homepage](https://app.getdecipher.com/home)
2. Navigate to the **Metrics** section
3. Click **Add New Metric**
### Configure Your Metric
When creating a new metric, you'll need to configure several options:
#### Chart Name
Give your metric a descriptive name that clearly identifies what it tracks.
#### Metric to Track
Choose from the available data types:
* **Users** - Track unique users and user-related metrics. This requires having set up [user identification](/pages/advanced/users) in your application.
* **Issues** - Track issues affecting users and how the rates change over time
* **Sessions** - Track number of sessions
#### Time Range
Select the time period for your metric:
* Last 7 days
* Last 30 days
* Custom date ranges
## Adding Filters
You can add optional filters to refine your metrics and focus on specific data segments:
1. Click **Add Filter** in the metric configuration
2. Select a **Field** to filter by (e.g., Account, User Type, etc.)
3. Choose an **Operator** (Equals, Contains, Contains, etc.)
4. Enter or select the **Value** to filter on
### Filter Examples
* Filter by issue types affecting certain accounts
* Filter by specific accounts using the account selector
* Filter by user properties or custom attributes
# Smart Events
Source: https://docs.getdecipher.com/pages/features/smart-events
AI-powered, no-code events for tracking user & product behavior—perfect for funnels, trends, and session browsing.
> Please make sure [you've set Decipher up](/pages/browser-quickstart) before continuing.
## What is a Smart Event?
A **Smart Event** is any product **or** user behaviour you want to track—clicks, page states, errors, banners, onboarding steps, you name it.
Think of it as flexible, AI-driven analytics you configure **without code changes** or manual work.
## How Smart Events Work
Decipher’s AI watches every user session replay.
Each time the page changes *or* the user does something, the AI checks whether that moment matches any Smart Event definitions you created.
When it does, it tags the replay with the event—retroactively and going forward.
## What Can You Do With Them?
* **Quantify** how many users triggered an event and spot trends over time.
* **Jump straight into replays** for people who met—or missed—an event.
* **Drop events into Funnels** to see exactly *where* and *why* users drop off.
## Examples
* User clicked **Submit** and saw an **error banner**
* User **visited** the dashboard page
* A notification appeared: *“No more tokens”*
* User **completed** the **third onboarding task**
Imagine you’re asking an intern to tag replays—spell things out.
* Mention **where** on the page a button lives (e.g., *“blue **Save** button in the top-right corner”*)
* Include **exact text** that might appear on a banner or dialog
Define **lots** of Smart Events — cover key activation steps, new-feature usage, and common issues.
Smart Events + Funnels surface high-impact insights in minutes.
***
*Doc v2025-05-16 Rev 1*
# Teams
Source: https://docs.getdecipher.com/pages/features/teams
Organize work by product area, filter issues and dashboards by team, and focus on what matters to each group.
> Teams are currently available for select organizations. If you don’t see Teams, contact support.
## What are Teams?
Teams let you scope Decipher to the areas of your product that each group owns. A team is defined by:
* URL patterns: pages or paths the team is responsible for (e.g. `/checkout`, `/admin`, `settings`, or `billing`).
* Members: org users who belong to the team for quick switching and visibility.
When a team is selected, Decipher filters what you see to that team’s surface area:
* All Issues: shows only issue collections whose affected page matches the team’s URL patterns. You’ll see badges like “Trending Issues (last 24 hours) for your team” and an info tooltip listing the team’s URLs.
* Home: trending issues and summaries reflect the selected team.
When no team is selected (All Teams), you see org‑wide results.
## How to create a team
1. Go to Settings → Team Management.
2. Click Create Team.
3. Enter a Team Name.
4. Add Page URLs the team owns. Use simple contains matches; for example:
* `/setup` matches `/home/setup/1`
* `billing` matches `/org/billing/plan`
Tip: keep patterns short and specific to the area the team owns.
5. (Optional) Select Members from your org to add to the team.
6. Save Team.
Behind the scenes, Decipher uses these URL patterns to filter collections on the All Issues page and the dashboard when that team is active.
## Adding members to a team
Members are used for convenience and visibility—they do not change filtering rules. Anyone in the org can switch to a team view, but adding members:
* Makes the team easy to find in the selector for those users.
* Helps communicate ownership in settings.
To add or modify members:
1. In Settings → Team Management, open an existing team.
2. Use the Members picker to add or remove users.
3. Save.
## Switching between team views
Use the team selector at the top of All Issues and the Home dashboard.
* All Teams: clears the team filter and shows org‑wide data.
* Specific Team: filters views to that team’s URL patterns. You’ll see a small info icon next to section headers that shows which URLs are applied.
Notes:
* Switching teams updates lists immediately (e.g., Most Recent, Trending Issues) to reflect the selected team.
* Sorting and filters you apply (like issue type, user, account) work on top of the team filter.
* If you don’t see the team selector, your org may not have Teams enabled yet.
## Tips for effective teams
* Keep URL patterns short and stable (e.g., `/checkout` instead of full URLs).
* Align each team’s patterns with clear ownership boundaries.
* Start with one or two patterns, then refine as needed.
# Recording a Test
Source: https://docs.getdecipher.com/pages/features/testing
Record user interactions and automatically generate tests
Decipher can automatically generate tests from recordings using the Chrome Extension. Record any user flow on any website, then convert it into an automated test that runs on a schedule.
The Chrome extension works on any website—including sites you don't own or haven't instrumented with Decipher.
## Step 1: Install the Chrome Extension
1. Visit the [Decipher Recorder on the Chrome Web Store](https://chromewebstore.google.com/detail/decipher-recorder/nlkjoijnodenbihehngemdccdinnaejd)
2. Click **Add to Chrome**
3. Click **Add Extension** in the confirmation popup
1. Click the puzzle icon in Chrome's toolbar
2. Find **Decipher Recorder** and click the pin icon
3. The Decipher Recorder icon will now appear in your toolbar
## Step 2: Record a User Flow
1. Navigate to the website you want to test in Chrome
2. Click the **Decipher Recorder** icon in your Chrome toolbar
3. Click the **Record Tab** button in the popup
4. A countdown overlay will appear (3, 2, 1...)
5. Recording begins automatically after the countdown
Interact with the website as a user would. The extension captures:
* Clicks and form inputs
* Page navigation
* Errors and console logs
* Network requests
You can also add [code execution steps](/pages/features/testing/code-execution) during recording by clicking **+ Add Code Step** in the sidebar. This lets you run custom JavaScript (e.g., API calls or data setup) as part of your recorded flow.
Click the red **Stop** button in the recording control panel at the bottom of the page. Your recording will automatically open in the Decipher dashboard.
If you're not signed in to Decipher when you start recording, you'll be redirected to sign in first, then returned to your original tab.
## Step 3: Generate a Test from Your Recording
After stopping the recording, Decipher automatically takes you to the test creation page with your recording already loaded:
Fill in the test information:
* **Test Name** (e.g., "Login Flow" or "Checkout Process")
* **Base URL** (where the test should start)
* **Identity** (optional - select a [login identity](/pages/features/login-identities) for authenticated flows)
* **Suite** (optional - assign to a [test suite](/pages/features/testing/suites))
Click **Generate Test**. Decipher will convert your recording into an automated test that can run on a schedule.
For authenticated flows, create a [login identity](/pages/features/login-identities) first. This allows tests to automatically log in before running.
## Best Practices
* **Keep tests focused** - One test per user flow (e.g., login, checkout, profile update)
* **Use meaningful names** - Name tests clearly to identify what they validate
* **Review generated tests** - Always verify the test captures your intended flow
* **Save test identities** - For authenticated flows, save login credentials with the test
* **Start with critical paths** - Create tests for your most important user journeys first
***
*Need help getting started? [Contact our support team](mailto:team@getdecipher.com) for assistance.*
# Agent Context
Source: https://docs.getdecipher.com/pages/features/testing/agent-context
Give your QA agent product-specific knowledge to eliminate false positives
Agent Context lets you give Decipher's QA agent plain-language rules about your product's expected behavior. This helps the agent distinguish real bugs from known quirks — like a staging environment that 403s on first load or a cookie consent popup that appears intermittently.
## Setup
Go to your project **Settings > Testing** tab. In the **Agent Context** section, click **Add Rule** and describe the behavior in plain language. Rules take effect immediately.
## How It Works
Active rules are injected into the agent's context during **step validation** and **assertion validation**. When the agent evaluates whether a step succeeded or an assertion passed, it checks its observations against your rules. Behaviors you've marked as expected are filtered out.
Rules are interpreted with full reasoning — you don't need exact string matches or CSS selectors. "The debug toolbar at the bottom of the screen" is enough.
## Examples
| Category | Rule |
| ---------------------- | ---------------------------------------------------------------------------------------------- |
| Environment quirks | "Staging uses mock payment processing. 'Test Mode' in the header is expected." |
| Environment quirks | "API responses in staging can take up to 10 seconds. Don't flag timeouts under 15s." |
| Intentional UI states | "New accounts see an empty dashboard with an onboarding checklist. Not a bug." |
| Intentional UI states | "The old settings page redirects to the new one. The redirect is intentional." |
| Known temporary issues | "Profile image upload shows a brief error before succeeding. Ignore if upload completes." |
| Known temporary issues | "Search results page flashes 'no results' before populating. Wait 2 seconds before asserting." |
## Best Practices
* **Be specific** — "Ignore the red banner on the checkout page" over "ignore red banners."
* **Keep rules current** — Remove rules when the behavior is fixed. Stale rules can mask real bugs.
## Managing Rules
Click any rule to view, edit, or toggle it. Each rule shows its creation date and current status.
* **Toggle active/inactive** — Only active rules are used during test runs.
* **Edit** — Changes take effect on the next run.
* **Delete** — Permanently remove a rule.
***
*Need help? [Contact our support team](mailto:team@getdecipher.com).*
# Test Alerts
Source: https://docs.getdecipher.com/pages/features/testing/alerts
Get notified when tests fail
Set up alerts to be notified when your tests fail, so you can respond quickly to issues.
## Setting Up Alerts
1. Go to the [**Tests**](https://app.getdecipher.com/tests) page and navigate to **Alerts**
2. Under **Team Alerts**, click one of the two alert types:
* **Failure Alert** — notifies your team when tests fail
* **Tests Digest** — sends a periodic summary of test results
3. Configure Slack delivery by connecting a channel inline
4. Choose a frequency (see below)
You can also set up personal alerts under the **My Test Alerts** section, which notify only you.
## Alert Types
### Failure Alert
Triggers when a test fails. Choose how often you want to be notified:
* **Every instance** — alert on every failure as it happens
* **Daily** — receive a daily summary of failures
* **Weekly** — receive a weekly summary of failures
### Tests Digest
A periodic summary of your test results across all suites. Available frequencies:
* **Daily** — a daily digest of test results
* **Weekly** — a weekly digest of test results
## Slack Integration
Test alerts are delivered via Slack. Connect a channel directly from the Alerts page:
1. Click **Connect Slack** on the alert you're configuring
2. Select the Slack channel for notifications
3. For private channels, use `/invite @Decipher Alerts`
Set up a Failure Alert with "every instance" frequency for your critical test suites. This ensures you're notified immediately when important user flows break.
# Claude Code Integration
Source: https://docs.getdecipher.com/pages/features/testing/claude-code-integration
Create, run, and fix AI-powered end-to-end tests from Claude Code.
## Overview
The Decipher QA CLI (`@decipher-sdk/decipher-qa`) connects Claude Code to Decipher so you can generate, run, and fix end-to-end tests without leaving your editor. Claude explores your codebase to understand pages, components, and routes, then generates step-by-step test instructions. Decipher's agent executes each step on a cloud-hosted browser, analyzes whether it ran correctly, captures screenshots, and returns detailed failure information when something goes wrong. When a test fails, Claude uses Decipher's analysis to diagnose the issue and fix the failing steps automatically.
After setup, use the `/decipher-qa` slash command in Claude Code to interact with Decipher.
## Quick Start
```bash theme={null}
npm i -g @decipher-sdk/decipher-qa
```
Run `decipher-qa init` from anywhere inside your git repository:
```bash theme={null}
decipher-qa init
```
This sets up authentication, configures permissions, and installs the Claude Code skill.
Get your API token from [Settings > API Keys](https://app.getdecipher.com/settings?section=api-keys) in the Decipher dashboard.
Start Claude Code and use the `/decipher-qa` slash command:
```bash theme={null}
claude
```
Then type `/decipher-qa` followed by a test description — for example:
```
/decipher-qa test CRUD operations for the todo creation page
```
## Capabilities
| Capability | Description |
| ------------------- | ------------------------------------------------------------------------------------------------------------------- |
| AI test generation | Claude explores your codebase and generates test steps from a natural-language description |
| Cloud execution | Decipher's agent runs each step on a cloud-hosted browser — no local browser or driver setup needed |
| Step validation | Decipher analyzes each step to verify it executed correctly, capturing screenshots and detailed diagnostics |
| Auto-fix & resume | When Decipher flags a failure, Claude uses the diagnostics to fix steps and resume without re-running the full test |
| Authenticated flows | Store login identities so tests can run behind authentication |
| Live test runs | Trigger on-demand test runs from Claude Code |
## Use Cases
| Use case | Example prompt |
| --------------------------- | ----------------------------------------------------------------- |
| Test a user flow end-to-end | `/decipher-qa test the signup flow through email verification` |
| Test CRUD operations | `/decipher-qa test creating, editing, and deleting a project` |
| Test authenticated pages | `/decipher-qa test the billing settings page as an admin user` |
| Validate after a UI change | `/decipher-qa run my checkout tests to make sure they still pass` |
| Set up login credentials | `/decipher-qa create an identity for my test user on staging` |
## Using the Slash Command
After setup, interact with Decipher through the `/decipher-qa` slash command in Claude Code.
### Creating a Test
Type `/decipher-qa` followed by a description — for example, "test CRUD operations on the settings page".
Claude explores your codebase, generates steps, and saves the test to Decipher.
Decipher's agent executes each step on a cloud browser, analyzing whether it ran correctly.
If Decipher flags a step failure, it returns diagnostics and screenshots. Claude uses that analysis to fix the failing steps and resumes validation.
For authenticated flows, create an identity first: `/decipher-qa create an identity for my admin user`
### Managing Tests & Identities
| Prompt | What it does |
| ----------------------------------------- | ------------------------------- |
| `/decipher-qa list my tests` | Lists all tests |
| `/decipher-qa show test ` | Displays test details and steps |
| `/decipher-qa delete test ` | Removes a test |
| `/decipher-qa create an identity for ...` | Stores login credentials |
| `/decipher-qa list identities` | Shows saved identities |
| `/decipher-qa run test ` | Starts a test run |
These are natural-language prompts. Claude interprets your intent and runs the appropriate CLI commands under the hood — you never need to run CLI commands directly.
## Setup Reference
Running `decipher-qa init` performs the following actions in your repository:
* Creates skill files in `.claude/skills/decipher-qa/`
* Adds permission rules to `.claude/settings.json`
* Adds `.decipher/` to `.gitignore`
* Prompts for your API token (saved to `~/.decipher/qa-config.json`)
If skill files already exist, they are skipped. Use `decipher-qa init --force` to overwrite them.
You can re-authenticate at any time by running `decipher-qa login`.
## Updating the Package
To update to the latest version of the Decipher QA CLI:
```bash theme={null}
npm i -g @decipher-sdk/decipher-qa@latest
```
After updating the CLI, run init with the `--force` flag to update your skill files to the latest version:
```bash theme={null}
decipher-qa init --force
```
The `--force` flag ensures your skill files are always updated to match the latest CLI version.
***
*Need help? [Contact our support team](mailto:team@getdecipher.com).*
# Code Execution
Source: https://docs.getdecipher.com/pages/features/testing/code-execution
Run custom JavaScript as a test step
## Overview
Code execution steps let you run custom JavaScript in the browser during a test. This is useful when your test needs to interact with APIs, set up data, or perform actions that aren't possible through the standard click/type/assert steps.
The code runs in the browser context via `page.evaluate()`, so you have access to `fetch()`, `document`, `window`, and other browser APIs.
## Adding During Recording (Recommended)
The easiest way to add a code step is during a Chrome extension recording. The code runs immediately so you can verify it works before saving.
Open the Decipher Recorder sidebar and click **Record Tab** to begin recording your user flow.
In the recording sidebar, click the **+ Add Code Step** button. This appears between the action log and the "Watching..." indicator.
Enter your JavaScript in the code editor. You can use top-level `await` — the code is wrapped in an async function automatically. A template with a `fetch` example is pre-filled to get you started. Use `return` to pass a value back — it will be shown in the step results.
Describe what the code does (e.g., "Create test user via API"). This description appears in the action log and in the generated test steps.
Click **Run & Add Step**. The code executes immediately in the page. You'll see whether it succeeded or failed, along with any return value. The step is added to your recording's action log with before/after screenshots.
Keep recording the rest of your flow. When you generate a test, the code step is included at the correct position in the test.
If a code step fails, the error is shown but your recording continues. Delete the step and try again with corrected code.
## Adding in Edit Mode
You can also add code steps to an existing test:
Navigate to your test and click **Edit Mode**.
Click **Add code execution** between any two steps.
Enter your JavaScript, set a description and timeout, then click **Save**.
## Example
```javascript theme={null}
const response = await fetch(
'https://jsonplaceholder.typicode.com/posts',
{
method: 'POST',
headers: { 'Content-Type': 'application/json' },
body: JSON.stringify({ title: 'Test Post', body: 'Hello', userId: 1 }),
}
);
const data = await response.json();
// Return a value to see it in the step results
return data.id;
```
The last expression returned by your code is captured and displayed in the step results, so you can verify the step did what you expected.
## Timeout
Each code step has a configurable timeout (default: 30 seconds, max: 300 seconds). If the code doesn't finish within the timeout, the step fails. You can adjust the timeout when adding the step.
## Behavior
* **Errors** — If the code throws an error or times out, the step fails and the error message is shown in the test results.
* **Return values** — If your code returns a value, it is captured and displayed in the step results.
* **Variable persistence** — Variables declared with `const`/`let` don't persist across steps. Use `window.myVar = ...` to share data between code steps.
* **Navigation** — If your code navigates the page (e.g., `window.location.href = ...`), subsequent steps run on the new page.
Code execution steps are user-authored only — they cannot be generated by AI-based editing.
***
*Need help? [Contact our support team](mailto:team@getdecipher.com).*
# Download Playwright Spec
Source: https://docs.getdecipher.com/pages/features/testing/download-playwright-spec
Export any Decipher test as a runnable @playwright/test spec — no AI, no Decipher account needed at runtime
The "Download Test" action exports a Decipher test as a self-contained `@playwright/test` spec file. The generated `.spec.js` is fully deterministic — no AI calls at runtime — and runs against a real browser using selectors mined from the test's most recent passed runs (with the recorded selectors as fallback). Useful for CI pipelines that need a static script, debugging selector flake locally, or running a test outside Decipher entirely.
### What's included
Selectors come from the latest 3 *passed* runs in the last 2 days (strict per-step intersection), falling back to the recorded selectors stored on the test. Login steps are inlined as raw Playwright actions with credentials substituted from your identity row. The script ships with a 1920×1080 viewport.
### What's skipped
Steps that need the Decipher runtime or AI to behave correctly are emitted as `// SKIPPED:` comments: `assert`, `code`, `tab-switch`, and `upload`.
## Step 1: Download the spec
Navigate to **`/tests/`** in the Decipher app.
Click the `⋯` button next to **Run Test** in the header.
The menu stays open showing **"Generating..."** while the server walks your test's recent runs and renders the spec, then downloads `-.spec.js`.
### Bulk export from `/tests/all`
Need to grab specs for many tests at once? On the **`/tests/all`** page, select tests via the row checkboxes and click **Export Playwright** in the bulk-actions bar. Decipher generates each spec using the same deterministic generator described above and packs them into a single zip:
`decipher-tests--.zip`
A few details worth knowing:
* **Same output as the single-test download.** Every `.spec.js` in the zip is byte-for-byte what you'd get by exporting that test individually, so the rest of this page (running, artifacts, troubleshooting) applies unchanged.
* **Partial success is fine.** If a few tests can't be rendered (e.g. no steps, or no recent passing runs to mine selectors from), the zip still contains the ones that succeeded and a toast lists how many were skipped.
* **Filenames are deterministic.** Specs are sorted by name in the zip; if two tests resolve to the same filename, later ones get a `-dup2`, `-dup3`, ... suffix.
* **Org-scoped.** You can only export tests within your own org — cross-org IDs surface as `Test not found` in the failure list, never silently included.
Up to 5 specs are generated in parallel, so a 50-test selection typically takes a handful of seconds.
## Step 2: Set up a Playwright environment
If you already have a directory with `@playwright/test` installed, drop the spec there and skip straight to Step 3 — the rest of this section is only for first-time setup.
In any folder you want to keep your generated specs in (e.g. `~/playwright-runs/`):
```bash theme={null}
mkdir -p ~/playwright-runs
cd ~/playwright-runs
npm init -y
npm install -D @playwright/test
npx playwright install chromium
```
You don't need a `playwright.config.ts` — the generated spec sets its own viewport via `test.use({ viewport: { width: 1920, height: 1080 } })` and disables Playwright's per-test timeout via `test.setTimeout(0)`.
## Step 3: Run the spec
Move (or download) the `.spec.js` file into the directory you set up in Step 2, then:
```bash Headless (default) theme={null}
npx playwright test add-internal-user-2377.spec.js
```
```bash Headed (visible browser) theme={null}
npx playwright test add-internal-user-2377.spec.js --headed
```
```bash Single-browser, debug-friendly theme={null}
npx playwright test add-internal-user-2377.spec.js --headed --workers=1
```
Add `--headed` to either invocation to run with a visible browser window — useful for watching the test execute or debugging timing issues. Without it, Playwright runs Chromium headlessly.
The script logs every step's start, picked selector, click strategy, and elapsed time to your terminal. Failed steps print the underlying error and abort the test.
## What you'll see in the terminal
```text theme={null}
[0.12s] Test started
[0.45s] ▶ Step 1 (default): Click email field
[0.78s] ↳ resolveLocator picked: [data-testid="email"]
[0.92s] ↳ click: ok (locator.click)
[1.05s] ✓ Step 1 ok (0.60s)
[1.25s] ▶ Step 2 (default): Type 'dev{{unique}}' into the Playground Name field
[1.51s] ↳ resolveLocator picked: input[placeholder="Give your playground a name"]
[1.68s] ✓ Step 2 ok (0.43s)
...
[t] ✗ Step 12 FAILED after 15.02s: [__resolveLocator] no candidate selector found after 15000ms — ...
```
## Where Playwright Test puts artifacts
The runner (not the generated script) creates these files in the directory you ran `npx playwright test` from:
| File / Folder | What it is |
| -------------------- | ----------------------------------------------------------------------------------- |
| `test-results/` | Per-failure artifacts: error context, screenshots, traces. Created on failure only. |
| `.last-run.json` | Metadata about the most recent run. Powers `npx playwright test --last-failed`. |
| `playwright-report/` | HTML report (only if you opt in via `--reporter=html`). |
Add `test-results/`, `playwright-report/`, and `.last-run.json` to your `.gitignore` if you commit your specs.
## Common questions
No — the spec uses `@playwright/test`'s `test()`/`expect()` framework, so it must be run via `npx playwright test`. If you want a plain Node script you'd need the `playwright` runtime package and a different generator (not currently exposed).
No. The script only requires `@playwright/test` and a Chromium binary. Once downloaded, it has no Decipher dependencies and works fully offline.
Yes, but only when the login uses a **credential identity** (username + password stored in Decipher). The generator decrypts the password and inlines the recorded login Playwright steps with `{{username}}` / `{{password}}` substituted in place. Manual identities are skipped because they go through the Decipher CUA agent at runtime.
The deterministic generator can only emit step types whose action is fully described by the stored selectors. Steps that need the Decipher runtime (assertions, code-block execution, tab-switching by AI judgement, file uploads, etc.) are emitted as comments so the script structure still mirrors your test, but no action is taken.
The terminal log pinpoints which step failed and why. Three common categories:
* **`no candidate selector found`** — every cached selector returned zero matches. Usually means the previous step didn't reach the expected page state (modal didn't open, navigation didn't happen).
* **`locator.click failed (intercept/Timeout)`** — the script auto-escalates through `page.mouse.click` at the element's center, then a synthetic event dispatch. If all three fail the click target is genuinely unreachable.
* **`tiebreak (location): … → nth(N)`** — the cached selector matched multiple visible elements; the script picks the one whose center is closest to the originally-recorded action area. If the wrong element was picked, the test was likely recorded against a layout the page no longer matches.
# Environments
Source: https://docs.getdecipher.com/pages/features/testing/environments
Run tests against staging, preview, and other environments
Environments let you run tests and suites against different base URLs — like
staging or preview deployments — without modifying your test configurations.
## Creating an Environment
1. Go to the [**Tests**](https://app.getdecipher.com/tests) page and navigate
to **Environments**
2. Click **New Environment**
3. Fill in the details:
* **Name** — A label for this environment (e.g., "Staging", "Preview")
* **URL** — The base URL (e.g., `https://staging.example.com`)
* **Tokens** (optional) — Key-value pairs for API keys or auth tokens
needed in this environment
4. Click **Create**
## Running Tests Against an Environment
Once you've created environments, a dropdown appears on the **Run** button
for both individual tests and suites:
* **Individual tests** — Click the **Run Test** dropdown and select an
environment. The test runs against that environment's URL instead of the
original.
* **Suites** — Click the play button on a suite row and choose an
environment, or select **Default (original URLs)** to run with the
original test URLs.
Create separate environments for each deployment target your team uses
(staging, QA, preview branches). Any test or suite can be run against any
environment on demand — no configuration changes needed.
## Managing Environments
From the Environments page, you can:
* **Edit** — Click the pencil icon to update the name, URL, or tokens
* **Delete** — Click the trash icon to remove an environment
## Tokens
Tokens are key-value pairs passed to your tests as environment-specific
configuration. Common uses include:
* API keys that differ between environments
* Auth tokens for service-to-service authentication
* Feature flags or configuration overrides
Add tokens when creating or editing an environment by clicking **Add Token**
and entering a key and value.
# File Uploads
Source: https://docs.getdecipher.com/pages/features/testing/file-uploads
Upload files in test steps to test file inputs on your pages
## Overview
File upload steps let your tests upload files — such as PDFs, images, and documents — to file inputs on a page. You can add upload steps manually in Edit Mode or capture them automatically while recording with the Chrome extension.
## Recording File Uploads
When recording with the Chrome extension, file uploads are captured automatically:
* **File picker uploads** and **drag-and-drop uploads** are both detected and recorded.
* The uploaded files are saved with the recording and appear as a step in the generated test.
There is a **50 MB per-file size limit** when uploading files during a recording.
## Editing File Upload Steps
After creating a file upload step, you can modify it in Edit Mode:
* **Change the description** — Update the step description to target a different file input.
* **Remove files** — Click the **X** on a file chip to remove it from the step.
* **Add more files** — Click **Add files** to attach additional files.
* **Download files** — Download previously uploaded files to review them.
Upload steps cannot be added or modified via AI-based editing. Use **Edit Mode** to create and update file upload steps.
## Supported File Types
Any file type is accepted. Common examples include:
* PDF documents
* Images (JPG, PNG, GIF, SVG, etc.)
* Word documents (DOCX)
* Spreadsheets (CSV, XLSX)
* Plain text files (TXT)
## Test Results
After a test runs, you can view the file upload step in the test results. The results show which files were uploaded and their sizes, so you can confirm the correct files were used.
***
*Need help? [Contact our support team](mailto:team@getdecipher.com).*
# Agentic Test Generation
Source: https://docs.getdecipher.com/pages/features/testing/generate-with-claude
Create end-to-end tests from natural language descriptions using Claude Code
Instead of recording a user flow in the browser, you can describe what you want to test in plain English and let Claude generate the test for you.
Before using this feature, set up the Claude Code integration first. See [Claude Code Integration](/pages/features/testing/claude-code-integration) for installation and authentication.
## Creating a Test
In Claude Code, use the `/decipher-qa` slash command followed by a description of what you want to test:
```
/decipher-qa test the signup flow through email verification
```
Claude will:
1. **Explore your codebase** to understand your pages, components, and routes
2. **Generate test steps** based on your description
3. **Run the test** on a cloud-hosted browser
4. **Validate each step** and capture screenshots
You don't need to specify selectors, URLs, or step types — Claude figures those out from your code.
## Describing Your Test
Write your prompt like you'd explain the test to a teammate. Be specific about what the test should do, but you don't need to be technical.
**Good prompts:**
| Prompt | What Claude generates |
| --------------------------------------------------------------------------- | ------------------------------------------------------------------------------ |
| `test the login flow with invalid credentials and verify the error message` | Navigate to login, enter bad credentials, submit, assert error message appears |
| `test creating a new project, editing its name, then deleting it` | Full CRUD flow across multiple pages |
| `test the billing settings page as an admin user` | Authenticated flow using a login identity |
| `test that the search bar returns results for "shoes"` | Navigate to search, type query, assert results appear |
**Tips for better prompts:**
* Mention the specific page or feature (e.g., "the settings page", "the checkout flow")
* Include what you want to verify (e.g., "verify the success message appears")
* Mention the user role if the flow requires authentication (e.g., "as an admin user")
## Generating Multiple Tests
You can ask Claude to generate several tests at once:
```
/decipher-qa create tests for the full CRUD flow on the projects page:
- creating a new project
- editing a project name
- deleting a project
```
Claude will generate and validate each test independently.
You can also apply changes across existing tests in bulk from the Decipher dashboard using "Ask for Changes" — describe a modification in natural language and apply it to multiple tests at once.
## Automatic Self-Fixing
When a generated test fails during validation, Claude automatically diagnoses and fixes the issue:
1. Decipher's agent runs each step and flags any failures with diagnostics and screenshots
2. Claude analyzes the failure — wrong selector, missing wait, incorrect assertion, etc.
3. Claude fixes the failing steps
4. Validation resumes from where it left off, without re-running the entire test
This loop continues until the test passes or requires your input. If Claude can't resolve a failure, you'll see the failure details and screenshots so you can edit the step manually and resume.
## Modifying Tests with Natural Language
After a test is created, you can modify it without manually editing steps. Use "Ask for Changes" in the Decipher dashboard or ask Claude directly:
```
/decipher-qa add an assertion to verify the user is redirected to the dashboard after login
```
You can reference specific steps in your request:
```
/decipher-qa change step 3 to click the "Save" button instead of "Submit"
```
## When to Use Claude vs. Recording
| Scenario | Recommended approach |
| --------------------------------------------------------------- | ---------------------------------------------------------------- |
| You know the flow but don't want to click through it | **Claude** — describe it and let Claude generate the steps |
| The flow involves complex interactions you'd rather demonstrate | **Recording** — click through it with the Chrome extension |
| You want to generate tests for multiple flows quickly | **Claude** — describe them all in one prompt |
| You need to test a page that isn't built yet | **Claude** — generate tests from your code before the UI is live |
| You want to capture exact timing and interactions | **Recording** — the extension captures your real behavior |
# GitHub integration
Source: https://docs.getdecipher.com/pages/features/testing/github-pr-integration
Connect GitHub and configure the PR gate to run tests on pull requests
Setting up GitHub integration lets Decipher run tests automatically when pull requests are opened or updated.
## Step 1: Open Integrations
In Decipher, go to **Settings** (or **Integrations**, depending on your nav).
Find the **GitHub** section.
## Step 2: Connect GitHub
Click **Connect** next to GitHub. You'll be sent to GitHub to install the Decipher app.
On GitHub, choose where to install the app:
* **Your user account** — you'll see repos from your personal account
* **An organization** — you'll see repos from that org
Complete the install (and any permission prompts). You'll be redirected back to Decipher. GitHub is now **connected** for your org.
## Step 3: Connect a repository
In the GitHub section, use the **repository** dropdown (it lists repos from the account/org you chose). Select the repo you want to run PR tests for (e.g. `your-org/your-repo`).
Click **Connect repository**. Decipher will create a webhook on that repo and save the connection. You should see **Connected to owner/repo**.
If you don't see the right repos: The list is for the account/org you installed the app on. To use a different one, click **Use a different GitHub account or org**, then install again and choose the correct account/org.
## Step 4: Configure PR Gate
With a repo connected, click **Configure PR Gate**.
### Optional – Branch scope
Add **base branches** (e.g. `main`, `develop`). Tests run only for PRs whose base branch is in this list. Leave empty to allow all branches.
### When a PR is opened or reopened
Choose one or more **Suites** and/or **Tests** to run.
Click **Save**.
## What happens on PRs
* When someone **opens or reopens** a PR (and, if you set branch scope, the base branch matches) or **pushes a new commit** to an existing PR, Decipher runs the suites/tests.
* Decipher waits for a preview deployment (e.g. from Vercel or Netlify) for that PR, then runs the tests against that preview URL.
* When runs finish, Decipher **posts a comment on the PR** with the test results.
## Disconnecting or changing repo
* **Disconnect the repo only** — Use the small **X** next to **Connected to owner/repo**. You can then pick another repo and connect it.
* **Disconnect GitHub entirely** — Click **Disconnect** in the GitHub section. This removes the connection and the webhook; you can connect again later and choose a different account/org or repo.
***
*Need help? [Contact our support team](mailto:team@getdecipher.com).*
# Linear integration
Source: https://docs.getdecipher.com/pages/features/testing/linear-integration
Create Linear issues from failed test runs with full failure context
Decipher's Linear integration lets you create Linear issues directly from failed test runs. Each issue is pre-filled with failure details, suggested fixes, and a link back to the run in Decipher.
## Step 1: Connect Linear
In Decipher, go to the [**Integrations**](https://www.app.getdecipher.com/integrations) page.
Click **Connect** next to **Linear**. You'll be redirected to Linear to authorize Decipher.
On Linear, review the permissions (read access and issue creation) and click **Authorize**. You'll be redirected back to Decipher.
Once connected, you'll see a confirmation on the Integrations page. The integration is shared across your Decipher organization — any team member can create issues once it's set up.
## Step 2: Create an issue from a failed test run
Navigate to a test and click on a run with a **failed** status.
Click the **Export** button (with the Linear icon) next to the run status badge. If Linear isn't connected, you'll be prompted to set it up on the Integrations page.
A dialog opens with the title and description pre-filled from the failure. Select a **team**, and optionally set an assignee, project, label, or priority. You can edit any field before creating.
Click **Create Issue**. The issue is created in Linear and linked to the test run in Decipher.
## What's included in the issue
Decipher automatically generates the issue description with:
* **Failure summary** — what went wrong and why
* **Link to the run** — direct link to the run in Decipher
* **Test context** — test name, target URL, run status, and timestamp
* **Failure classification** — type and reason for the failure (if available)
* **Failed steps** — detailed breakdown of which steps failed and how
* **Suggested fixes** — AI-generated recommendations for resolving the failure
You can edit the title and description before creating the issue. Add your own notes or remove sections that aren't relevant.
## Viewing linked issues
After creating an issue, the Export button on the test run is replaced with a link showing the Linear issue identifier (e.g., **ENG-123**). Click it to open the issue directly in Linear.
Each test run can have one linked Linear issue. If an issue has already been created for a run, the button shows the existing issue link instead of the create option.
## Disconnecting Linear
To disconnect the integration:
1. Go to the [**Integrations**](https://www.app.getdecipher.com/integrations) page
2. Click **Disconnect** next to Linear
This revokes Decipher's access to your Linear workspace. Existing issues in Linear are not affected, but you won't be able to create new ones from Decipher until you reconnect.
***
*Need help? [Contact our support team](mailto:team@getdecipher.com).*
# Local Tunnel
Source: https://docs.getdecipher.com/pages/features/testing/local-tunnel
Run Decipher tests against your local development environment using a secure tunnel
The Decipher Tunnel CLI exposes your local development server to the internet through a secure tunnel, giving Decipher's test runner a public URL to reach your app. This lets you record and run tests against localhost without deploying — powered by ngrok under the hood.
**Prerequisites:**
* Node.js 18 or later
* A [Decipher account](https://app.getdecipher.com)
* A local dev server running on a known port (e.g., `localhost:3000`)
## Step 1: Install the CLI
Install the tunnel CLI globally using your preferred package manager:
```bash npm theme={null}
npm install -g @decipher-sdk/decipher-tunnel
```
```bash yarn theme={null}
yarn global add @decipher-sdk/decipher-tunnel
```
```bash pnpm theme={null}
pnpm add -g @decipher-sdk/decipher-tunnel
```
```bash bun theme={null}
bun add -g @decipher-sdk/decipher-tunnel
```
## Step 2: Authenticate
Run the login command in your terminal:
```bash theme={null}
decipher-tunnel login
```
Your browser will open to the Decipher dashboard.
The dashboard displays a one-time authentication token. Click the copy button to copy it to your clipboard.
Switch back to your terminal and paste the token when prompted. You'll see a success message confirming you're logged in.
## Step 3: Start a Tunnel
Make sure your app is running locally. For example:
```bash theme={null}
npm run dev
```
Confirm it's accessible at `http://localhost:3000` (or whichever port you use).
In a separate terminal window, run:
```bash theme={null}
decipher-tunnel forward -p 3000
```
Replace `3000` with your local server's port. The CLI will start the tunnel and display your public URL:
```
https://{userId}.tunnel.getdecipher.com
```
Incoming requests are logged in real-time so you can see test traffic as it arrives.
Press **Ctrl+C** in the terminal to stop the tunnel, or run:
```bash theme={null}
decipher-tunnel kill
```
## Step 4: Use the Tunnel URL in Decipher
Once your tunnel is running, use the public URL as the **Base URL** when recording or running tests in the Decipher dashboard. Any test pointed at that URL will hit your local server through the tunnel.
Your tunnel URL is stable — it stays the same every time you run `decipher-tunnel forward`, so you don't need to update your tests each session.
## CLI Reference
| Command | Description |
| ----------------------------------- | -------------------------------------- |
| `decipher-tunnel login` | Authenticate with Decipher |
| `decipher-tunnel logout` | Revoke stored credentials |
| `decipher-tunnel forward -p ` | Start a tunnel to the given local port |
| `decipher-tunnel me` | Show the currently authenticated user |
| `decipher-tunnel list` | Show the active tunnel |
| `decipher-tunnel kill` | Stop the active tunnel |
## Troubleshooting
Only one tunnel can be active at a time. Stop the existing tunnel first:
```bash theme={null}
decipher-tunnel kill
```
Then start a new one with `decipher-tunnel forward -p `.
Your session may have expired. Log in again:
```bash theme={null}
decipher-tunnel login
```
If the issue persists, log out first and then log back in:
```bash theme={null}
decipher-tunnel logout
decipher-tunnel login
```
This usually means your local dev server isn't running. Make sure your app is started and accessible at the port you forwarded before sending traffic through the tunnel.
***
*Need help? [Contact our support team](mailto:team@getdecipher.com).*
# Owners
Source: https://docs.getdecipher.com/pages/features/testing/owners
Assign ownership to tests and suites for accountability and Slack notifications
Owners let you assign team members to tests and suites. When a test fails, owners can be automatically @mentioned in Slack—so the right person is notified immediately.
## Assigning Owners
### On a Suite
Suite owners apply to all tests in the suite (unless a test has its own owners).
1. Go to the **Tests** page
2. Find the suite in the sidebar and click the **⋯** menu
3. Select **Edit Suite**
4. Choose owners from the dropdown
5. Click **Save**
### On a Test
You can also manage owners from within a test's settings. This lets you either set custom owners for that specific test, or update the suite's owners (which applies to all tests in the suite).
1. Open a test and click **Configure** (or use the **⋯** menu → Settings)
2. In the Owners section, select team members
3. Choose how to save:
* **Update just this test** — sets custom owners for this test only, overriding the suite
* **Update all tests in suite** — updates the suite's owners, affecting all tests that inherit
4. Click **Save**
To restore a test to its suite's owners, click **Revert to suite owners** in the test settings.
## How Inheritance Works
Tests inherit their owners from their suite by default. This means:
* Changing a suite's owners automatically updates all tests that inherit from it
* You can override inheritance by choosing **Update just this test** when setting owners
* You can revert a test back to inheriting at any time
## Getting Notified in Slack
When creating a test alert, enable **Mention owners** to @mention test owners in Slack when failures occur.
1. Go to **Alerts** and create or edit a Test Alert
2. Enable the **Mention owners** option
3. When a test fails, owners are @mentioned in the Slack notification
For this to work, owners must have Slack accounts with matching email addresses in your connected workspace.
# Custom Host Headers
Source: https://docs.getdecipher.com/pages/features/testing/preview-auth-headers
Bypass authentication on preview deployments by injecting custom HTTP headers
Custom Host Headers let you inject custom HTTP headers when
Decipher's test runner visits URLs that match a given hostname. This is
useful for bypassing authentication on preview deployments — for example,
Vercel's deployment protection.
## How Hostname Matching Works
Decipher matches hostnames using **subdomain matching**. When you add a
hostname like `vercel.app`, it will match any URL whose host ends with
that value — for example `my-app-git-feat-acme.vercel.app`.
This means you only need one entry per hosting provider, not one per
preview URL.
## Setting Up Custom Host Headers
1. Go to [**Settings > Testing Headers**](https://app.getdecipher.com/settings?section=testing-headers)
2. Under **Custom Host Headers**, click **Add Hostname**
3. Enter the hostname to match (e.g., `vercel.app`)
4. Add one or more HTTP headers as key-value pairs
5. Click **Save**
Any test that navigates to a matching URL will automatically include the
configured headers in its requests.
## Vercel Example
Vercel's [Deployment Protection](https://vercel.com/docs/deployment-protection)
blocks unauthenticated access to preview deployments. You can bypass it
by sending a secret header.
### Step 1 — Get your bypass secret
1. Open your Vercel project's **Settings > Deployment Protection**
2. Under **Protection Bypass for Automation**, copy the secret value
### Step 2 — Add the hostname and header in Decipher
1. In Decipher, go to [**Settings > Testing Headers**](https://app.getdecipher.com/settings?section=testing-headers) and find **Custom Host Headers**
2. Click **Add Hostname** and enter `vercel.app`
3. Add a header:
* **Key:** `x-vercel-protection-bypass`
* **Value:** the secret you copied from Vercel
4. Click **Save**
Decipher's test runner automatically injects the companion header
`x-vercel-set-bypass-cookie: samesitenone` alongside your bypass header
so the protection cookie works correctly across navigations.
## Custom Script
Sometimes static HTTP headers aren't enough — for example, when you need
to compute an HMAC signature, attach a rotating token, or dynamically
modify requests at runtime. **Custom Script** lets you write a JavaScript
snippet that runs in the browser before any page scripts on every page
load during a test.
### When It Runs
Whenever a test navigates to a URL whose host matches the configured
hostname, the script is injected and executed **before** the page's own
scripts run. This happens on every navigation (initial load, client-side
route change, or redirect) to the matching host.
### What It Has Access To
The script runs in the page's browser context, so it has access to all
standard browser APIs:
* `window` and `document`
* `fetch` and `XMLHttpRequest`
* `localStorage` and `sessionStorage`
* Cookies via `document.cookie`
### Setting Up a Custom Script
1. Go to [**Settings > Testing Headers**](https://app.getdecipher.com/settings?section=testing-headers)
2. Under **Custom Host Headers**, click **Add Hostname** (or edit an existing one)
3. Write your JavaScript in the **Custom Script** editor
4. Click **Save**
### Example — Injecting a Header into Every Fetch Request
```javascript theme={null}
const originalFetch = window.fetch;
window.fetch = function (...args) {
let [resource, config] = args;
config = config || {};
config.headers = {
...config.headers,
"my-header": "my-value",
};
return originalFetch(resource, config);
};
```
Custom Script and HTTP headers can be used together on the same
hostname. HTTP headers are added to every outgoing request at the network
level, while the custom script runs in the page's JavaScript context.
# Run in Local Browser
Source: https://docs.getdecipher.com/pages/features/testing/run-locally
Execute a recorded Decipher test against a local Chromium browser using the decipher-qa CLI
Under the hood, `decipher-qa test run-cdp` connects to a Chrome DevTools Protocol (CDP) endpoint — either a Chromium instance it launches for you via `decipher-browser`, or an external browser you point it at.
**Prerequisites:**
* Node.js 18 or later
* A [Decipher account](https://app.getdecipher.com) with at least one recorded test
* The numeric test ID you want to run (visible in the URL on the test's page)
## Step 1: Install the CLIs
You'll need two packages — the `decipher-qa` CLI and the `decipher-browser` launcher. Install both globally:
```bash npm theme={null}
npm install -g @decipher-sdk/decipher-qa @decipher-sdk/decipher-browser
```
```bash yarn theme={null}
yarn global add @decipher-sdk/decipher-qa @decipher-sdk/decipher-browser
```
```bash pnpm theme={null}
pnpm add -g @decipher-sdk/decipher-qa @decipher-sdk/decipher-browser
```
```bash bun theme={null}
bun add -g @decipher-sdk/decipher-qa @decipher-sdk/decipher-browser
```
`decipher-browser` downloads Chromium via Playwright on install, so the first install can take a minute. If the download is skipped by your package manager, you can run it manually with `npx playwright install chromium`.
## Step 2: Authenticate
Copy it from [app.getdecipher.com/settings?section=api-keys](https://app.getdecipher.com/settings?section=api-keys).
```bash CI/CD (non-interactive) theme={null}
decipher-qa login --token $DECIPHER_API_TOKEN
```
```bash Interactive theme={null}
decipher-qa login
```
The token is saved to `~/.decipher/qa-config.json` — you only need to do this once per machine.
```bash theme={null}
decipher-qa whoami
```
## Step 3: Run a Test
The simplest invocation launches a headless Chromium, runs the test, and streams progress to your terminal:
```bash theme={null}
decipher-qa test run-cdp --testId 1522
```
Replace `1522` with your own test ID. The CLI exits `0` on pass and `1` on fail, so it drops straight into CI scripts.
Up to **20 local browsers** can run concurrently per account. Additional runs will return a `429 Too Many Requests` error — retry once a slot frees up.
### Common flags
```bash Target a preview/staging URL theme={null}
decipher-qa test run-cdp --testId 1522 --origin http://localhost:3000
```
```bash Show the browser window theme={null}
decipher-qa test run-cdp --testId 1522 --headful
```
```bash Use your own browser theme={null}
decipher-qa test run-cdp --testId 1522 --cdp ws://127.0.0.1:9222/devtools/browser/
```
```bash Verbose event stream theme={null}
decipher-qa test run-cdp --testId 1522 --verbose
```
**`--cdp`** — accepts any `ws://` or `wss://` CDP endpoint. Launch Chrome with `--remote-debugging-port=9222` or use Playwright/Puppeteer to expose one. Omit this flag and the CLI spawns `decipher-browser launch` for you, reads its CDP URL from stdout, and cleans up on exit.
**`--origin`** — redirects your test at a different environment (prod, staging, `localhost`) without re-recording.
* Rewrites `goto` steps and the identity login URL whose origin matches the test's primary origin (the first `goto` in the recording).
* Path, query, and hash are preserved.
* Third-party hosts (e.g. auth redirects) are left alone.
## Sample Output
Each step prints its description, a `✓` (or `✗`) marker, and the footer gives you a quick pass/fail verdict plus total elapsed wall-clock time.
```
Step 1: Log in as john@doe.com
✓ step passed
Step 2: http://localhost:3003
✓ step passed
Step 3: Click the theme toggle button in the top-left of the sidebar
✓ step passed
Step 4: Click "Dark" from the dropdown menu
✓ step passed
Step 5: The page background has changed to a dark color scheme
✓ step passed
Step 6: Dark mode is active, indicated by a dark background and light text
✓ step passed
Step 7: Click the theme toggle button in the sidebar
✓ step passed
Step 8: Click "Light" from the dropdown menu
✓ step passed
Step 9: The page background has changed to a light color scheme
✓ step passed
----------------------------------------------
PASSED · 9 steps · 127s
```
## Running Programmatically
Need to call this from a script, test suite, or custom CI runner? Both wrappers spawn the CLI and return a typed `{ status, duration, runId, runUrl }` result:
* **[TypeScript Wrapper](/pages/features/testing/run-locally-wrapper)** — for Node scripts, Vitest/Jest suites, or TS-based CI runners.
* **[Python Wrapper](/pages/features/testing/run-locally-python)** — for Python scripts, pytest suites, or Python-based CI runners.
## CLI Reference
### `decipher-qa test run-cdp`
| Flag | Description |
| ---------------- | ------------------------------------------------------------------------------------------------------------------------------------- |
| `--testId ` | Required. Positive integer test ID |
| `--cdp ` | CDP websocket URL (`ws://` or `wss://`). Omit to auto-launch a local Chromium via `decipher-browser` |
| `--headful` | Show the local Chromium window. Only applies when `--cdp` is omitted |
| `--origin ` | Override origin for `goto` steps and the identity login URL whose origin matches the test's primary origin. Path/query/hash preserved |
| `--verbose` | Print every SSE event and phase (noisy, useful for debugging the agent) |
### `decipher-browser launch`
| Flag | Description |
| ------------------ | -------------------------------------------- |
| `--headful` | Show the Chromium window (default: headless) |
| `--viewport ` | Viewport size, e.g. `1920x1080` |
## Troubleshooting
The global install didn't put the binary on your `PATH`. Reinstall globally and confirm your package manager's global bin directory is on `PATH`:
```bash theme={null}
npm install -g @decipher-sdk/decipher-browser
npm root -g # shows where globals live
decipher-browser --help
```
On macOS/Linux, make sure `$(npm root -g)/../bin` is in your `PATH`.
`decipher-browser` relies on Playwright's Chromium download. If the postinstall hook was skipped (common with `--ignore-scripts` or some CI caches), install it manually:
```bash theme={null}
npx playwright install chromium
```
Your token may be expired or missing. Re-authenticate:
```bash theme={null}
decipher-qa login
```
Grab a fresh token from [app.getdecipher.com/settings?section=api-keys](https://app.getdecipher.com/settings?section=api-keys).
The CLI validates the CDP URL up front. Some browsers expose an `http://localhost:9222/json/version` endpoint whose `webSocketDebuggerUrl` field contains the actual `ws://` URL you want to pass in.
This almost always means the CLI crashed before it could talk to our API. Re-run with `--verbose` to see the raw event stream, and double-check that `decipher-qa whoami` still succeeds.
***
*Need help? [Contact our support team](mailto:team@getdecipher.com).*
# Python Wrapper
Source: https://docs.getdecipher.com/pages/features/testing/run-locally-python
Run decipher-qa test run-cdp programmatically from a Python script, pytest suite, or custom CI runner
Spawn the `decipher-qa` CLI as a subprocess and parse its final result block. Below is a copy-pasteable reference implementation.
This is **boilerplate** — a thin wrapper around the CLI to get you started. Fork it, rename the functions, add retry logic, wire it into pytest fixtures, emit your own telemetry — whatever fits your pipeline. The CLI is the contract; the wrapper is just convenience.
## The Runner
The CLI prints a final `=== RESULT ===` block with the run summary as JSON. The runner spawns the process, streams its output, and parses that block on exit.
**`decipher_qa_runner.py`**
```python theme={null}
import json
import re
import subprocess
import sys
from dataclasses import dataclass
from typing import Literal, Optional
TestRunStatus = Literal["passed", "failed", "failed_internal"]
_ANSI_RE = re.compile(r"\x1b\[[0-9;]*m")
_RESULT_MARKER = "=== RESULT ==="
@dataclass
class RunTestResult:
status: TestRunStatus
duration: int # milliseconds
run_id: int
run_url: str
def run_decipher_qa_test(
test_id: int,
*,
cdp_url: Optional[str] = None,
headful: bool = False,
origin: Optional[str] = None,
stream: bool = True,
) -> RunTestResult:
args = ["decipher-qa", "test", "run-cdp", "--testId", str(test_id)]
if cdp_url:
args += ["--cdp", cdp_url]
if headful:
args.append("--headful")
if origin:
args += ["--origin", origin]
process = subprocess.Popen(
args,
stdout=subprocess.PIPE,
stderr=subprocess.STDOUT,
text=True,
bufsize=1,
)
captured: list[str] = []
assert process.stdout is not None
for line in process.stdout:
if stream:
sys.stdout.write(line)
sys.stdout.flush()
captured.append(line)
process.wait()
clean = _ANSI_RE.sub("", "".join(captured))
marker = clean.rfind(_RESULT_MARKER)
if marker == -1:
raise RuntimeError("decipher-qa exited without a result block")
payload = clean[marker + len(_RESULT_MARKER) :].strip()
data = json.loads(payload)
return RunTestResult(
status=data["status"],
duration=data["duration"],
run_id=data["runId"],
run_url=data["runUrl"],
)
```
## Example Script
Here's a self-contained script that runs test `1522` against a local headful Chromium and logs the result. Swap in your own `test_id` and options:
```python theme={null}
from decipher_qa_runner import run_decipher_qa_test
def main() -> None:
result = run_decipher_qa_test(
test_id=1522,
headful=True,
origin="https://staging.myapp.com",
stream=True,
)
print("\n=== RESULT ===")
print(result)
if result.status != "passed":
raise SystemExit(1)
if __name__ == "__main__":
main()
```
## Usage
```bash theme={null}
python run_test.py
```
You'll get a streaming view of the run followed by the parsed result:
```
RunTestResult(status='passed', duration=127000, run_id=48291, run_url='https://app.getdecipher.com/tests/1522/runs/48291')
```
The process exits `0` on pass and `1` on fail, so it slots into any CI pipeline that already expects conventional exit codes.
***
*Need help? [Contact our support team](mailto:team@getdecipher.com).*
# TypeScript Wrapper
Source: https://docs.getdecipher.com/pages/features/testing/run-locally-wrapper
Run decipher-qa test run-cdp programmatically from a Node script, test suite, or custom CI runner
Spawn the `decipher-qa` CLI as a child process and parse its final result block. Below is a copy-pasteable reference implementation.
This is **boilerplate** — a thin wrapper around the CLI to get you started. Fork it, rename the functions, add retry logic, wire it into your test framework, emit your own telemetry — whatever fits your pipeline. The CLI is the contract; the wrapper is just convenience.
## The Runner
The CLI prints a final `=== RESULT ===` block with the run summary as JSON. The runner spawns the process, streams its output, and parses that block on exit.
**`decipher-qa-runner.ts`**
```typescript theme={null}
import { spawn } from "child_process";
export type TestRunStatus = "passed" | "failed" | "failed_internal";
export interface RunTestResult {
status: TestRunStatus;
duration: number; // milliseconds
runId: number;
runUrl: string;
}
export interface RunOptions {
testId: number;
cdpUrl?: string;
headful?: boolean;
origin?: string;
stream?: boolean; // default true — pipe CLI output to your terminal
}
export function runDecipherQaTest(opts: RunOptions): Promise {
const args = ["test", "run-cdp", "--testId", String(opts.testId)];
if (opts.cdpUrl) args.push("--cdp", opts.cdpUrl);
if (opts.headful) args.push("--headful");
if (opts.origin) args.push("--origin", opts.origin);
const child = spawn("decipher-qa", args, {
stdio: ["ignore", "pipe", "pipe"],
});
const streaming = opts.stream !== false;
let stdout = "";
child.stdout!.on("data", (chunk: Buffer) => {
if (streaming) process.stdout.write(chunk);
stdout += chunk.toString("utf8");
});
child.stderr!.on("data", (chunk: Buffer) => {
if (streaming) process.stderr.write(chunk);
});
return new Promise((resolve, reject) => {
child.on("error", reject);
child.on("close", () => {
const clean = stdout.replace(/\x1b\[[0-9;]*m/g, "");
const marker = clean.lastIndexOf("=== RESULT ===");
if (marker === -1) {
return reject(new Error("decipher-qa exited without a result block"));
}
try {
const json = clean.slice(marker + "=== RESULT ===".length).trim();
resolve(JSON.parse(json) as RunTestResult);
} catch (err) {
reject(new Error(`Failed to parse decipher-qa result: ${(err as Error).message}`));
}
});
});
}
```
## Example Script
Here's a self-contained script that runs test `1522` against a local headful Chromium and logs the result. Swap in your own `testId` and options:
```typescript theme={null}
import { runDecipherQaTest } from "./decipher-qa-runner";
async function main() {
const result = await runDecipherQaTest({
testId: 1522,
headful: true,
origin: "https://staging.myapp.com",
stream: true,
});
console.log("\n=== RESULT ===");
console.log(JSON.stringify(result, null, 2));
if (result.status !== "passed") {
console.error(`Test failed: ${result.error ?? "unknown error"}`);
process.exit(1);
}
}
main().catch((err) => {
console.error(err);
process.exit(1);
});
```
## Usage
Run it with `tsx` (or compile and run with `node`):
```bash theme={null}
npx tsx run-test.ts
```
You'll get a streaming view of the run followed by a JSON summary:
```json theme={null}
{
"status": "passed",
"duration": 127000,
"runId": 48291,
"runUrl": "https://app.getdecipher.com/tests/1522/runs/48291"
}
```
The process exits `0` on pass and `1` on fail, so it slots into any CI pipeline that already expects conventional exit codes.
***
*Need help? [Contact our support team](mailto:team@getdecipher.com).*
# Step Types
Source: https://docs.getdecipher.com/pages/features/testing/step-types
Understand the different step types available in Decipher tests
Every Decipher test is a sequence of steps. Each step has a type that determines what it does during a test run.
Each step performs **one action**. To test a multi-part interaction (e.g., click a field, then type into it), use multiple steps.
## Action
The most common step type. An action step performs a single user interaction on the page.
Supported action types:
| Action | Description |
| ---------- | -------------------------------- |
| **Click** | Click on an element |
| **Fill** | Type text into an input field |
| **Hover** | Hover over an element |
| **Press** | Press a keyboard key or shortcut |
| **Upload** | Upload a file to a file input |
Each action step includes a natural-language description of the target element (e.g., "Click the Submit button") and the selectors Decipher uses to locate it on the page.
## Navigate
A navigate step goes to a specific URL. Use this to start a test on a particular page or to jump to a different part of your application mid-test.
## Wait
A wait step pauses the test for a specified duration. This is useful when you need to wait for an animation, a background process, or a delayed API response before continuing.
The default wait duration is 5 seconds.
## Assert
An assert step verifies that something is true on the page — for example, that a success message is visible or that a specific element exists. If the assertion fails, the test fails.
Assert steps wait up to 2 seconds by default for the condition to become true before failing.
## Upload
An upload step attaches one or more files to a file input on the page. See [File Uploads](/pages/features/testing/file-uploads) for details on supported file types and size limits.
## Code Execution
A code execution step runs custom JavaScript in the browser. Use this for API calls, data setup, or interactions that aren't possible through standard step types. Code steps can be added during Chrome extension recording or in edit mode. See [Code Execution](/pages/features/testing/code-execution) for details.
## Conditional
A conditional step checks a condition and then performs an action based on the result. It has two parts:
* **If** — The condition to check (e.g., "a cookie banner is visible")
* **Then** — The action to take if the condition is true (e.g., "click the Accept button")
If the condition is not met, the step is skipped and the test continues. This is useful for handling elements that may or may not appear, like cookie banners, popups, or A/B test variations.
## Rules
* **One action per step** — Each step performs exactly one interaction. Break multi-part interactions into separate steps.
* **Assertions don't count as actions** — Assert steps validate state but don't interact with the page.
* **Conditionals are non-blocking** — If the condition isn't met, the test moves on to the next step without failing.
# Test Suites & Tags
Source: https://docs.getdecipher.com/pages/features/testing/suites
Organize and schedule related tests together
Test suites and tags help you organize your tests.
## Creating a Test Suite
1. Go to the [**Tests**](https://app.getdecipher.com/tests) page
2. Click **New Suite**
3. Enter a suite name (e.g., "Smoke Tests", "Critical User Flows", "Checkout Tests")
4. Configure the run schedule:
* Every 30 minutes
* Every hour
* Every 3 hours
* Every 12 hours
* Every 24 hours
5. Click **Create Suite**
## Adding Tests to a Suite
When creating or editing a test, use the **Suite** dropdown to assign it to a suite. Tests in the same suite will:
* Run together on the configured schedule
* Be grouped together in the dashboard
* Share scheduling and notification settings
## Managing Suites
From the Tests dashboard, you can:
* View all tests grouped by suite
* Update suite run schedules
* Delete suites (tests will remain but become unassigned)
* See the last run time and status for each suite
Organize suites by priority or functionality. For example, create a "Critical Flows" suite that runs every 30 minutes, and a "Full Regression" suite that runs daily.
## Tags
Tags let you label and filter tests across suites.
### Adding Tags
1. Click **Configure** on the test page, or use the **⋯** menu on a test row
2. In the Tags section, type a tag name and press **Enter**, or select from existing tags
3. Click **Save Changes**
As you type, you'll see suggestions from tags already used in your organization.
### Common Tag Patterns
* **By priority**: `critical`, `p1`, `p2`
* **By feature**: `checkout`, `auth`, `dashboard`
* **By type**: `smoke`, `regression`, `e2e`
# Test Failures
Source: https://docs.getdecipher.com/pages/features/testing/test-failures
Understanding when tests fail and what data you receive
When a test runs, Decipher executes each step and tracks whether it succeeds or fails. This page explains when a test is marked as failed and what information you get to help diagnose the issue.
## When a Test Fails
A test is marked as **failed** when any step does not complete successfully. This includes:
* **Element not found** - The target element (button, input, link) couldn't be located on the page
* **Action failed** - A click, type, or other interaction didn't produce the expected result
* **Assertion failed** - A validation check didn't pass (e.g., expected text wasn't present)
## Failure Data
Each test run captures detailed information to help you understand what went wrong:
### Screenshots
* Screenshot taken at each step
* Final screenshot showing the state when failure occurred
* Visual comparison to identify UI changes
### Logs
* Console logs from the browser
* Network request logs
### Step Details
* Which step failed and why
* Time taken for each step
### Session Recording
* Full video replay of the test execution
* See exactly what happened leading up to the failure
## Viewing Failure Information
1. Go to your [Tests dashboard](https://app.getdecipher.com/tests)
2. Click on a failed test run
3. Review the step-by-step breakdown
4. Click on the failed step to see detailed logs and screenshots
Use the session recording to watch the test execution in real-time. This often reveals issues that aren't obvious from logs alone.
## Suggested Fixes
When a test fails because your product has changed — for example, a UI was refreshed, page elements were moved or renamed, or underlying data became stale — Decipher automatically self-heals simple step failures without any action needed from you. For more involved changes, Decipher suggests specific fixes to bring the test back in sync with the current state of your application.
To view suggested fixes, expand the **Suggested Fixes** section on a failed test run.
To apply a fix, click **Apply** on the suggestion. You can also select multiple fixes and click **Apply Selected** to queue them all at once. Applied fixes automatically update your test steps.
***
*Need help? [Contact our support team](mailto:team@getdecipher.com).*
# Updating Tests
Source: https://docs.getdecipher.com/pages/features/testing/updating-tests
Modify existing tests using Edit Mode
## Edit Mode
To modify an existing test:
1. Open a test from your [Tests dashboard](https://app.getdecipher.com/tests/suite)
2. Click **Edit Mode**
3. Change any existing step or add new ones
4. Save your changes
## Asking for Changes
Request modifications to existing tests using natural language.
1. Open a test from your [Tests dashboard](https://app.getdecipher.com/tests/suite)
2. In the **Change Request** panel, describe what you want to change
3. Reference specific steps using `@step1`, `@step2`, etc.
4. Click **Submit Change**
The system processes your request and shows a before/after comparison when complete.
**Example requests:**
* "Make @step3 wait longer for the button to appear"
* "Update @step1 and @step5 to use the new login form"
* "Add an assertion after @step2 to check the error message"
Type `@` to see a dropdown of available steps. Use Shift+Enter for new lines.
## Change Status
Changes go through these stages:
| Status | Description |
| --------------- | ------------------------------------ |
| **Pending** | Queued for processing |
| **In Progress** | Currently being modified |
| **Completed** | Ready to review |
| **Failed** | Unable to process (review the error) |
Click on a completed change to see the step-by-step diff.
# Variables
Source: https://docs.getdecipher.com/pages/features/testing/variables
Use dynamic values in your test steps
Variables allow you to insert dynamic values into your test steps. This is useful when tests need unique data for each run—like generating a unique email address or username.
## Available Variables
| Variable | Description | Example Output |
| ------------ | ------------------------- | --------------- |
| `{{unique}}` | Generates a unique number | `1736875200000` |
More variables are coming soon. Check back for updates on additional dynamic values you can use in your tests.
## How to Use Variables
Add variables directly in any input field during test creation:
* When filling out test details, include the variable in any text input
* Example: Enter `testuser_{{unique}}@example.com` as an email address
## Adding Variables in Edit Mode
You can also add variables to existing tests:
1. Open your test and click **Edit Mode**
2. Edit any step to include a variable in the input field
3. Save your changes
## Example Use Cases
* **Unique email addresses:** `signup_{{unique}}@test.com`
* **Unique usernames:** `user_{{unique}}`
* **Unique form data:** `Order #{{unique}}`
# Users & Accounts
Source: https://docs.getdecipher.com/pages/features/users-accounts
Analyze user behavior and account-level insights with comprehensive filtering and AI-powered summaries.
> Make sure you've [identified users](/pages/advanced/users) in your application before using this feature.
## Overview
The Users & Accounts feature provides a comprehensive view of user behavior and account-level insights in your application. Access it from the [Users page](https://app.getdecipher.com/users) in your Decipher dashboard.
## Users & Accounts overview
You’ll see two tabs at the top of the page:
### Users tab
Shows individual people with roll‑up activity. Columns include:
| Column | Description |
| ------------- | ----------------------------------------- |
| Email | User’s email address (primary identifier) |
| Account | Associated account/organization name |
| Last Active | When the user was last seen |
| Clicks | Total clicks recorded |
| Sessions | Total sessions captured |
| Severe Issues | Count of critical issues encountered |
| Country | User’s geographic location |
| AI Summary | AI description of user behavior patterns |
### Accounts tab
Shows organizations or accounts with aggregated metrics:
| Column | Description |
| ------------- | ---------------------------------------- |
| Account Name | Organization or account identifier |
| Total Users | Number of users in the account |
| Clicks | Combined clicks across account users |
| Sessions | Total sessions for the account |
| Severe Issues | Aggregate severe issues count |
| Last Active | Most recent activity time in the account |
Both tabs support:
* **Search functionality** with debounced input
* **Infinite scroll loading** (20 items per page)
* **Column sorting** (ascending/descending)
## Filtering Options
| Filter | Where | Description |
| -------------------- | ---------------- | ----------------------------------------------------------------- |
| Timeframe | Users & Accounts | Last 24 hours, 7 days, or 30 days |
| Range: Clicks | Users & Accounts | Filter by min/max clicks |
| Range: Sessions | Users & Accounts | Filter by min/max sessions |
| Range: Severe Issues | Users & Accounts | Filter by min/max severe issues |
| Account | Users only | Limit users to a single account |
| Smart Events | Users only | Filter by AI‑detected behaviors with greater/less than thresholds |
Sorting is available on all table columns (ascending/descending).
## User detail page
Click any user to open `/user/[email]`:
* Email and basic metadata
* First seen (relative timestamp)
* All session replays for this user (already filtered)
* Timestamps, durations, and AI‑generated summaries
* Issues encountered by this user
* Click into an issue to watch the related session
* Top Pages: most‑visited pages (30‑day window) with hierarchical grouping and visit %
* Customer Deep Research (AI): ask natural‑language questions about this user’s behavior across sessions
## Account detail page
Click any account to open `/account/[name]`:
* Replays scoped to this account
* Same replay tooling as the main replays page
* Issues scoped to this account
* Top Pages (Account): top pages used by users in the account, with unique users and visit %
* Account Deep Research (AI): ask questions about the account’s behavior across its users
# Welcome to Decipher
Source: https://docs.getdecipher.com/pages/introduction/intro
AI-powered testing and monitoring for modern web applications
## Testing
Build and maintain automated tests with AI assistance.
Record user flows and generate automated tests
Use dynamic values like unique numbers in test steps
Organize and schedule related tests together
Create reusable login profiles for authenticated flows
Generate, run, and fix end-to-end tests from Claude Code
## Monitoring
Track errors, set up alerts, and view detailed logs.
Install Decipher and start capturing errors and user behavior
Catch and debug errors with full context
Get notified when critical issues affect your users
Capture and view console logs alongside recordings
## User Behavior
Understand how users interact with your application.
AI-detected user behaviors and patterns
Track and analyze key performance indicators
Analyze user behavior and account-level insights
## Advanced
Tag users and accounts to track specific segments
Add metadata to sessions for better filtering and organization
***
Our team is here to help you get the most out of Decipher
# Integrating Decipher with Sentry
Source: https://docs.getdecipher.com/pages/migrations/coming-from-sentry
If you're already using Sentry, setting up Decipher AI is a 1-line change and you'll still be able to use Sentry.
**⏱ Estimated Time To Completion: 2 minutes**
Log in to [Decipher](https://app.getdecipher.com) with your work email. On the [Settings > Projects](https://app.getdecipher.com/settings?section=projects) page, choose a project name and click **"Create New Project"**.
We auto-create a Decipher-only project called "FirstFrontendProject" when your organization registers with Decipher, but that is separate from the Sentry project you're about to add.
On the following screen, decide where you want to send data. We recommend choosing **Decipher** only to avoid double charges.
Sending data only to Decipher is the recommended option for many as it:
* Avoids duplicate charges from multiple providers
* Provides all the functionality you need in one place
* Simplifies your monitoring footprint
Decipher will give you a new `dsn` to copy and paste in the following step.
Sending data to both Decipher and Sentry requires your existing Sentry DSN and may result in charges from both services.
To get your existing Sentry DSN, look for the value of the `dsn` parameter in your codebase's call to `Sentry.init`.
On the next screen, enter your Sentry DSN. Then click "Add this project".
Your Sentry DSN is only used to compute your Decipher DSN which you'll use in the next step, and while your Sentry DSN is [public](https://docs.sentry.io/concepts/key-terms/dsn-explainer/#dsn-utilization), Decipher never stores it.
Decipher will create a new project with a dedicated new DSN for you.
Using this new DSN will result in data being sent to both Decipher and Sentry.
Update your `instrumentation-client.ts` to use your new `dsn` and **`make sure replayIntegration and replaysSessionSampleRate are set`**.
Additionally, update `sentry.edge.config.ts`, and `sentry.server.config.ts` files to use your new `dsn`.
On older `@sentry/nextjs` versions update your `sentry.client.config.ts` instead of `instrumentation-client.ts`.
```typescript instrumentation-client.ts | sentry.client.config.ts theme={null}
Sentry.init({
dsn: "YOUR_DSN_FROM_DECIPHER", // Get this at https://app.getdecipher.com/settings?section=projects
integrations: [
Sentry.replayIntegration({
maskAllText: false,
blockAllMedia: false,
maskAllInputs: true,
networkDetailAllowUrls: [/^.*$/],
}),
// You can optionally specify log levels (see further docs)
Sentry.captureConsoleIntegration(),
Sentry.browserTracingIntegration(),
],
replaysOnErrorSampleRate: 1.0,
replaysSessionSampleRate: 1.0,
});
```
```typescript instrumentation.ts | sentry.[edge|server].config.ts theme={null}
// Update DSN in both sentry.edge.config.ts and sentry.server.config.ts.
Sentry.init({
dsn: "YOUR_DSN_FROM_STEP_1", // Get this at https://app.getdecipher.com/settings?section=projects
// ...other config
});
```
In your codebase, update the line that sets the `dsn` field of your existing Sentry initialization to use the new value you got from Step 1, and ensure that `replayIntegration` and `replaysSessionSampleRate` are set.
For example:
```typescript theme={null}
Sentry.init({
dsn: "YOUR_DSN_FROM_DECIPHER", // Get this at https://app.getdecipher.com/settings?section=projects
integrations: [
Sentry.replayIntegration({
maskAllText: false,
blockAllMedia: false,
maskAllInputs: true,
networkDetailAllowUrls: [/^.*$/],
}),
// You can optionally specify log levels (see further docs)
Sentry.captureConsoleIntegration(),
Sentry.browserTracingIntegration(),
],
replaysOnErrorSampleRate: 1.0,
replaysSessionSampleRate: 1.0,
});
```
If you aren't already doing this, make sure to identify users **where user information is available in your application frontend**, typically after authentication or login.
```typescript theme={null}
// Set user information in Decipher via the Sentry TypeScript SDK
Sentry.setUser({
"email": "jane.doe@example.com", // Recommended identifier to set
"id": "your_internal_unique_identifier", // Optional: use if email not available
"username": "unique_username", // Optional: use if email not available
"account": "AcmeCo", // Recommended: Which account/organization is this user a member of?
"created_at": "2025-04-01T15:30:00Z", // Recommended: date this user signed up.
// You can add more user information here as key/value pairs.
});
```
Once you're done, simply use your website to validate that Decipher is collecting session replay data (and that Sentry is too, if you selected that option).