Skip to main content

Generate test cases from User Sessions

Last updated: June 2026

User Sessions lets you find captured real-user sessions, review the recorded steps, and generate automated test cases from selected sessions. Use this workflow when you want to convert specific captured behavior into test cases before reviewing a full user journey map.

Journey maps remain useful for coverage analysis, flow review, and map-based test generation. Generating from User Sessions helps you move faster when you already know which sessions represent the scenarios you want to automate.

Requirements
  • TrueTest Agent is configured and collecting sessions for the application under test (AUT). See Configure TrueTest Agent.
  • The project is linked to an active AUT configuration with at least one data tracking environment.
  • AI features are enabled and available for your organization.
  • You have permission to generate test cases in the project.
  • A script repository or test project is configured for generated TrueTest artifacts.

Search for user sessions​

  1. Open the User Sessions (beta) page for your project.
    The page appears under Monitoring > User Sessions.
  2. Select the required filters:
    • Tracking Environment
    • Tracking Period with start date and end date
  3. Optionally refine the search with:
    • User session attributes: Enter an attribute query to find sessions with matching metadata. See Set user session attributes for syntax and examples.
    • URL keywords: Enter comma-separated keywords, such as checkout, payment. Keywords are matched as text, not as regular expressions.
  4. Click Apply filters.

The results table shows session details such as session ID, tracking environment, start time, last data received, generated test case status, number of steps, and available actions. You can show up to 100 sessions per page.

To clear the selected filters, click Reset.

Review a session before generation​

Before generating a test case, open the session details to confirm that the captured behavior matches the scenario you want to automate.

  1. In the User Sessions table, click the View details button for a session.

    Click the View details button of a user session
  2. Review the opened session detail panel.

  3. Review the session source, start and end time, session attributes, test steps, and replay panel when replay data is available.

    Session detail panel with replay, test steps, and Generate button

Reviewing the session helps you avoid generating test cases from incomplete, irrelevant, or duplicate user behavior.

Generate test cases from sessions​

Optionally, you can click the Generate button to generate test case one by one in the Session Replay page of each session, or generate in bulk from the User Sessions table.

  1. In the User Sessions table, select the sessions you want to generate.
  2. Click Generate test cases.
  3. Wait for TrueTest to finish generating the test case.

When the test case is ready, the session row and detail view show a test case link, such as TC-1. Click the test case link to open the generated test case in the linked project when the link is available.

TrueTest generates the test case name and description automatically. The User Sessions UI does not provide fields to edit them before generation.

note

Sessions that already have generated test cases or are currently generating cannot be selected. After you submit a bulk generation request, selected sessions are queued or disabled until their generation status is refreshed.

How User Sessions generation works with journey maps​

If one of the selected sessions is already represented by an active flow in the latest completed journey map for the same tracking environment, and that flow does not already have a generated test case, TrueTest reuses that existing flow for test generation instead of creating another copy of the same captured behavior.

In practice, this means session-first generation and journey-map generation can share the same underlying flow when they point to the same captured session in the same tracking environment.

Use journey maps when you want to review coverage across many flows. Use User Sessions when you want to quickly automate specific captured sessions.

Generated artifacts​

Generated artifacts are stored in the project repository configured for the AUT. This repository is a project-level configuration, not something chosen from the User Sessions filter values.

When a tracking environment name is available, TrueTest writes generated artifacts under an AI-Generated/<tracking-environment-name> folder in the Katalon project repository, including:

  • Test Cases/AI-Generated/<tracking-environment-name>
  • Scripts/AI-Generated/<tracking-environment-name>
  • Object Repository/AI-Generated/<tracking-environment-name>
  • Data Files/AI-Generated/<tracking-environment-name>
  • Test Data Driven/AI-Generated/<tracking-environment-name>

TrueTest also updates required generated support keywords under the Keywords/truetest package.

To keep generated artifacts organized, use naming conventions, tags, and project-level organization where available. Avoid manually moving generated TrueTest files out of the generated folders unless your team has confirmed the move is supported by your current TrueTest and repository workflow.

Limitations​

  • Required filters: You must select a tracking environment, start date, and end date before searching.
  • Date range rules: The start date must be on or before the end date. The end date must be today or earlier. The selected range must be 90 days or less.
  • Search behavior: Session search runs asynchronously. If a search fails, adjust the filters and try again, or contact Katalon Support if the failure continues.
  • Generation eligibility: You cannot generate another test case from a session that already has a generated test case, is currently generating, or is already queued for generation.
  • Generated metadata: In this workflow, TrueTest submits generated test cases with automatically assigned name and description values.
Was this page helpful?