test

test is a command for Claude Code from mendixlabs/mxcli. It costs 13 tokens per session (1,072 once invoked), scanned A, original, Apache-2.0.

A command for running Mendix microflow tests and checking the running application in a browser. Microflows are Mendix workflows that contain application logic.

In plain words
What is it for?
Use it to open or reuse a browser session, inspect pages, assert that widgets exist, take screenshots, log in, and close the session.
Why use it?
It combines automated tests with browser checks, helping confirm that both backend workflows and visible pages work.

Command for Claude Code

Written for Claude Code: argument-hint in frontmatter.

Needs its repository: it runs a file that does not travel with it, so clone the repository first. The line is bash tests/verify-customers.sh.

Good fit Use it to open or reuse a browser session, inspect pages, assert that widgets exist, take screenshots, log in, and close the session.

Compare 6 commands from other repositories ↓
Install

Getting it into your agent

It runs from inside its repository, so the clone comes first — what it calls does not travel with the file alone.

Clone the repo
git clone --depth 1 https://github.com/mendixlabs/mxcli
agentmods
npx agentmods add commands/mendixlabs/mxcli/test

Made for: Claude Code.

Wrote this? Show the measurements

A badge with what this costs and how it scanned, read live from this page, so it follows the numbers instead of freezing them. Markdown for a README, HTML for a documentation site or a project page.

agentmods badge for test

README.md
[![agentmods](https://agentmods.dev/badge/commands/mendixlabs/mxcli/test/github.svg)](https://agentmods.dev/commands/mendixlabs/mxcli/test)
Your own site
<a href="https://agentmods.dev/commands/mendixlabs/mxcli/test"><img src="https://agentmods.dev/badge/commands/mendixlabs/mxcli/test/github.svg" alt="Measured on agentmods" height="20"></a>

Or the 80×15 button, for a site that already has a row of RSS and ATOM ones. Only the verdict fits; the numbers stay here.

agentmods 80×15 button for test

Your own site · 80×15
<a href="https://agentmods.dev/commands/mendixlabs/mxcli/test"><img src="https://agentmods.dev/badge/commands/mendixlabs/mxcli/test.svg" alt="Reviewed on agentmods" width="80" height="20"></a>
Per session 13 Only the description is in the session, so the agent can decide to use it. The body loads when it is invoked.
When invoked 1,072 The whole file, excluding the scripts and references it only reads on demand.
Security scan A 0 findings. A grade says what 26 rules found in the file — not that it is safe.
Origin original No closer match found in the catalogue.
Token cost

What it costs to keep this loaded

Counted locally with the o200k_base tokenizer, which is exact for GPT models; Claude uses its own tokenizer and its counts differ. Treat this as one consistent yardstick across the catalogue rather than a bill. Prices are per million input tokens.

ModelPer sessionOnce invoked
Fable 5.1 $0.00013 $0.01072
Opus 5.5 $0.00005 $0.00429
Sonnet 5.5 $0.00003 $0.00214
Haiku 4.5 $0.00001 $0.00107

Measured 12d ago against content hash 3093ebb9f277, method: parsed. Prices are Anthropic first-party input rates as of 2026-10-07, from the pricing page.

Security

Grade A, and why

test scanned grade A with 0 findings against 26 rules in 11 categories — prompt injection, anti-refusal, data exfiltration, privilege escalation, supply chain, agent snooping, system-prompt leakage, SSRF and excessive agency — measured 12d ago.

A static scan of the body, not an audit. Every finding is printed with the line that produced it so you can judge whether it matters here. A mod is markdown that instructs an agent; that is exactly why what it instructs is worth reading.

Nothing flagged

None of the 26 patterns this scan looks for appear in this file: no shell pipes, no recursive deletes, no credential paths, no hidden text, no instruction-override or anti-refusal phrasing, no agent-config snooping. That is not a guarantee, it is the absence of the things that are checkable.

.claude/commands/mendix/test.md · 117 lines

How it starts

The opening of the file, as written. The whole thing — 117 lines — stays where its author put it; the contents beside it link to each section on GitHub.

Test App

Verify the running Mendix application using playwright-cli.

Prerequisites

  • App must be running: mxcli docker run -p app.mpr --wait
  • playwright-cli installed (included in devcontainer)

First: does the page work? One call, text, no screenshot

mxcli playwright check /p/Customer_Overview /p/Order_Overview -p app.mpr
mxcli playwright check /p/Customer_Overview -p app.mpr --role User \
    --assert-text 'Customers' --assert-count '.mx-name-dgCustomers [role=row]>=1'

One verdict line per page (title, heading, rows, text, console errors, banners); exit 0 pass, 1 fail, 2 could not check. It signs in itself (--user/--password, --role, or a demo user from -p) and reuses the saved session. Do not hand-roll playwright-cli login/goto/sleep/screenshot sequences for this, and screenshot only for a visual question (--screenshot out.png, read once). The playwright-cli commands below are for interaction tests.

Session lifecycle

Manage the browser session across commands (attach/reuse, check, tear down):

mxcli playwright open -p app.mpr    # open or attach to the session
mxcli playwright status             # is it live? what page?
mxcli playwright close [--all]      # tear down

Typical loop: open once and log in, then iterate mxcli playwright verify … --keep-open.

Quick Start

# Open browser and take snapshot
playwright-cli open http://localhost:8080
playwright-cli snapshot

# Verify a widget exists (page/DOM assertions run in page context -> eval)
playwright-cli eval "() => document.querySelector('.mx-name-widgetName') !== null"

# Take a screenshot
playwright-cli screenshot

# Close when done
playwright-cli close

Login (Security Enabled)

Only needed for playwright-cli interaction sessions (playwright check signs in itself). Dispatch an input event after setting .value, or Mendix sees an empty field:

playwright-cli open http://localhost:8080
playwright-cli eval "() => { const el = document.querySelector('#usernameInput'); el.value = 'MxAdmin'; el.dispatchEvent(new Event('input', {bubbles: true})) }"
playwright-cli eval "() => { const el = document.querySelector('#passwordInput'); el.value = 'AdminPassword1!'; el.dispatchEvent(new Event('input', {bubbles: true})) }"
playwright-cli eval "() => document.querySelector('#loginButton').click()"
playwright-cli eval "() => new Promise(r => setTimeout(r, 3000))"
playwright-cli state-save mendix-auth

Read the full file on GitHub · 117 lines

Changes

What this file has done since we first saw it

Hashed on every crawl. A supply-chain change to an agent config is a question of when, not whether, so the history is kept rather than the latest state alone.

  1. 12d ago Changed · +20 lines 3093ebb9f277
  2. 1mo ago First seen · 97 lines · 13 tokens per session scan A 00e3eea72226

Subscribe to this mod's changes

test is a command published in the GitHub repository mendixlabs/mxcli (131 stars, last pushed yesterday), licensed Apache-2.0. It adds 13 tokens to every session and 1,072 once invoked, about $0.0001 per session on Opus 5.5. A static security scan graded it A with 0 findings. No closer match exists in the catalogue, so it is treated as the original; first seen 2026-08-30.