🎯 Intent-Aware Healing Guide / Test Amacı İle İyileştirme

This guide explains Intent-Aware Healing (TestIntent), BDD/Gherkin scenario style intents, best practices, and multilingual support.

🧭 Built on this: Intent-aware healing is the foundation for Intent-Driven Automation, where business goals become explored, recorded, and generated test flows.

💡 Select Language / Dil Seçin:

💡 Zero Token Cost: If your AI API tokens run out or you have no internet access, the engine’s deterministic heuristic scorer (SimilarityScorer) still resolves broken locators at $0 cost and 0 API tokens — sub-50ms for 3,000 controls on developer hardware (see SyntheticTreeBenchmarkTests).


🇬🇧 English Guide

1. BDD / Gherkin Scenario Style Intent (GIVEN-WHEN-THEN)

Yes! You can write TestIntent formatted as a Gherkin / BDD test scenario step. LLMs understand structured Gherkin syntax exceptionally well because it provides state preconditions and clear expected outcomes.

BDD Scenario Style Examples:

SpecFlow / Reqnroll BDD Integration Example:

[When(@"user clicks the submit button with intent ""(.*)""")]
public async Task WhenUserClicksSubmitWithIntent(string intent)
{
    await engine.ExecuteWithHealingAsync(
        locatorKey: "Registration.SubmitButton",
        expected: expectedButton,
        action: async (element) => await page.ClickAsync(element.AutomationId),
        captureTreeRoot: () => page.CaptureTree(),
        testIntent: intent // Passes Gherkin step directly into testIntent!
    );
}

2. How to Write a Good Intent (The 3-Part Formula)

Writing an effective TestIntent is simple when using the 3-part formula:

\[\text{TestIntent} = \text{[Action Verb]} + \text{[Business Context]} + \text{[Goal / Outcome]}\]

✅ Good Intent Examples:


3. Multilingual Intent Support

Automation Sandbox LLM providers are natively multilingual. You can write BDD or natural intent in any language (English, Turkish, German, French, etc.):

4. What TestIntent Does Today

TestIntent currently supports healing, not full autonomous test generation:

Full intent-driven automation is implemented as M6: TestAutomation/IntentAutomation/ ships the structured intent scenario model, the deterministic and LLM-backed planners (DeterministicIntentPlanner, LlmIntentPlanner), the web and desktop pipelines (IntentAutomationPipeline, IntentDesktopAutomationPipeline), and the Playwright/FlaUI test generators. See Intent-Driven Automation.


🇹🇷 Türkçe Kılavuz

1. BDD / Gherkin Senaryo Formatında Intent Yazımı (GIVEN-WHEN-THEN)

Evet! TestIntent parametresini bir Gherkin / BDD test senaryosu adımı biçiminde yazabilirsiniz. Yapay zeka modelleri GIVEN-WHEN-THEN yapısını çok iyi kavrar çünkü bu yapı ön koşulu ve hedeflenen sonucu net şekilde sunar.

BDD Formatında Intent Örnekleri:

SpecFlow / Reqnroll BDD Entegrasyon Örneği:

[When(@"kullanıcı ""(.*)"" amacıyla butonuna tıklar")]
public async Task KullaniciTıklarIntentIle(string intent)
{
    await engine.ExecuteWithHealingAsync(
        locatorKey: "Registration.SubmitButton",
        expected: expectedButton,
        action: async (element) => await page.ClickAsync(element.AutomationId),
        captureTreeRoot: () => page.CaptureTree(),
        testIntent: intent // Gherkin adım metnini doğrudan testIntent olarak aktarır!
    );
}

2. Intent Nasıl Yazılır? (3 Adımlı Formül)

\(\text{TestIntent} = \text{[Eylem Fiili]} + \text{[İş Bağlamı]} + \text{[Hedef / Sonuç]}\)

✅ İyi Intent Örnekleri:


3. Çok Dilli BDD Intent Desteği

İster Türkçe BDD, ister İngilizce Gherkin yazın; yapay zeka adımı otomatik çözer ve ekrandaki elemanla eşleştirir.

4. TestIntent Bugün Ne Yapar?

TestIntent bugün tam otomatik test üretmez; self-healing kararına anlam katar:

Tam intent tabanlı otomasyon M6 kapsamında uygulanmıştır: TestAutomation/IntentAutomation/ projesi; yapılandırılmış intent senaryo modelini, deterministik ve LLM destekli planlayıcıları (DeterministicIntentPlanner, LlmIntentPlanner), web ve masaüstü hatlarını (IntentAutomationPipeline, IntentDesktopAutomationPipeline) ve Playwright/FlaUI test üreticilerini içerir. Bkz. Intent-Driven Automation.