# Show which features are tested, in five minutes with FACET Atlas

> Open FACET Atlas, the browser app for your FACET records, and read off how many promises a test is named for, which feature has none, and whether the named tests passed on the current commit.

Source: https://facet-framework.com/en/guides/find-which-features-are-tested/  
Last updated: 2026-11-26T23:28:23+01:00

Steering meeting, item four: "How well tested is the product?" You have a coverage percentage from CI and a feeling. Neither answers the question behind it: which of the things we promise customers has a test, and did those tests pass on the version we are about to ship?

FACET keeps a short, checkable description of each feature, called a record, next to your code, including the tests that check each promise. By the end of this guide you open one page in FACET Atlas, a browser app that shows your FACET records as pages, and read the answer off it: how many of the product's promises a test is named for, which feature has none, and how many test files passed in a run measured on the current commit. The page comes from your records and a `facet test` report; nobody fills in a spreadsheet.

The commands below use a small example shop written in TypeScript with Vitest, set up as in [One answer instead of three](https://facet-framework.com/en/guides/write-down-what-a-feature-does/), on Linux. Atlas starts from the npm package and downloads itself on the first start.

## Download Atlas with npx and start it once

Atlas is a separate program that the npm package `facet-framework` downloads and starts. In the shop's folder, run:

```sh
npx facet-framework ui
```

On the first run it names the Atlas archive for your system, its size, its source and the cache folder, and asks `Download and start? [y/N]`. Answer `y`. The archive is checked against the SHA-256 pinned in FACET Core, Atlas starts, and it prints `FACET Atlas: http://127.0.0.1:7317/`. Stop it with Ctrl-C for now; the next steps start it again, without the question.

Without a terminal, for example in CI or a script, the command stops with `run 'facet ui --yes' to allow the download without a terminal`. Add `--yes` there to download without asking. Without npm, download the release archive and check it yourself, as the [Atlas docs](https://facet-framework.com/en/docs/atlas/#start) describe.

## Write down the feature the question is about

Atlas can only report on what records describe. In the example shop, discount codes have a record with a test; refunds, the feature everyone assumes is tested, have none. In the shop's folder, add it:

```sh
mkdir -p docs/facets/features/orders/refunds
```

Save this as `docs/facets/features/orders/refunds/request-refund.yaml`:

```yaml
schema_version: "0.1"
id: orders/refunds/request-refund
lifecycle: active
intent:
  summary: A customer asks for money back on an order and gets it, in full or in part, or a reason why not.
contract:
  scenarios:
    - id: refund-within-window
      statement: |
        Given an order delivered 29 days ago
        When the customer requests a refund
        Then the refund is accepted and goes back to the original payment method
    - id: refund-after-window
      statement: |
        Given an order delivered 31 days ago
        When the customer requests a refund
        Then the shop refuses it with E3001
    - id: partial-refunds-up-to-total
      statement: |
        Given an order that was already partly refunded
        When a further refund would exceed the amount paid
        Then the shop refuses it with E3002
    - id: gift-card-as-store-credit
      statement: |
        Given an order paid with a gift card
        When the customer requests a refund
        Then the money comes back as store credit
lineage:
  owner:
    team: orders
  created_at: "2026-11-22"
```

Anchor it with two comment lines directly above `export function requestRefund` in `src/orders/refund.ts`:

```ts
// @facet: orders/refunds/request-refund
// @facet-role: primary
export function requestRefund(order: Order, amount: Cents, now = new Date()): Refund {
```

`npx facet lint` reports 2 records, 2 anchors and 0 errors.

## Open Atlas and read the answer for your manager

In the shop's folder, start Atlas again:

```sh
npx facet-framework ui
```

It prints `FACET Atlas: http://127.0.0.1:7317/`. Open that address in your browser and keep the command running; Ctrl-C stops it. At the top right, open the role menu (it starts at **Developer**) and choose **Leadership**:

![Atlas Overview in the Leadership role: 50%, 4 promises are not named by any test yet, 4 of 8 promises are named by a test, the most open is orders at 0%; below, the domains orders with 4 promises open and checkout with 0 open.](https://facet-framework.com/guides/find-which-features-are-tested/atlas-leadership-light.png)

*Half of the shop's promises have a test; refunds have none.*

That is the first half of the answer, in the manager's terms: 8 promises, 4 named by a test, and the gap is all in one domain, orders. Further down the same page, **At risk** names the feature: Request refund, 0 % of promises with a test, held by the orders team.

A "promise" here is a scenario in a record. "Named by a test" means a record lists a test file for it under `verification`; it does not yet say that the test ran.

## Add the result of a real test run

For the second half, whether the named tests pass, Atlas reads a report from `facet test`. Tell FACET how your tests run in `.facetrc.yaml`:

```yaml
runners:
  vitest:
    command: node_modules/.bin/vitest run
    list: node_modules/.bin/vitest list --filesOnly --json
    list_format: json
    report: junit
    report_file: reports/junit.xml
```

Three test files in the shop belong to no record yet. List them in `docs/facets/test-baseline.yaml`, so `facet test` accepts them as reviewed:

```yaml
runners:
  vitest:
    - tests/cart.test.ts
    - tests/checkout.test.ts
    - tests/password-reset.test.ts
```

Atlas shows a report only when it was measured on the current commit of a clean working tree. Commit first, then run the tests and write the report into the git-ignored `reports/` folder:

```sh
git add .facetrc.yaml docs/facets src/orders/refund.ts
git commit -m "Describe refunds and run the tests through FACET"
mkdir -p reports
npx facet test --json > reports/facet-test.json
```

The JSON goes to the file; Vitest's own output still appears in the terminal. Stop Atlas with Ctrl-C and start it again with the report. Give the report's full path:

```sh
npx facet-framework ui --test-report ~/demo-shop/reports/facet-test.json
```

Switch the role to **Test & review** and scroll to **Review bench**:

![Atlas Review bench in the Test & review role: 4 promises without a test link, 1 record without any test, 2 features without documentation, 0 failing tests with 4 passed, 0 unmeasured and the commit hash; below, checkout/discounts complete with 4 of 4, orders/refunds with 4 scenarios open.](https://facet-framework.com/guides/find-which-features-are-tested/atlas-review-light.png)

*0 failing tests on this commit, and one record with no test at all.*

Now you have the full answer: on this commit every test that ran passed (0 failing, 4 test files passed), and one feature, refunds, has no test, so no run can say anything about it.

## Check that the page shows the current state

The report belongs to one commit. Change any tracked file, for example add a line to `README.md`, and reload the page: next to **Failing tests** Atlas now says `working tree changed since the report` and shows no number. After a new commit it says `report is out of date`. Run `npx facet test --json > reports/facet-test.json` again on the clean commit and reload to get the number back.

> **What this does not do**
>
> "Named by a test" counts what records claim. Atlas does not read test bodies, so a record can name a test that checks
> something else. The test report counts test files, not scenarios. Atlas does not run tests itself and never shows an
> old report as current. Atlas is still a prerelease.

## If Atlas shows something else

- **`no report (facet ui --test-report)` next to Failing tests:** Atlas did not find the file. A relative path is read from the folder you ran the command in; give the full path.
- **`reports/facet-test.json: No such file or directory` from the shell:** the folder does not exist before the first test run. Run `mkdir -p reports` first.
- **`working tree changed since the report` or `report is out of date`:** commit or discard your changes, run `npx facet test --json > reports/facet-test.json` again and reload.

For more on why a green pipeline is not the same as a tested product, read [“All green.” And the customer still calls.](https://facet-framework.com/en/solutions/testing/).

### Sources

- [FACET Atlas on GitHub](https://github.com/facet-framework/atlas)
- [Run Jest, Vitest and PHPUnit with FACET](https://github.com/facet-framework/core/tree/main/examples/test-runners)
