Skip to content

Use with AI Agents

Ask your AI coding agent for BELLATRIX Java tests for web, desktop and mobile apps. Set it up once with the BELLATRIX Agent CLI.

Overview

With the BELLATRIX Agent, you describe a test in plain language and your AI coding agent (Claude Code, GitHub Copilot, Cursor or another agent) writes the BELLATRIX Java test, runs each step in the live app and resolves stable locators. You talk to the agent; the agent uses the bellatrix CLI, so you never need to call it yourself.

The full guide is at bellatrix.solutions/agent. This page is the short version for Java; see also Java and TypeScript.

Install the CLI

Once per machine. The CLI is a .NET tool, so you need the .NET SDK 8 or later even for Java projects. It is the Bellatrix.Cli package on NuGet:

dotnet tool install -g Bellatrix.Cli
bellatrix --version

The last command prints the version, for example {"version":"3.2.0"}. Details, drivers and updates: Install and update.

Set Up Your Agent

In the root of your test repository, run:

bellatrix init --agent claude --language java --domains desktop,web,mobile

Replace claude with your agent and keep only the app types you test. init writes the BELLATRIX skills and helper agents into your repository, in your agent’s own layout. Supported agents and app types: Support matrix. All options: Set up your agent.

Set Up the Maven Project

The skills target BELLATRIX-Java (Java 19). It is not on Maven Central yet, so install it from source once:

cd BELLATRIX-Java
mvn -B -q install -DskipTests -pl bellatrix.web,bellatrix.desktop,bellatrix.android,bellatrix.ios -am

Then depend on the module for your app type:

<dependency>
    <groupId>solutions.bellatrix</groupId>
    <artifactId>bellatrix.web</artifactId> <!-- or bellatrix.desktop / bellatrix.android / bellatrix.ios -->
    <version>1.0</version>
    <scope>test</scope>
</dependency>

Ask Your Agent

Then ask your agent, for example:

Write a BELLATRIX test for TC-1006 Convert 1 meter to feet in the Windows Calculator.
Automate TC-1006.
Run TC-1006 in Calculator first and show me the locators you found.

See Automate a test case for how to write the test case and what the agent does with it.

Learn More