Skip to content
pvvlvz edited this page Nov 16, 2026 · 3 revisions

The mod is tested at three levels, and every test passes on the current code.

Level Count What it covers
Unit tests (src/test) 30 Web map tooltips (names are escaped, never HTML); Track geometry on straights, curves, slopes and peaks; reversing; car spacing; saving and loading a train and its settings; automatic driving between termini; red signals; top speed; next-stop lookup; arrival-time estimates; routing through junctions; following, head-on stops and two trains crossing at a passing loop.
Server game tests (src/gametest) 21 In a real world: stations and a moving train on both squaremap and Pl3xMap, dyeing a locomotive in the crafting grid and repainting it, a painted locomotive keeping its colour when placed and broken, detector rails pressed by a passing train, switching chunk loading off, listing and stopping a train with /tinytrains, the station sign countdown, a coupled train over a hill and round a curve, stopping at an unpowered powered rail, loading its own chunks to run far out of the loaded area, riders picking and keeping their seats (also while moving and in coupled coaches), getting off beside your own seat, a shuttle between two stations, cleaning up station settings, following a schedule through a junction, and the safety cases: following then stopping head-on, crossing at a passing loop, and a driver stopped by a standing coach.
Client game tests (src/gametest) 4 Through the real game client with real key presses: coupling, boarding, getting off, driving, the station, train and schedule screens, a dedicated server with two riders, junction routing, the countdown on a station sign as seen by the client, and a save, quit and reopen with the player 3,000 blocks away to prove the train kept running. The screenshots in this wiki come from these tests.

The NeoForge edition runs 20 server game tests on NeoForge's game test server: the same cases, with squaremap only. Its unit tests run with the game bootstrapped by NeoForge's JUnit support. The four client game tests use Fabric's client game test API, which has no NeoForge equivalent, so they only run on the Fabric edition.


← How It Works · Home · Credits and License →

Clone this wiki locally