Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

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

Open
4 tasks
jondot opened this issue Sep 29, 2024 · 1 comment
Assignees
Labels
enhancement New feature or request
Milestone

Comments

@jondot
Copy link
Contributor

jondot commented Sep 29, 2024

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:

  • Randomized/fuzz execution of the Loco CLI for discovering unforeseen sequence of steps and / or parameters that users run and lead to unexpected errors
  • Reproducible test plan runs

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:

  • what happens if we run seed twice?
  • what happens if we generate thousands of fields in the generate model command?
  • what happens when we use chinese (wide unicode) for names of fields in scaffold?
  • what happens with the combination: reset, migrate, reset, seed, reset?
  • is there any combination of commands we're not seeing right now, that can create an unexpected error?
  • etc..

credit for the name of this tool: #790

Commands: cargo xtask fuzzy ...

  • New template
  • Scaffold
  • Generate model
  • Generate controller
@kaplanelad
Copy link
Contributor

@kaplanelad kaplanelad added this to the 0.11.0 milestone Oct 13, 2024
@jondot jondot modified the milestones: 0.11.0, 0.12.0 Oct 18, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request
Projects
None yet
Development

No branches or pull requests

2 participants