Your browser sucks, JavaScript disabled! Gunnar's console needs JavaScript and WebAssembly. Git over SSH on port 2222 does not.

nordisk/edda

crates/nornir-testmatrix/.nornir/testmatrix-uiplane-for-idiots.md

uiplane for idiots — the 60-second version

The problem in one picture

The old matrix tested each button alone in a room:

[ render the Sverige button by itself ]  →  ✅ "it renders!"

…but in the real running app, that button lived on a screen you could never get to:

[ Home ] --click--> [ Bench ]        (the app)
                    [ Sverige ]   ← no door leads here. The button is stranded.

Green test, broken app. uiplane fixes this: it maps the app as rooms (planes) with doors (transitions), then walks the real app room by room and checks each button is there AND it actually did something.

The three words

A plan is the whole map: rooms + doors + where you start.

What "RED" means (4 ways to fail)

  1. Unreachable — there's no door to the room. (The Sverige bug.)
  2. Absent — you got to the room, but the button isn't there. (Shipped build dropped it.)
  3. NotRan — the button is there, but clicking it did nothing / the pane is blank. (Empty data = RAGNARÖK.)
  4. (anything that isn't "got there + button present + it ran") → RED.

Only ReachableAndRan is green.

The 4 lines you actually write

let plan = UiPlan::new("Home")
    .plane(UiPlane::new("Bench").surface(UiSurface::new("bench_chart")))
    .edge("Home", "Bench", "click_tab:Bench");

let report = RobotPlan::walk(&plan, &mut my_driver);
assert!(report.is_green(), "{}", report.summary());

my_driver is a tiny thing that knows how to (a) tell which room it's in, (b) click a door, (c) list what buttons are present + which ones ran — all read from your app's state_json, never from looking at pixels.

Don't have a real app handy? Use the fake one

let mut driver = MockDriver::new("Home")
    .with_transition("click_tab:Bench", "Bench")
    .with_plane_state("Bench", ["bench_chart"], ["bench_chart"]); // present, ran

Flip ["bench_chart"] (ran) to [] and watch the SAME test go RED — that's how you prove the test can actually catch the bug ("sensitivity"). If it can't go red, it's testing nothing.

Why you should care

A green uiplane row means: a robot started the real app, walked to this screen through the actual doors, found this button, and saw it do real work — with no human looking at anything. That's the only kind of green worth trusting.