tag1consulting / goose

Load testing framework, inspired by Locust
https://tag1.com/goose
Apache License 2.0
791 stars 70 forks source link

Encapsulate all data (and logic) for controller commands #470

Closed slashrsm closed 2 years ago

slashrsm commented 2 years ago

Currently we carry definition of controller commands in a few places. It would be nice if we could encapsulate all their data (parsing regular expression, status messages, error messages, ...) and their logic (validation, implementation, ...) in a single place and let wrapping logic be completely generic. This would make it easier to add new commands, to test them and make code easier to read, since we would have everything that belongs to a single command in one place.

Maybe we could define a trait (or a set of traits) that all commands must implement. Or something along those lines?

More info: https://github.com/tag1consulting/goose/pull/464#discussion_r865644181