# Turn a Crawl of Your App Into Regression Tests

URL: https://debugg.ai/resources/turn-real-usage-into-regression-tests
Published: 2026-07-29
Updated: 2026-11-18
Author: DebuggAI Team

DebuggAI crawls your deployed app into a map of pages and flows, checks each against a goal, and lets you lock the ones worth protecting into Playwright tests.

Writing a test suite from scratch is slow, and the paths nobody clicks through in a demo (retry logic, validation errors, the edge case a support ticket surfaces six months later) are the ones that end up untested. AI Test Suites starts from the other end. DebuggAI crawls your deployed app, maps it into pages and states, and checks each one against a goal. When a state is worth protecting, you lock it, and DebuggAI generates the functional test and Playwright code behind it.

It crawls a deployed app. It does not watch real users, and it is not an SDK that records what happens in production.

## How it works

1. **Crawl.** Point DebuggAI at a deployed environment and it maps the app: pages, forms, sections, and how they connect. On our own dashboard product it mapped 325 pages at 92% coverage, with no manual sitemap.
2. **Validate.** Each mapped page or state is checked against a goal by an automated run and comes back Passing, Failing, Stale, or Unverified. One real environment we looked at had 25 of 36 states validated, 69% coverage, and 84% of validated states passing.
3. **Lock.** From a state's detail view you lock the branch worth protecting.
4. **Generate.** Locking a validated branch turns it into a functional test backed by Playwright code, tracked under Functional Tests from then on.

## What the map looks like

This is a real project's map: sections and pages of an actual product, connected by real navigation, each with a coverage bar and a pass/fail count.

![Real map of pages and sections connected by navigation, each with a coverage bar](https://strapi-db-ue2.s3.us-east-2.amazonaws.com/debuggai_validation_graph_a049ea2399.png)

## Coverage grows over time

A freshly connected project does not start at 100% passing. The same dashboard showed 63 failed executions against 50 passed ones over one week, because coverage grows as you validate and lock more of the app. You decide what is worth locking first.

## Review before you lock

A validated state is not automatically worth locking. Review it the way you would review any generated test:

- Check that the goal it was validated against matches the behavior you care about.
- Do not lock a state just because it passes. Lock the ones that would hurt if they broke.
- Revisit stale states. A state that has not been validated recently is not the same as one that is passing now.

## When to use this vs PR Copilot

Both run on the same crawl-and-validate engine and differ in when they trigger. [PR Copilot](/resources/set-up-automatic-pr-testing-with-debuggai) reacts to every push and targets what the diff is likely to touch. AI Test Suites is the persistent map of the whole app that you build up and lock down over time. PR Copilot catches regressions in what just changed. AI Test Suites is where durable regression coverage lives.

For a closer comparison, see [PR Copilot vs AI Test Suites: Where to Start](/resources/pr-copilot-vs-ai-test-suites-where-to-start).

## Sources

- Playwright, "Writing tests": https://playwright.dev/docs/writing-tests
- Playwright, "Best practices": https://playwright.dev/docs/best-practices
- Martin Fowler, "The Practical Test Pyramid": https://martinfowler.com/articles/practical-test-pyramid.html

## Sources

- https://strapi-db-ue2.s3.us-east-2.amazonaws.com/debuggai_validation_graph_a049ea2399.png
- https://playwright.dev/docs/writing-tests
- https://playwright.dev/docs/best-practices
- https://martinfowler.com/articles/practical-test-pyramid.html
