| Crates.io | probador |
| lib.rs | probador |
| version | 1.0.0 |
| created_at | 2025-12-14 13:35:02.762495+00 |
| updated_at | 2026-01-08 23:12:38.985939+00 |
| description | CLI for Probar: Rust-native testing framework for WASM games |
| homepage | |
| repository | https://github.com/paiml/probar |
| max_upload_size | |
| id | 1984486 |
| size | 743,662 |
probador (Spanish: "tester") is the CLI tool for Probar - a Playwright-compatible testing framework for WASM games and applications.
Note: The library is published separately as jugar-probar.
cargo install probador
# Validate a playbook state machine
probador playbook login.yaml --validate
# Run with mutation testing (M1-M5 falsification)
probador playbook login.yaml --mutate
# Export state diagram
probador playbook login.yaml --export svg -o diagram.svg
# Run tests
probador test
# Run tests with coverage
probador coverage --html
# Watch mode for development
probador watch tests/
# Start dev server for WASM
probador serve --port 8080
| Command | Description |
|---|---|
test |
Run tests with optional filtering |
playbook |
YAML-driven state machine testing |
coverage |
Generate coverage reports |
record |
Record test execution as GIF/MP4 |
report |
Generate HTML/JSON/JUnit reports |
serve |
Development server for WASM |
watch |
Watch mode with hot reload |
init |
Initialize new test project |
config |
View/manage configuration |
probador supports YAML-driven state machine testing with mutation testing:
# login.yaml
version: "1.0"
name: "Login Flow"
machine:
id: "login"
initial: "logged_out"
states:
logged_out:
id: "logged_out"
logging_in:
id: "logging_in"
logged_in:
id: "logged_in"
final_state: true
transitions:
- id: "start_login"
from: "logged_out"
to: "logging_in"
event: "submit"
- id: "complete_login"
from: "logging_in"
to: "logged_in"
event: "success"
# Validate
probador playbook login.yaml --validate
# Export as SVG diagram
probador playbook login.yaml --export svg -o login.svg
# Mutation testing (M1-M5 classes)
probador playbook login.yaml --mutate
| Class | Description |
|---|---|
| M1 | State removal |
| M2 | Transition removal |
| M3 | Event swap |
| M4 | Target swap |
| M5 | Guard negation |
For programmatic usage in Rust tests, add the library crate:
cargo add jugar-probar --dev
use jugar_probar::prelude::*;
#[test]
fn test_game() {
let mut gui = gui_coverage! {
buttons: ["start", "quit"],
screens: ["menu", "game"]
};
gui.click("start");
gui.visit("game");
assert!(gui.meets(50.0));
}
MIT OR Apache-2.0