Skip to main content

AI Test Generation: Requirements to Code

TestMu AI provides a complete workflow to convert your manual test requirements into fully automated test scripts,from requirement input to executable code. This guide walks through the end-to-end flow using Test Manager and KaneAI.

Overview

The conversion flow has four stages:

  1. Set up your project in Test Manager
  2. Provide requirements,text, documents, images, audio, Jira/ADO tickets, or record user interactions
  3. Generate test scenarios,AI creates structured test cases from your input
  4. Automate and export code,convert generated test cases into automation scripts across frameworks

Step 1: Create a Project

Start by creating a project in TestMu AI Test Manager. A project is the container for all your test cases, test runs, and configurations.

  1. Navigate to Test Manager.
  2. Click Create New Project.
  3. Enter the project name and description.
  4. Save the project.

For detailed steps, see Create Projects.


Step 2: Generate Test Scenarios with AI

Navigate to the Test Case Listing page within your project and click Generate With AI.

Generate with AI button in Test Manager

You can also access this from KaneAI by clicking Generate Scenarios on the Agent page.

Generate Scenarios from KaneAI

Supported Input Formats

Provide your requirements in any of the following formats:

Input TypeHow to Add
TextType your requirement directly in the input box
DocumentsUpload PDFs, spreadsheets (CSV/XLSX), JSON, XML
ImagesUpload screenshots, wireframes, or UI mockups
AudioRecord audio or upload audio files describing the feature
VideosUpload walkthrough or demo videos
Jira TicketsLink Jira issues (epics, stories, tasks) via the pin icon
Azure DevOpsLink ADO work items via the pin icon
Enter requirements for AI test generation
tip

Before generating, configure Max Scenarios, Max Test Cases per Scenario, and toggle Memory Enhancement to leverage your existing test case repository and avoid duplicates.

Configure generation settings

Press Enter to generate. The AI analyzes your input and produces structured test scenarios with test cases.

AI generated test scenarios

Each scenario is tagged with priority (Must have, Should have, Could have) and each test case is categorized as Positive, Negative, or Edge.

Refine with Conversation Layer

After generation, use the Conversation Layer to refine your test cases through natural language,add coverage, remove duplicates, reorganize scenarios, or update details without manual editing.

Conversation Layer for refining test cases

For the full guide on conversational refinement, see AI Test Case Generator.


Step 3: Save or Automate

Once your test scenarios are ready, select the test cases you want to keep and choose one of two paths:

Create or Automate test cases

Option A: Create Test Cases

Click Create to save the test cases to your Test Case Repository in Test Manager. These can be used for manual test planning, assigned to test runs, or shared with your team.

Option B: Create and Automate with KaneAI

Click Create and Automate to save the test cases and automatically send them to KaneAI for automation. KaneAI executes each test case using natural language understanding and generates automation scripts.


Step 4: Generate Automation Code

Once KaneAI has automated your test cases, you can generate code in multiple frameworks and languages.

  1. Open the automated test case in KaneAI.
  2. Click Generate New Code.
  3. Select your desired framework and language.
Code generation page with framework selection

Supported Frameworks

PlatformFrameworkLanguages
WebSeleniumPython
WebPlaywrightJavaScript, Python
WebCypressJavaScript
WebWebdriverIOJavaScript
MobileAppiumPython, Java, JavaScript

The generated code is fully accessible,download it, customize it, and integrate it into your CI/CD pipeline or execute it on TestMu AI HyperExecute.

For the full code generation guide, see KaneAI Code Generation.


Alternative Path: Record User Interactions

Instead of providing written requirements, you can use KaneAI's Manual Interaction Mode to record real user actions and convert them into automated tests.

  1. Start a new test in KaneAI.
  2. Switch to Manual Interaction mode.
  3. Perform actions on your application,clicks, form fills, navigation.
  4. KaneAI captures each action and converts it into test steps.
  5. Generate automation code from the recorded steps.

This is useful when requirements are easier to demonstrate than describe, or when you want to capture existing user workflows as automated tests.

For the full guide, see KaneAI Manual Interaction Mode.


End-to-End Flow Summary

Requirements (text, docs, images, audio, Jira, ADO)


AI Test Case Generator (Test Manager / KaneAI)

├── Create ──► Test Case Repository (manual testing)

└── Create and Automate ──► KaneAI Automation


Code Generation
(Selenium, Playwright,
Cypress, Appium, etc.)


Download / CI/CD / HyperExecute

Test across 3000+ combinations of browsers, real devices & OS.

Book Demo

Help and Support

Related Articles