> For the complete documentation index, see [llms.txt](https://developer.harness.io/llms.txt). Markdown versions of documentation pages are available by appending `.md` to page URLs; this page is available as [Markdown](https://developer.harness.io/ai-test-automation/new-to-ai-test-automation/intent-driven.md).

# AI-Powered Intent Testing

Harness AI Test Automation changes how you design, execute, and maintain tests. **AI-powered intent testing** combines generative AI, agentic workflows, and adaptive test intelligence. It automates end-to-end (E2E) testing around real user intent.

### Understand test automation through intent <a href="#rethinking-test-automation-through-intent" id="rethinking-test-automation-through-intent"></a>

Traditional test automation relies on predefined scripts and static flows. These methods, whilst structured, struggle to keep up with evolving user behaviours and dynamic application states.

**Intent-Driven Testing** shifts this paradigm. Instead of encoding each test step manually, testers can now express *what* a user wants to achieve using **natural language**, and Harness AI intelligently figures out *how* to perform it.

For example, rather than scripting every interaction for "add an item to cart and checkout," a tester can write:

> "Verify that a user can add an item to the cart and complete checkout successfully."

AI interprets this intent, generates the appropriate navigation and assertions, and executes the flow across real environments, validating not just functionality but also user experience.

### Understand the AI-powered workflow <a href="#how-it-works-inside-the-ai-powered-workflow" id="how-it-works-inside-the-ai-powered-workflow"></a>

Harness AI’s testing copilot operates through an **agentic architecture**. It blends large language model (LLM) reasoning with real-time application exploration.

#### 1. Natural Language to Test Intent <a href="#id-1-natural-language-to-test-intent" id="id-1-natural-language-to-test-intent"></a>

Developers or QA engineers provide **natural language prompts** or existing manual test cases. The LLM Interface Layer (powered by many different models) interprets these prompts and formulates structured test intents.

#### 2. AI Reasoning and Exploration <a href="#id-2-ai-reasoning-and-exploration" id="id-2-ai-reasoning-and-exploration"></a>

The copilot analyses the prompt, identifies the relevant pages or flows from the **App Knowledgebase**, and determines the **start URL** for navigation. Using agentic reasoning, it predicts and executes the next best action, constantly refining its steps based on the application’s state.

#### 3. Executable Command Generation <a href="#id-3-executable-command-generation" id="id-3-executable-command-generation"></a>

Harness AI translates each suggested step into an **executable command**, maintaining a loop between test execution and AI reasoning to adapt to dynamic changes.

#### 4. Visual and DOM-Based Validation <a href="#id-4-visual-and-dom-based-validation" id="id-4-visual-and-dom-based-validation"></a>

Through compact DOM representations and screenshot-based state models, the AI validates both functional and **visual regressions**, ensuring consistent UI experiences across sessions.

#### 5. Continuous Learning <a href="#id-5-continuous-learning" id="id-5-continuous-learning"></a>

Each run enriches the **App Knowledgebase** with new flows, components, and outcomes. This feedback loop strengthens intent prediction and future test resilience.

### Use agentic workflows for E2E testing <a href="#agentic-workflows-the-core-of-ai-driven-e2e-testing" id="agentic-workflows-the-core-of-ai-driven-e2e-testing"></a>

Harness uses **agentic workflows**, autonomous systems that mimic human decision-making, to overcome the limitations of static automation frameworks. These workflows enable:

* **Automated Intent-Based Testing:** Adaptive execution that understands user goals instead of relying on element selectors.
* **Iterative Discovery:** The system dynamically decides the next action based on the application’s evolving state.
* **Self-Healing Logic:** Reduced maintenance, as tests adjust automatically to UI or data changes.

### Create tests with generative AI <a href="#simplifying-test-creation-with-generative-ai" id="simplifying-test-creation-with-generative-ai"></a>

Harness Generative AI dramatically accelerates test authoring and maintenance:

* **Natural Language Prompts:** Write "Book the lowest fare flight", and Harness AI figures out the interactions.
* **Automated Assertions:** Verifications are generated automatically, ensuring coverage for each step.
* **Suggested Test Cases:** AI explores edge cases, boundary conditions, and negative paths you might not anticipate.

This approach makes comprehensive testing accessible to every team member, not just automation specialists.

### Test with vision and visual models <a href="#expanding-testing-with-vision-and-visual-models" id="expanding-testing-with-vision-and-visual-models"></a>

Generative AI, enhanced by multimodal models, now extends automation to **visual testing**. Harness AI can detect visual regressions, analyse charts or canvas elements, and ensure visual consistency across environments, adding a new dimension of confidence to release validation.

### Understand the benefits <a href="#why-it-matters" id="why-it-matters"></a>

| Challenge                                | AI-Powered Intent Testing Advantage                        |
| ---------------------------------------- | ---------------------------------------------------------- |
| Fragile test scripts break on UI changes | Adaptive, intent-based automation that self-heals          |
| Manual test creation is slow             | Natural language authoring accelerates coverage            |
| Visual issues go undetected              | Vision-based AI detects UI regressions automatically       |
| Complex workflows are hard to automate   | Agentic reasoning navigates and validates end-to-end flows |

### Next steps <a href="#next-steps" id="next-steps"></a>

Use the following resources to learn more about AI-powered intent testing:

**Learn AI Copilot capabilities:**

* [Simple Steps - AI Actions](/ai-test-automation/use-ai-test-automation/test-authoring/harness-ai-copilot/simple-step.md): Create single, focused actions using natural language commands.
* [Multi-Step AI Tasks](/ai-test-automation/use-ai-test-automation/test-authoring/harness-ai-copilot/natural-language-tests.md): Author complete business workflows with intent-driven prompts.
* [AI Assertions](/ai-test-automation/use-ai-test-automation/test-authoring/harness-ai-copilot/ai-assertions.md): Validate application state with natural language questions.
* [AI Parameters](/ai-test-automation/use-ai-test-automation/test-authoring/harness-ai-copilot/parameter-ai.md): Extract and reuse dynamic data across test steps.

**Best practices:**

* [Best Practices for AI Commands](/ai-test-automation/best-practices-and-resources/best-practices/best-practices-for-ai-commands.md): Write effective natural language prompts for test generation.
* [Creating and Maintaining Tests Best Practices](/ai-test-automation/best-practices-and-resources/best-practices/creating-and-maintaining-tests-best-practices.md): Build resilient, maintainable AI test suites.
