Posium LogoPOSIUM

Writing Tests with the AI Editor

Learn how to write and manage tests using Posium's AI Editor

Generating Tests Using the AI Agent

You can use the Posium AI agent to automatically generate functional tests for your application β€” no manual scripting required. This guide walks you through how to generate a login test using the AI agent.

πŸ’‘ Tip: AI-based test generation is free. Only test execution consumes credits.


πŸ”§ Prerequisites

Before generating tests:

  • Ensure your project is set up and accessible
  • Save required variables like username, password, and any other environment-specific inputs in the Project Settings section
  • Confirm that the Run Agent button is visible on the project dashboard

πŸš€ Steps to Generate a Test

  1. Click Run Agent

    • This launches the test generation workflow
  2. Select a Project

    • Choose the relevant project (e.g. staging or production)
  3. (Optional) Select a Dependency

    • If your test builds upon an earlier one (e.g. login flow), you can select it
    • Otherwise, leave this blank for independent tests

Run Agent

  1. Choose a Test Scenario

    • For example: Render base URL and login with credentials
  2. Run the Agent

    • The AI agent spins up a browser (Chromium-based by default)
    • It loads the base URL from your project settings
    • It automatically fills in the login form using username and password stored in the project settings
    • It clicks β€œSign In” and verifies that login is successful by checking UI elements like the user menu Agents generates test steps
  3. Watch the Test Run

    • You can inspect every test step that is generated
  4. Save the Test

    • Once the steps look good, click Save
    • The test is now available in your project

πŸ“ Viewing Your Generated Tests

  • Go back to your Project Dashboard
  • Open the Tests tab
  • Your new test will appear alongside existing ones
  • Click into any test to review or edit it

βœ… Notes

  • The AI agent uses the credentials and environmental variables configured in Project Settings to generate realistic, runnable tests
  • You can generate as many tests as you want β€” AI usage is free
  • Only when you execute the test are credits consumed

On this page