A ready-to-use AI recipe every day. And any video link becomes a step-by-step technique.

590 ready recipes · new every day

Recipe of the day · Friday, July 31

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

Workfree pathfor beginnersready prompt
  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
    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 does: English 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
    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 does: English prompt: the agent generates three negative tests - invalid data, empty fields, entity deletion. Replace [APP_NAME] with your app's name.
Try it and be the first to check in
Why today

Signal: 1 videos by 1 creators, 8.1K views in 7 days

Recipes by topic

Full archive

Pick what fits you - your choice is remembered

📩 Get the recipe of the day in Telegram

Yesterday and earlier

Full archive

AI Digest

Full feed

Our carousel cards from social media - browse with the arrows

An animated saga about an AI blacksmith awakening action in people. Values and mission - on screen.