Introducing BELLATRIX Agent: From Manual Test Case to Automated Test

Introducing BELLATRIX Agent: From Manual Test Case to Automated Test

Agentic framework BELLATRIX logo, the agent badge and headline; free and open source; the install command.

What Is BELLATRIX Agent?

BELLATRIX Agent turns a manual test case into a framework-quality automated test. It doesn’t generate tests from a blank page. It works inside the BELLATRIX project you already have: it runs the case against your real application, maps your page objects and components, adds only what is missing, and writes the test the way the framework intends.

The agent is model-agnostic. It runs inside the coding agent your team already uses (Claude Code, Cursor, GitHub Copilot, Codex CLI or Gemini CLI) and is driven by skills: instruction sets that teach it one part of BELLATRIX for one language and platform.

In this article we’ll automate a real manual test case end to end: TC-1006, “Convert 1 meter to feet”, in Windows Calculator.

Install the Agent

Install the CLI from NuGet, then run init in the root of your test project and pick the language and platform you automate. The agent gets the matching skill set and nothing else, so a C# desktop project never receives Java Android instructions.

$ dotnet tool install -g Bellatrix.Cli
$ bellatrix init --agent claude --language csharp --domains desktop
✓ .claude/skills/bellatrix-desktop-components
✓ .claude/skills/bellatrix-desktop-locators-and-waits
✓ .claude/skills/bellatrix-desktop-page-objects-and-patterns
✓ .claude/skills/bellatrix-desktop-execute-scenario
✓ .claude/skills/bellatrix-desktop-generate-code
WebMobileDesktop
C#cs-webcs-mobilecs-desktop
Javajava-webjava-mobilejava-desktop
TypeScriptts-webts-mobilets-desktop

Definition

A skill is a set of instructions for one concern (components, locators and waits, page objects and patterns, scenario execution or code generation), written for one BELLATRIX edition.

The Test Case

TC-1006 is an ordinary manual test case, versioned as Markdown. It could come from SPECTRA, from your test management tool or from a tester.

# Convert 1 meter to feet using Length converter

## Preconditions
Calculator is open in Unit Converter mode with Length category selected

## Steps
1. Open Unit Converter from the navigation menu
2. Select 'Length' category
3. Select 'Meters' as the source unit
4. Select 'Feet' as the target unit
5. Enter '1' in the meters input field

## Expected Result
The feet field displays approximately 3.28084 feet

Then we ask the coding agent one thing.

Automate TC-1006 with BELLATRIX

Step 1: Execute on the Live App

Before writing any code, a separate BELLATRIX execution agent launches the application and runs the five steps through the bellatrix desktop CLI. It snapshots the UI tree, clicks through the navigation and reads the result, exactly as a tester would.

bellatrix desktop start-session --app calculator --session s1 --json
# Calculator launched

bellatrix desktop snapshot --session s1 --json
# { path, elementCount, summary }

bellatrix desktop click --session s1 --locator "//*[@AutomationId='TogglePaneButton']"
# navigation open, Length selected

bellatrix desktop click --session s1 --locator "//*[@AutomationId='Units1']"
# unit list open

bellatrix desktop get-text --session s1 --locator "//*[@AutomationId='Value2']"
# 3.28084 Feet, matches TC-1006

Every locator goes through the locator specialist and is validated on the live application before it is allowed into code. Generated tests usually fail here because they guess locators from memory. The agent only uses the ones it has seen work.

ElementValidated locator
Navigation//*[@AutomationId=‘TogglePaneButton’]
Length//*[@AutomationId=‘Length’]
Source unit//*[@AutomationId=‘Units1’]
Target unit//*[@AutomationId=‘Units2’]
Unit item//ListItem[@Name=‘Meters’]

Note

The run also produces findings. Here: the unit list items are not children of the ComboBox. They sit at the root of the window. That single observation decides what the agent writes next.

Step 2: Read the Project

Next, the agent maps what your project already has, so it can reuse instead of regenerate.

Found in the projectDecision
Pages/UnitConverterWindow/ Map, Actions, AssertionsReuse
Pages/Shared/NumberPadSection.csReuse
Models/ConverterType.cs, LengthUnit.csReuse
Components/ (no WinUI ComboBox yet)Add
Tests/UnitConverter/UnitConverterConversionTests.csEdit

Step 3: Add Only What Is Missing

The built-in ComboBox can’t select a WinUI item that lives at the window root. Instead of a workaround inside the test, the agent adds a custom component that overrides SelectByText, the extension point BELLATRIX provides for this. The framework package itself stays untouched.

using Bellatrix.Desktop;
using OpenQA.Selenium;

namespace Demo.DesktopTests.Components;

public class WinUiComboBox : ComboBox
{
    public override void SelectByText(string value)
    {
        // Click the ComboBox to expand the dropdown flyout
        WrappedElement.Click();

        // WinUI3 popup items appear at the root of the accessibility tree,
        // not as element children of the ComboBox
        new App().Components.CreateByXPath<Button>($"//ListItem[@Name='{value}']").Click();
    }
}

Then it updates the page object map, so every test that uses the unit dropdowns benefits, not only this one.

using Demo.DesktopTests.Components;

// ===== UNIT DROPDOWNS =====
public WinUiComboBox InputUnitComboBox =>
    App.Components.CreateByAutomationId<WinUiComboBox>("Units1");

public WinUiComboBox OutputUnitComboBox =>
    App.Components.CreateByAutomationId<WinUiComboBox>("Units2");

Only now does the agent write the test. It uses the existing UnitConverterWindow and models, follows the naming conventions it found in the project, and tags the test with the manual test case ID.

[TestFixture]
[App("Microsoft.WindowsCalculator_8wekyb3d8bbwe!App", Lifecycle.ReuseIfStarted)]
public class UnitConverterConversionTests : DesktopTest
{
    [Test]
    [ManualTestCase("TC-1006")]
    public void LengthConverter_OneMetreToFeet_DisplaysThreePointTwoEight()
    {
        var converter = App.Create<UnitConverterWindow>();

        converter.NavigateTo(ConverterType.Length);
        converter.SelectInputUnit(LengthUnit.Meters);
        converter.SelectOutputUnit(LengthUnit.Feet);
        converter.EnterValue("1");

        converter.AssertOutputValueContains("3.28084 Feet");
    }
}

Before handing back, it builds the project and updates the manual test case, so coverage tools see the link.

dotnet build Demo.DesktopTests/Demo.DesktopTests.csproj
# Build succeeded.

# test-cases/unit converter/TC-1006.md
automated_by: UnitConverterConversionTests

What the Pull Request Contains

  • Components/WinUiComboBox.cs: new custom component, overrides SelectByText
  • Pages/UnitConverterWindow/UnitConverterWindow.Map.cs: Units1 and Units2 now use WinUiComboBox
  • Tests/UnitConverter/UnitConverterConversionTests.cs: +13 lines, [ManualTestCase(“TC-1006”)]
  • test-cases/unit converter/TC-1006.md: automated_by updated

Note

Review the result like any other pull request. Because the agent follows your conventions, reviewers see normal BELLATRIX code, not a wall of generated selectors.

Working With SPECTRA

BELLATRIX Agent works with any manual test case, but it pairs naturally with SPECTRA. SPECTRA generates grounded test cases from your documentation; the agent automates them; the automated_by link flows back into the SPECTRA coverage dashboard, so automation coverage is measured, not estimated.

Summary

BELLATRIX Agent runs the test case first, validates every locator on the live app, reuses what your project already has, extends it the way the framework recommends, and hands back a built test linked to its source. Install it with one command for your language and platform, and point it at your first manual test case.

Download Read the Docs

Related Articles

Desktop Automation, Resources

Most Complete WinAppDriver C# Cheat Sheet

The next article from the desktop automation series will be dedicated to WinAppDriver.

Most Complete WinAppDriver C# Cheat Sheet

Automation Tools, Testing Practices

Fewer Test Cases, More Bugs Found: Introducing Testimize

Testimize is an open-source .NET library that generates boundary-aware test data and uses a Hybrid Artificial Bee Colony algorithm to keep the best cases.

Fewer Test Cases, More Bugs Found: Introducing Testimize

Automation Tools, Testing Practices

What Is SPECTRA? AI-Native Test Case Generation From Your Documentation

SPECTRA turns your documentation into versioned Markdown test cases, checks every step with an independent critic, runs the suite and traces coverage.

What Is SPECTRA? AI-Native Test Case Generation From Your Documentation

Desktop Automation, Web Automation

Automate Windows Desktop Apps with WebDriver- WinAppDriver C#

In the Desktop Automation Series, you can find invaluable tips and tricks about desktop automation. I will dedicate the next couple of articles on the automatio

Automate Windows Desktop Apps with WebDriver- WinAppDriver C#

Desktop Automation, Free Tools

Windows Tests Running Slow? Maybe Not for Long...

In this post, we will go through the current challenges of Windows desktop automation, the limitations of existing tools, and a possible solution to improve spe

Windows Tests Running Slow? Maybe Not for Long...

Desktop Automation

Windows WebDriver- WinAppDriver- Page Objects C#

In the last article from the Desktop Automation Series, I showed you how you could automate Windows desktop apps through WinAppDriver. A framework developed by

Windows WebDriver- WinAppDriver- Page Objects C#
Anton Angelov

About the author

Anton Angelov is Managing Director, Co-Founder, and Chief Test Automation Architect at Automate The Planet — a boutique consulting firm specializing in AI-augmented test automation strategy, implementation, and enablement. He is the creator of BELLATRIX, a cross-platform framework for web, mobile, desktop, and API testing, and the author of 8 bestselling books on test automation. A speaker at 60+ international conferences and researcher in AI-driven testing and LLM-based automation, he has been recognized as QA of the Decade and Webit Changemaker 2025.