loco-rs / loco

🚂 🦀 The one-person framework for Rust for side-projects and startups
https://loco.rs
Apache License 2.0
5.46k stars 235 forks source link

`crazy_train`: fuzz based, parameterized, reproducible automated e2e fuzz testing for Loco #791

Open jondot opened 1 month ago

jondot commented 1 month ago

Since we are majorly CLI driven for productivity (as is Rails), We are modeling a tool, in the spirit of the original jepsen effort, in the sense of providing:

This is in favor of making sure that users can "drive" through the CLI in any combination of commands.

The Rails CLI had 20 years to evolve, and we now want to build a piece of infrastructure that will make us "speed up" that evolution for Loco.

crazy_train will create endless, randomized run plans with predefined steps which map to the Loco CLI. Example:

gen_model [parameters]
db_reset
db_seed 
build 
routes
start (+check listen, then kill)

which forms a "language" of steps, each step can randomize and track its various parameters.

crazy_train will also completely replace many of our CI testing flows, by providing "predefined" plans (which are not randomized, but hand-edited and executed)

This can answer questions such as:

credit for the name of this tool: https://github.com/loco-rs/loco/issues/790

Commands: cargo xtask fuzzy ...

kaplanelad commented 1 month ago

https://github.com/loco-rs/crazy-train