---
title: "AI in Automate"
section: "Automate"
description: "AI in SmartestQA Automate: Generate from Prompt, Expand Scenarios, Generate Test Cases with AI, AI descriptions, AI steps, AI Analyze."
url: https://docs.smartestqa.ai/en/automate-ai.html
audience: [customer, admin]
updated: 2026-11-08
keywords: "ai assistant generate from prompt generate steps expand scenarios generate variations generate test cases with ai ai description ai step ai analyze enable ai ai document analysis api key"
---
# Automate: AI in Automate

AI in Automate writes steps from a sentence, turns a passing test into negative and edge cases, drafts test cases for a whole module, and writes each test case’s description. All of it builds on the actions you recorded.

## In short

**On this page you can**

- Build a step list from one sentence with Generate from Prompt .
- Create 2–4 negative and edge variants with Expand Scenarios .
- Draft a folder of test cases with Generate Test Cases with AI .
- Get each test case’s description written from its steps.
- Ask the AI for locator suggestions on a failed dry-run step.

**How to use it**

1. Ask an admin to turn on Enable AI and AI Document Analysis .
2. Record the actions of the flow first; the AI reuses them.
3. Open AI Assistant in the editor header and describe the test.
4. Review the generated steps, then click Save .
5. Dry run and fix what the AI got wrong.

## Turn on AI

An [Admin](https://docs.smartestqa.ai/en/company-settings-roles.html) turns on two options in **Configuration** › **Project Panel** › [**AI Options**](https://docs.smartestqa.ai/en/project-settings-ai.html):

- [**Enable AI**](https://docs.smartestqa.ai/en/project-settings-ai.html#enable-ai): the main switch.
- [**AI Document Analysis**](https://docs.smartestqa.ai/en/project-settings-ai.html#what-each-switch-unlocks): needed for the AI Assistant and AI steps.

Until both are on, AI buttons are disabled with a tooltip such as “Enable 'AI Document Analysis' in Project Panel → AI Options”. The project also needs a working [AI connection](https://docs.smartestqa.ai/en/project-settings-ai.html#ai-account): either SmartestQA’s own AI or [your own provider account and key](https://docs.smartestqa.ai/en/project-settings-ai.html#own-account). Without one, AI requests fail with “AI is not enabled or API key is missing for this project.”

> **AI: The AI works from what SmartestQA knows**
>
> Generated steps use your [recorded actions](https://docs.smartestqa.ai/en/discover-actions.html), and generated test cases use your pages, [page purposes](https://docs.smartestqa.ai/en/discover-your-app.html#page-names) and [notes](https://docs.smartestqa.ai/en/discover-notes.html) from [Discover](https://docs.smartestqa.ai/en/discover.html). The better Discover is filled in, the more specific the results. With no actions at all: “No actions found for this project. Please record actions first.”

## Generate steps from a prompt

1. **Open the AI Assistant**

   Open the test case and click **AI Assistant** in the editor header. Under **Generate from Prompt**: “Describe what to test in natural language — AI builds the steps.”
2. **Describe the test**

   Write one test, with the data and the expected result: `Log in as test.user, search for order A-1029 and check that its status is Shipped.`
3. **Generate**

   Click **Generate Steps**.

   “Test case loaded into Details tab. Review and click Save to keep it.” The editor shows the new steps, name and description.
4. **Review and save**

   Check every step and its values, then click **Save**. Nothing is saved before that.

> **Important: Generate Steps replaces the whole test case**
>
> The generated steps, name and description replace what is in the editor. Use it on a new, empty test case. If you used it by mistake, leave the test case without saving (**Exit without saving**).

- The AI uses only actions that exist. If some parts of the request have none, you see “AI could only partially cover your request — missing actions for …”, and those parts become [AI steps](https://docs.smartestqa.ai/en/automate-steps-ai.html) (on page `AI_Page`, performing the action, stopping the test if they fail). [Record the missing controls](https://docs.smartestqa.ai/en/automate-add-steps.html#record-web) and generate again, or replace those AI steps by hand.
- If nothing usable comes back: “AI could not produce any usable steps for this prompt. Try rephrasing with more detail.”

## Expand a test case into variations

Once a happy path passes, **Expand Scenarios** uses it as a seed and writes negative paths, edge cases and error handling.

1. **Open the source test case**

   Open the passing test case and click **AI Assistant**.
2. **Generate variations**

   Under **Expand Scenarios** click **Generate Variations**. The AI writes 2 to 4 variations, each marked **Negative** or **Edge**, with its steps.
3. **Choose and name the folder**

   Tick the ones you want and give the folder a name (**New folder name**, default `Test Case Scenarios`).
4. **Create**

   Click **Create**.

   A new folder is created under the source’s folder, the new test cases are created in it, and the **original test case is moved into it** next to them.

> **Warning: The original moves**
>
> If the source test case was directly under the project root, the new folder is created at the root and becomes a [module](https://docs.smartestqa.ai/en/automate-test-cases.html#modules), also in [Analyze](https://docs.smartestqa.ai/en/analyze-folders.html#modules) and the [App Map](https://docs.smartestqa.ai/en/discover-app-map.html#modules). Move it with [drag and drop](https://docs.smartestqa.ai/en/automate-test-cases.html#move) if that is not what you want.

## Generate test cases for a module

1. **Choose the folder**

   Select the folder the new test cases should go under (or nothing, for the root).
2. **Open the dialog**

   **More** › **Generate Test Cases with AI**. “AI analyzes your recorded actions and page flow to generate meaningful E2E test cases — complete with realistic test data and step parameters.”
3. **Set the options**

   | Option | Choices |
   | --- | --- |
   | **Test type** | Full, Smoke, Functional, E2E, Regression |
   | **Count** | Auto, 3, 5, 8, 10, 15, 20, 30 |
   | **Step depth** | Auto, Short (3-5), Medium (5-8), Detailed (8-15) |
   | **Verification** | Strong, Simple |
   | **Test data** | Realistic, Boundary/Invalid |
   | **Module** | All pages, or one module |
   | **Pages (scope)** | The pages to cover, with their action counts |
   | **Scenario types** | Happy, Negative, Edge, CRUD, E2E |
   | **Include preconditions (login/setup)** | On or off |
   | **Special focus (optional)** | Free text, for example “focus on the checkout flow and cart verification” |
4. **Generate and review**

   Click **Generate** and wait (“Generating test cases with AI…”). Review the list; use **Select all**, **Deselect all** or **Regenerate**.
5. **Create**

   Click **Create**.

   “*n* test case(s) created in "*folder*"”. The folder is named by the AI (by default `AI Generated Test Suite`), under the folder you selected; at the root it becomes a [module](https://docs.smartestqa.ai/en/automate-test-cases.html#modules).

[Dry run](https://docs.smartestqa.ai/en/automate-dry-run.html#start-dry-run) each generated test case before you [add it to a pipeline](https://docs.smartestqa.ai/en/schedule-create.html#add-content).

## AI-written descriptions

The **Description (written by AI)** field in Test Case Detail is read only. It is written when someone runs **Update map** in the Discover [App Map](https://docs.smartestqa.ai/en/discover-app-map.html#update-map): the preview says “Descriptions of *n* test cases will be written with AI (only those whose steps changed since; one AI call per 8 test cases)”, and **Apply** writes them.

- Only test cases whose name, steps, active state or parameters changed since the last description are rewritten.
- Up to 8 test cases per AI call and 600 per update; up to 60 steps per case are read; a description has up to 1,000 characters.
- Values that look like secrets are masked before they are sent. A batch that fails is tried again at the next update.
- Until a description is written, the field copies the test case name.

## AI steps

An [**AI step**](https://docs.smartestqa.ai/en/automate-steps-ai.html#add-ai-step) is written in plain language and performed by the AI on every run. There are four modes, shown in the step list as [**AI Ask**](https://docs.smartestqa.ai/en/automate-steps-ai.html#ai-ask) (answer a question about the screen, for example “What is the total price on screen?”), [**AI Check**](https://docs.smartestqa.ai/en/automate-steps-ai.html#ai-check) (pass or fail, “Is the login button visible?”), [**AI Do**](https://docs.smartestqa.ai/en/automate-steps-ai.html#ai-do) (perform an action, “Type test@test.com in email field”) and [**AI Chat**](https://docs.smartestqa.ai/en/automate-steps-ai.html#ai-chat) (text only, no screen).

- New AI steps stop the test when they fail.
- If [AI is switched off for the project](https://docs.smartestqa.ai/en/project-settings-ai.html#enable-ai), an AI step fails and the test stops.
- AI steps are slower, cost an AI call each time and may answer differently from run to run. [Folder summaries](https://docs.smartestqa.ai/en/automate-test-cases.html#folder-summary) flag them (“Contains AI steps”). [Replace them with ordinary actions](https://docs.smartestqa.ai/en/maintenance-ai-steps.html#convert) once the flow is stable.

Parameters and outputs of AI steps: [step reference](https://docs.smartestqa.ai/en/automate-steps-ai.html#outputs).

## AI Analyze on a failed dry run

After a step fails in a dry run on your [agent](https://docs.smartestqa.ai/en/agent-pool-agents.html), **AI Analyze** on that step reads the live page and suggests locators. See [AI Analyze](https://docs.smartestqa.ai/en/automate-dry-run.html#ai-analyze).

## What is sent to the AI

- **Generate from Prompt, Expand Scenarios, Generate Test Cases:** your prompt or source test case, action names and pages, and page descriptions and [notes from Discover](https://docs.smartestqa.ai/en/discover-notes.html#notes-to-ai).
- **Descriptions:** the test case name and its steps, with secret-looking values masked.
- **AI steps and AI Analyze:** the prompt and information about the current page.

Requests go to the [AI provider configured for the project](https://docs.smartestqa.ai/en/project-settings-ai.html#ai-account). Use [test environments](https://docs.smartestqa.ai/en/concepts.html#environments) and test data. See also [What is sent to the AI](https://docs.smartestqa.ai/en/project-settings-ai.html#data).

## If something goes wrong

- [AI buttons are disabled, or “AI is not enabled or API key is missing…”](https://docs.smartestqa.ai/en/automate-troubleshooting.html#fix-ai-disabled)
- [“No actions found for this project. Please record actions first.”](https://docs.smartestqa.ai/en/automate-troubleshooting.html#fix-no-actions)
- [“AI could only partially cover your request…”](https://docs.smartestqa.ai/en/automate-troubleshooting.html#fix-partial-coverage)
- [Generate Steps replaced my steps](https://docs.smartestqa.ai/en/automate-troubleshooting.html#fix-generate-replaced)
- [Expand Scenarios moved my test case](https://docs.smartestqa.ai/en/automate-troubleshooting.html#fix-expand-moved)
- [“AI request limit reached…” or “Could not reach the AI service…”](https://docs.smartestqa.ai/en/automate-troubleshooting.html#fix-ai-limit)
