GPT Driver User Guide
GPT Driver User Guide
GPT Driver User Guide
  • Getting Started
    • 🚀Getting Started
    • 🔃Uploading a Build File
    • 🧙‍♂️Creating Tests
      • Commands
        • Tap Command
        • Type Command
        • scroll Command
        • scrollUntilVisible Command
        • swipe Command
        • slide Command
        • wait Command
        • assertVisible Command
        • openLink Command
        • pressBackButton Command
        • launchApp Command
        • restartApp Command
      • 👁️withVision: Instructions
      • 🧠AI Instructions
    • 🏁Executing Tests
  • ☎️Device Configuration
  • ⚙️Under the Hood
  • Getting Around
    • ✏️Test Editor
    • 🛰️Test Overview
    • 🏅Test Reports
    • ⏺️Test Recordings
    • 👤Settings
  • Best Practices
    • 🧑‍💻API Documentation
    • Versioning
    • ↗️Templates
    • 🖇️Test Dependencies
    • 🔗Deep Links
    • 📧Email Verification
    • 📡Network Calls
    • 🪡Parameterized Strings
    • 📍Changing Device Location
    • 🪶Conditional Steps
    • 🐦Nested Steps
    • ⌚Smart Caching
    • 🗣️Env. Variables
    • 💯Bulk Step Testing for Robustness
    • 📖Exact Text Assertions
    • 💬Auto-grant Permissions
  • 🧪Mocking Network Data
  • 🌎Localization Testing
  • Code Generation
  • ❔FAQs
Powered by GitBook
On this page
  • Purpose
  • Key Benefits at a Glance
  • End‑to‑End Workflow
  • Frequently Asked Questions

Code Generation

Purpose

Enable QA and engineering teams to convert plain‑language test scenarios into robust, self‑healing automated tests in without writing boilerplate code.

Key Benefits at a Glance

Benefit

What It Means for You

Zero‑Code Authoring

Write tests the way you think, no framework specific syntax required.

Speed at Scale

Run generated test code with the usual performance.

Self‑Healing

The generated code leverages GPT Driver's SDK which detects flaky selectors at runtime and applies AI fallbacks, preventing red builds.

Full Traceability

Detailed logs are created for AI fallbacks enabling the team to fix flaky code.

End‑to‑End Workflow

Describe the test in plain English in our Web Studio

1. Navigate to the email login form
2. Fill out the email/password fields with email test@test.com and password abcdef

Launch an asynchronous run The AI Test Agent spins up the required device & OS. Natural‑language steps are compiled into executable Appium / XCUI / Espresso Code

Receive results & generated code Video recording of the agent's interaction. The generated, self‑healing Appium / XCUI / Espresso test code, ready for local or CI reruns.

// Step 1
gptDriver.execute("Navigate to the email login form", driver -> {
    driver.findElement(By.id("com.duolingo:id/introFlowLoginButton")).click();
});

// Step 2
gptDriver.execute("Fill out the email/password fields with email \"test@test.com\" and password \"abcdef\"", driver -> {
    WebElement emailField = driver.findElement(By.id("com.duolingo:id/loginView"));
    emailField.click();
    emailField.sendKeys("test@test.com");

    WebElement pwdField = driver.findElement(By.id("com.duolingo:id/passwordView"));
    pwdField.click();
    pwdField.sendKeys("abcdef");
});

Why wrapping the code inside GPT Driver SDK blocks?

  • Natural‑Language Blocks - Each GPT Driver block is labeled with the original test instruction, improving readability & auditability.

  • Portable Code - Under the hood, the SDK generates standard Appium / XCUI / Espresso interactions, so you can extend or debug with familiar tools.

  • Fallback Intelligence - If the appium / XCUI / Espresso code fails, e.g. because a locator such as By.id("com.duolingo:id/loginView") changes, GPT Driver takes over and dynamically identifies an alternative locator (text, hierarchy, image) if possible - logging the fix so you can patch the code later. This prevents flaky tests blocking your team.

Frequently Asked Questions

Q: Can I edit the generated code? A: Absolutely. The output is plain Python/Typescript/Kotlin/Swift code wrapped in lightweight SDK calls, modify selectors, add assertions, or extend with your own logic.

Q: What happens if an AI fallback silently “fixes” a bug in the app? A: Fallbacks are logged as warnings. On top of that our AI fallback is trained to flag visible errors in the UI and only fix actions with a high confidence evaluation.

PreviousLocalization TestingNextFAQs

Last updated 2 days ago