> ## Documentation Index
> Fetch the complete documentation index at: https://docs.rulebase.co/llms.txt
> Use this file to discover all available pages before exploring further.

# Populate a compliance test

> Draw a random sample of conversations, disputes, cases, or alerts into a test sheet, run the test, and verify the sample before reviewing exceptions.

Populate a compliance test with a random sample from its testing period. Rulebase supports tests based on conversations, disputes, compliance cases, and compliance alerts.

## Before you start

Confirm the compliance program has the correct target record type and the test has the intended date range. The **Populate test** dialog uses those settings for the sample.

The program and its tests are created first, in [Set up a compliance testing program](/guides/compliance/set-up-a-testing-program). If you have no test to open yet, start there.

## Add a random sample

1. Go to **Compliance > Testing**.
2. Open the program and test.
3. Click **Build sample** for an empty sheet or **Add to sample** for an existing sample.
4. Set the available filters for the program's record type.
5. Enter a **Sample size** from 1 to 500.
6. Click **Populate**.

Rulebase samples eligible records at random and adds them to the current test sheet. Running **Add to sample** again skips records already present in the sheet. If fewer eligible records remain than requested, the confirmation reports the shortfall.

<img src="https://mintcdn.com/rulebase/LmDNkLxqrTRcrtJn/images/compliance-populate-test.png?fit=max&auto=format&n=LmDNkLxqrTRcrtJn&q=85&s=94aefd2b3b21ba4a79cdd49fb1939a72" alt="Populate test dialog with interaction type, transcript search, and sample size" width="616" height="400" data-path="images/compliance-populate-test.png" />

## Filter conversation samples

Conversation-based tests provide these filters:

* **Interaction type**: include any interaction, tickets, or sales calls.
* **Transcript search**: describe relevant language or behavior, such as `customer sounds vulnerable`.

**Transcript search** matches message content that supports the condition. Keep the description focused on language likely to appear in the interaction.

## Filter other record types

Available filters depend on the compliance program's target:

| Record type       | Available filters                          |
| ----------------- | ------------------------------------------ |
| Disputes          | The test period and sample size            |
| Compliance cases  | **Status** and **Source**                  |
| Compliance alerts | **Status**, **Source**, and **Alert type** |

Leave an optional filter blank to sample across all eligible values for that field.

## Run and monitor the test

After the sample is populated, click **Run test** to fill the generated cells. A cell can show **Queued**, **Generating**, **Thinking**, **Pulling data**, or **Failed** while processing. A cell returns to **Queued** when Rulebase retries generation.

Select a completed generated cell to review its reasoning. Citation links open the supporting conversation message or referenced policy or framework document when that source is available.

If a generated cell remains **Failed**, confirm the source record is still available. After resolving the problem, select the affected range and click **Run test** again. Do not treat a failed generation as a compliance result.

Once every cell has filled, the sheet is complete. [Run and analyze a compliance test](/guides/compliance/run-and-analyze-a-test) covers reviewing the answers, marking exceptions, and generating the analysis report.

## Verify the sample

Before reviewing exceptions, confirm:

* The rows fall within the test period.
* The record type matches the compliance program.
* The sample size matches the requested count or the number of eligible remaining records.
* Repeated population did not add records already in the sheet.

Decide whether a control passed, failed, or was not applicable from the citations and the underlying record, not surface metadata alone.
