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
| Web | Mobile | Desktop | |
|---|---|---|---|
| C# | cs-web | cs-mobile | cs-desktop |
| Java | java-web | java-mobile | java-desktop |
| TypeScript | ts-web | ts-mobile | ts-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.
| Element | Validated 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 project | Decision |
|---|---|
| Pages/UnitConverterWindow/ Map, Actions, Assertions | Reuse |
| Pages/Shared/NumberPadSection.cs | Reuse |
| Models/ConverterType.cs, LengthUnit.cs | Reuse |
| Components/ (no WinUI ComboBox yet) | Add |
| Tests/UnitConverter/UnitConverterConversionTests.cs | Edit |
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");
Step 4: Write, Build and Link the Test
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.
