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

# Search Tests with AI

> Find tests instantly using natural language queries

Use natural language to search your test suite. The AI translates your questions into precise OQL queries automatically.

## Quick Examples

> [card] By Status
>
> ```
> Show me all failed tests from yesterday
> ```

> [card] By Feature
>
> ```
> Find all smoke tests for login
> ```

> [card] By Priority
>
> ```
> List all P0 tests that haven't run yet
> ```

> [card] Complex Queries
>
> ```
> Show P1 tests that failed in staging but passed in dev
> ```

## How It Works

**1. Ask in Plain English**

Type your search as a question or statement:

```
Which tests haven't been run in the last 30 days?
```

**2. AI Translates to OQL**

The AI converts your query to OneTest Query Language:

```oql theme={null}
last_run < -30d ORDER BY title
```

**3. Get Results**

See matching tests with relevant details highlighted

**4. Refine Search**

Ask follow-up questions to narrow down results

## Common Search Patterns

> [tab] By Time
>
> ```
> Tests created this week
> Tests that failed yesterday
> Tests not run in the last month
> Tests updated in the last 24 hours
> ```

> [tab] By Status
>
> ```
> All failed tests
> Passing smoke tests
> Tests in draft status
> Approved tests only
> ```

> [tab] By Feature
>
> ```
> All login tests
> Checkout flow tests
> API tests for users endpoint
> Mobile-specific tests
> ```

> [tab] By Owner/Team
>
> ```
> Tests created by John
> Tests assigned to QA team
> My tests
> Unassigned tests
> ```

## Advanced Searches

> [accordion] Combining Conditions
>
> ```
> Show P1 login tests that failed in the last run
> ```
>
> ```
> Find smoke tests created this sprint that haven't been run
> ```
>
> ```
> List all API tests with high priority that are not automated
> ```

> [accordion] Negative Searches
>
> ```
> Tests without any tags
> ```
>
> ```
> Tests that have never been run
> ```
>
> ```
> Tests not in any folder
> ```

> [accordion] Comparison Searches
>
> ```
> Tests that failed in prod but passed in staging
> ```
>
> ```
> Tests that take longer than 5 minutes
> ```
>
> ```
> Tests with pass rate below 80%
> ```

> [accordion] Pattern Matching
>
> ```
> Tests with "auth" in the title
> ```
>
> ```
> Tests starting with "TC-10"
> ```
>
> ```
> Tests containing "checkout" in description
> ```

## What's Next?

> [card] [Learn OQL](https://onetest.ai/oql/overview.md)
>
> Write queries manually for more control

> [card] [Ask Questions](https://onetest.ai/ai/ask-questions.md)
>
> Get insights about your tests


This documentation is built and hosted on [Mintlify](https://mintlify.com), a developer documentation platform.