Daily AI recipesWorkVerified Jul 31, 2026

Create an AI Agent for App Autotesting in 7 Minutes

A ready-made set of autotests from a feature description - no code, no framework installation

  1. 1.Open the Playwright homepage and click «Get started». The browser will open the documentation page - this is your working environment, nothing needs to be installed on your computer.

    Playwright is completely free and backed by Microsoft. For this recipe, an open tab with the docs is all you need.

    Playwright
  2. 2.Go to the Codegen section: in the left menu, select «Getting started» -> «Codegen». Launch the recording tool - a browser window and the Inspector panel will open. In the Inspector address bar, enter your app's URL and press Enter.

    Codegen records every action you take in the browser window and instantly turns it into a ready-made test script in JavaScript/TypeScript.

    Playwright Codegen
  3. 3.Walk through the app's main scenario by hand: login, entity creation, navigating sections. Click Record, interact with elements - Codegen captures your actions. In the Inspector panel, open the «Assertions» tab and add checks: text visibility, button presence.

    Don't write assertions manually - just click an element in the window, then choose the assertion type (visibility, text, has text) in the Inspector. That's your autotest.

    Playwright Codegen
  4. 4.Copy the generated code from the Codegen panel (right side of the window). Paste it into a new ChatGPT chat and add the instruction for the AI agent to expand and improve the autotests.

    The free ChatGPT plan is enough - gpt-4o-mini handles this well. Don't paste tokens, production environment passwords, or personal user data.

    ChatGPT About this tool
    Prompt
    Here is a Playwright test recorded with Codegen for my app.
    
    [PASTE RECORDED CODE HERE]
    
    Act as a QA automation agent. Do the following:
    1. Add explicit assertions after every key action (page title, visible text, URL contains).
    2. Wrap flaky network waits in waitForResponse / waitForLoadState('networkidle').
    3. Extract selectors into a selectors object at the top.
    4. Add a data-testid strategy suggestion for [APP_NAME] in comments.
    5. Output the final refactored test as a single ready-to-run file, plus a 3-bullet summary of what you changed.
    
    App description: [ONE-SENTENCE DESCRIPTION OF YOUR APP]
    What this prompt doesEnglish prompt: loads the recorded test into ChatGPT and asks the agent to add assertions, remove flaky waits, extract selectors, and suggest a data-testid strategy. Replace [PASTE RECORDED CODE HERE] with code from Codegen, [APP_NAME] with your app's name, and [ONE-SENTENCE DESCRIPTION] with one sentence about what your app does.
  5. 5.Copy the final test from the ChatGPT response. Go back to Playwright: open «API testing» -> select «Test runner» at the top of the page. Paste the code into the Playwright online editor (the «Try Playwright» section on the homepage) and click Run - the test runs right in your browser, no installation needed.

    If no online runner is available, copy the file into your project repo and run it with npx playwright test - but Try Playwright is enough for a first run.

    Try Playwright
  6. 6.Save the finished test file in your repository. Go back to ChatGPT and ask the agent to generate 3 more negative scenarios (wrong password, empty fields, entity deletion) - use the prompt below. Add them to the same project - your basic AI autotesting agent is ready.

    These tests can run locally or in CI (GitHub Actions, GitLab CI) - Playwright is officially supported.

    ChatGPT About this tool
    Prompt
    Based on the test above, generate 3 additional Playwright test cases for [APP_NAME]:
    1. Login with invalid credentials - assert error message is visible.
    2. Submit form with empty required fields - assert validation messages.
    3. Delete an entity and verify it disappears from the list.
    
    Use the same selectors object. Output as a single file, one describe block with 3 it blocks.
    What this prompt doesEnglish prompt: the agent generates three negative tests - invalid data, empty fields, entity deletion. Replace [APP_NAME] with your app's name.
💰 What it costs to followprices as of 2026-07
  • freeGoogle AI Studio / Gemini APIFree plan: 15 requests per minute and 1500 requests per day for the gemini-1.5-flash model. No credit card required.
  • freePythonPython is a free open-source programming language; installation and use cost nothing.
  • freeGoogle AI Studio Tuning (fine-tuning)Fine-tuning is available within the free Gemini plan, but requires your own dataset of 100 - 500 examples. Check the pricing page for current limits.
Try it and be the first to check in

Why today

1
videos from creators in 48h
8.1K
total views

AI services change fast - interfaces and free limits may differ from what's described.