From test run to heatmap in 10 minutes.

No Instrumentation Required

Playwright Test 1.50+ (Node 18+) • Selenium 4.x (Node.js bindings, Node 18+) • Cypress 14–15
PART 1 — UI COVERAGE (10 MIN)

The heatmap goes live.

Five steps. Works with the Playwright, Selenium or Cypress tests you already have.

Step #1

Create your workspace
Go to https://testmap.cloud/signup.
Choose a workspace name using lowercase letters, digits, and hyphens. It must be 3–63 characters long.
Your workspace will become: <name>.testmap.cloud
Enter your workspace name and work email.
Open the verification link sent to your email, set your owner password (8+ characters), and activate your workspace.
Note: The verification link expires after one hour. If it expires, email support@appsurify.com using the same email address to reactivate it.

Step #2

Create a project
Sign in to your workspace: <name>.testmap.cloud
Click + in the Projects sidebar.
Enter a project name.
Important: CI uploads are matched by the exact project name, including case. Choose a name you will not need to rename.

Step #3

Install the plugin for your framework:

BASH
npm i -D @appsurify-testmap/rrweb-playwright-plugin

Add the reporter to the reporters you already have in playwright.config.ts (do not replace them).

Reports are written to test-results/playwright/ui unless you set outputReportDir:

TYPESCRIPT
export default defineConfig({
   reporter: [
     ['list'],
     ['@appsurify-testmap/rrweb-playwright-plugin/reporter'],
   ],
   use: {
     testmap: { outputReportDir: 'test-results/playwright/ui' }, // optional
   },
 });

In every spec file, import test and expect from the plugin instead of @playwright/test.

If you have your own fixtures via test.extend, extend the plugin’s test. Only tests that use the page fixture are recorded.

TYPESCRIPT
import { test, expect } from '@appsurify-testmap/rrweb-playwright-plugin';

Note: Do not pass --reporter=… on the command line. It replaces the config reporters and no report archive is produced.

BASH
npm i -D @appsurify-testmap/rrweb-selenium-plugin selenium-webdriver

Wrap the driver once:

JAVASCRIPT
import { attach } from '@appsurify-testmap/rrweb-selenium-plugin';
const driver = attach(await new Builder().forBrowser('chrome').build());
// or, once for every Builder: enableAutoAttach(Builder)

Then register the plugin with your test runner:

Mocha

JAVASCRIPT
require: [
  '@appsurify-testmap/rrweb-selenium-plugin/mocha'
]

Jest

JAVASCRIPT
globalSetup: '@appsurify-testmap/rrweb-selenium-plugin/jest-setup',

setupFilesAfterEnv: [
  '@appsurify-testmap/rrweb-selenium-plugin/jest',
],

globalTeardown: '@appsurify-testmap/rrweb-selenium-plugin/jest-teardown'

Vitest

JAVASCRIPT
test: {
  globals: true,
  setupFiles: ['@appsurify-testmap/rrweb-selenium-plugin/vitest'],
  globalSetup: ['@appsurify-testmap/rrweb-selenium-plugin/vitest-teardown'],
}

node:test

BASH
--import @appsurify-testmap/rrweb-selenium-plugin/node-test

Selenium 4 with the JavaScript (Node.js) bindings. Classic WebDriver is all it needs — no BiDi session required.

Install the TestMap plugin

BASH
npm i -D @appsurify-testmap/rrweb-cypress-plugin

Two files: 1. cypress.config.ts

TYPESCRIPT
// cypress.config.ts

import registerRRWebReportTasks from '@appsurify-testmap/rrweb-cypress-plugin/reporter';

export default defineConfig({
  e2e: {
    setupNodeEvents(on, config) {
      registerRRWebReportTasks(on, {
        ...config,
        outputReportDir: 'test-results/cypress/ui',
      });

      return config;
    },
  },
});

2. cypress/support/e2e.ts

TYPESCRIPT
// cypress/support/e2e.ts

import { initializeTestmap } from '@appsurify-testmap/rrweb-cypress-plugin';

initializeTestmap();

Note: Cypress 14 and 15. The report archive is built when cypress run finishes; cypress open does not produce it.

Step #4

Run your tests as usual:
The plugin records a DOM snapshot for each test and writes one JSON file per test. When the run finishes, the reporter bundles them into ui-coverage-reports.zip in the report folder.

What the plugin records:
Page structure, element selectors and the interactions your tests perform. It never reads your source code.

Step #5

Upload the report
First time: drag and drop. Open the project → Add Testrun, name the run, drop ui-coverage-reports.zip (or individual .json files) and click Create.
Every time: from CI. Create a personal access token under your avatar → Personal Access Tokens.

Upload UI coverage automatically Use the TestMap upload action from GitHub Marketplace:
https://github.com/marketplace/actions/testmap-ui-coverage-upload
The action automatically finds report folders created by the Playwright,
Selenium, and Cypress plugins.
It creates one Test Run for the workflow and links the result in the
GitHub job summary.

1. Create a Personal Access TokenIn TestMap:

  1. Open your profile/avatar in the top-right corner.
  2. Select Personal Access Tokens.
  3. Create a token.
  4. Copy the token.

The token is shown only once and starts with:

TEXT
tmap_

2. Add the token to GitHub SecretsIn your GitHub repository:

  1. Open Settings.
  2. Go to Secrets and variables.
  3. Select Actions.
  4. Add a repository secret.

Secret name:

TEXT
TESTMAP_TOKEN

Paste your TestMap token as the secret value.

3. Add the upload step to your workflow

YAML
- run: npx playwright test

- name: Upload UI coverage to TestMap
  if: ${{ !cancelled() }}
  uses: appsurify/testmap-upload-action@v1
  with:
    url: https://<name>.testmap.cloud
    token: ${{ secrets.TESTMAP_TOKEN }}
    project: Your project name

Replace:

  • <name> with your TestMap workspace name.
  • Your project name with the exact project name in TestMap, including case.

The upload step runs even when tests fail, unless the workflow is cancelled.

Optional inputs

  • testrun-name — Defaults to the workflow name, run number, and branch.
  • path — Defaults to the report folders for the three supported plugins.
  • if-no-files-found — Controls what happens when reports are missing.
  • fail-on-error — Controls whether upload errors fail the workflow.
  • timeout — Controls the upload timeout.

Source and documentation
GitHub Action source:
https://github.com/Appsurify/testmap-upload-action

Marketplace:
https://github.com/marketplace/actions/testmap-ui-coverage-upload

Upload reports from GitLab, Jenkins, or any CI system
If your CI system supports curl, you can upload your TestMap report using the import API.

1. Create a Personal Access Token
In TestMap:
Open your profile/avatar in the top-right corner.

  1. Select Personal Access Tokens.
  2. Create a token.
  3. Copy the token.

The token starts with:

TEXT
tmap_

Store it securely as a CI secret named:

TEXT
TESTMAP_TOKEN

2. Upload your report

BASH / CURL
curl -X POST "https://<name>.testmap.cloud/api/v1/reports/import" \
  -H "Authorization: Bearer $TESTMAP_TOKEN" \
  -F "project_name=Your project name" \
  -F "testrun_name=Nightly Run #1" \
  -F "files=@test-results/playwright/ui/ui-coverage-reports.zip"

Replace:

  • <name> with your TestMap workspace name.
  • Your project name with the exact project name, including case.
  • Nightly Run #1 with your preferred Test Run name.
  • The report path with the location of your generated ZIP.

Important

  • project_name must match an existing TestMap project exactly, including case.
  • testrun_name is optional. If omitted, TestMap uses CI Import.
  • Each upload creates a new Test Run.
  • One CI run should correspond to one Test Run.
  • TestMap does not create projects through the import endpoint.
  • Use the multipart field files, not file.
  • An expired token returns HTTP 401.
  • A project name that does not exist can return HTTP 200 with success: false and PROJECT_NOT_FOUND.

Check the response body to confirm the upload succeeded.

Report path For Playwright:

TEXT
test-results/playwright/ui/ui-coverage-reports.zip

For Selenium:

TEXT
test-results/selenium/ui/ui-coverage-reports.zip

For Cypress:

TEXT
test-results/cypress/ui/ui-coverage-reports.zip

Use the report path generated by your selected plugin.

PART 2 — BEHAVIORAL COVERAGE (+5 MIN)

Add traffic. See what matters.

DOM Coverage works without Google Analytics. Behavioral Coverage, priority buckets and the Test Efficiency Score need it. Setup takes about 5 minutes if you administer GA4. Otherwise, send the access request below.

Do not skip item 3 of Step 6: without the custom dimension the integration looks configured but no data arrives.

Step #6

There are five instructions:

  1. Enable the Google Analytics Data API in Google Cloud, create a service account (for example testmap-ga-reader) and download its JSON key.
  2. In GA4, Admin → Property access management: add the service account email with the Viewer role. A Google Cloud IAM role does not grant this.
  3. In GA4, Admin → Custom definitions → Create custom dimension: scope Event, event parameter exactly selector.
  4. In TestMap, open the project → Settings and paste the numeric GA Property ID (Admin → Property details — not the G-XXXX Measurement ID) and the full JSON key.
    The field also accepts properties/123… or the GA property URL.
  5. Add the TestMap event tracker to your site so GA4 receives element-level events:
HTML / JavaScript
<script src="https://cdn.jsdelivr.net/npm/@appsurify-testmap/google-custom-event-tracker@0.13.0/dist/google-custom-event-tracker.umd.js"></script>
<script>
  window.GoogleCustomEventTracker.initTracker({
    send(payload) {
      gtag("event", "ui_event", payload);
    },
  });
</script>
If gtag or dataLayer is already on the page, the tracker starts by itself and the second script is optional. Using Google Tag Manager? Push { event: “ui_event”, …payload } to the dataLayer, create a Custom Event trigger named ui_event, and map the selector parameter in the GA4 Event tag from a Data Layer Variable. Selectors are sent as SHA-256 hashes by default — leave hashing on; the overlay matches elements by hash. Allow 24–48 hours for the custom dimension to start returning data.

Not the GA4 admin? Send this.

Copy the email below and send it to your Google Analytics administrator.
Subject: Read-only Google Analytics access for TestMap (10 minutes)

GA4 ACCESS REQUEST
Hi — 
we are connecting our test suite to TestMap so the untested parts of the site are ranked by real traffic. It needs three things on GA4 property [property name], all read-only or additive:
Admin → Property access management: add [service-account email] as Viewer.
Admin → Custom definitions → Create custom dimension: scope Event, event parameter selector (needs Editor; nothing existing changes).
Numeric Property ID from Admin → Property details.
TestMap never writes to the property. The tracker sends hashed element selectors, not form values.
Thanks.
data takes 24–48h after dimension.
Step #7

Read your first heatmap
Open the project → the test run → a page. You will see Coverage (share of interactive elements touched by tests), the Efficiency Score once GA4 is flowing, and the priority buckets. Traffic is read over the last seven days.

TROUBLESHOOTING

When something does not show up.

More answers in the setup, data and security FAQ.

Tests pass but no JSON files appear

The spec file still imports test from @playwright/test, the test does not use the page fixture, or --reporter=... was passed on the command line.

Cypress: initializeTestmap() is missing from cypress/support/e2e.ts.

Selenium: the driver is not wrapped in attach().

JSON files exist but ui-coverage-reports.zip does not

The reporter is not registered in playwright.config.ts, or a command-line –reporter replaced it.

Cypress: the run used cypress open; the archive is only built by cypress run.

The upload returned 200 but no run appears

A typo in project_name returns HTTP 200 with success: false and code PROJECT_NOT_FOUND, so curl –fail does not catch it; read the response body.

The import endpoint does not create projects.

Two other common causes: the form field is files, not file; and an expired token returns 401.

The GitHub Action checks all of this for you: it fails the step on PROJECT_NOT_FOUND or 401 and warns when no report files are found (same causes as item 1).

GA4 is connected but the overlay and Efficiency Score stay empty

In order of likelihood: the selector custom dimension is missing (the Data API returns “Field customEvent selector is not a valid dimension”); the G-XXXX Measurement ID was pasted instead of the numeric Property ID; the service account was not added under Property access management; the Data API is not enabled; the dimension is under 48 hours old; hashSelector was turned off.

GA4 is set up correctly and the overlay is still empty

The page URL your tests visit must match GA4’s pageLocation character for character, including host and query string. Tests that run against staging or localhost while the tracker is on production report nothing. Run the suite against the same host the tracker reports from, or add the tracker to the environment the tests use.

Does TestMap see my source code?

No. The plugin records rendered DOM snapshots and test interactions from your test runner. It does not read, upload or store source files.
SETUP, DATA AND SECURITY

What TestMap records — and what it never does.

The plugin lives in your test project and records the rendered page and the actions your tests take. It never touches your application code, your build or your deployment. Everything it sends is inspectable on npm under @appsurify-testmap.

Does TestMap change my tests?

No. The plugin runs in the background — observing your test as it executes and capturing the metadata needed to correlate your test with the DOM and your users. It does not change your test logic, modify selectors or add app code.

What does the GA4 tracker send?

A ui_event for each interaction with the event type, the element tag, a stable element selector (sent as a SHA-256 hash by default), a timestamp, and the element’s visible text clipped to 100 characters. Form fields are always sent as [redacted], as is any element marked data-gce-private. It sends no form values. Text capture can be turned off in the tracker options.

Which CI systems are supported?

GitHub Actions has a ready-made upload action, appsurify/testmap-upload-action, on the GitHub Marketplace. GitLab CI, Jenkins and any CI system that can run a curl command upload to the import endpoint with a personal access token.

Ready to install?

Free workspace at testmap.cloud. DOM coverage in 10 minutes. Both layers in 15.