Use with AI Agents
Ask your AI coding agent for BELLATRIX TypeScript web tests. 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 TypeScript test, runs each step in a live browser and resolves stable locators. You talk to the agent; the agent uses the bellatrix CLI, so you never need to call it yourself.
TypeScript covers web. For desktop and mobile apps, use the C# or Java version of BELLATRIX.
The full guide is at bellatrix.solutions/agent. This page is the short version for TypeScript; 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 TypeScript 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"}. For web, the CLI starts and stops a local browser driver itself. Details and updates: Install and update.
Set Up Your Agent
In the root of your test repository, run:
bellatrix init --agent claude --language typescript --domains web
Replace claude with your agent. init writes the BELLATRIX skills and helper agents into your repository, in your agent’s own layout. Supported agents: Support matrix. All options: Set up your agent.
Set Up the npm Project
The skills target @bellatrix/web. It is not on npm yet. Reference a BELLATRIX-JavaScript checkout with file: dependencies:
"devDependencies": {
"@bellatrix/core": "file:../BELLATRIX-JavaScript/@bellatrix/core",
"@bellatrix/web": "file:../BELLATRIX-JavaScript/@bellatrix/web",
"@bellatrix/extras-web": "file:../BELLATRIX-JavaScript/@bellatrix/extras/web"
}
and add this line to .npmrc, so npm copies the packages instead of linking them:
install-links=true
Ask Your Agent
Then ask your agent, for example:
Write a BELLATRIX test for the login page: sign in with a valid user and check the account name.
Automate TC-2001.
Open the login page 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
- BELLATRIX Agent documentation: workflow, web guide, CLI reference, known limits.
- Release notes and the Agent changelog.
- The CLI and the skill templates are open source: BELLATRIX-Agent on GitHub.