tag1consulting / goose

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

Embedded dynamic language for scripts #347

Open kazimir-malevich opened 3 years ago

kazimir-malevich commented 3 years ago

What would be your opinions on using a Lua bridge to Rust in order to write the load test scripts in Lua This I feel may gain some traction to the tool, is this is instead possible?

jeremyandrews commented 3 years ago

This is not on my personal roadmap, but I'd certainly accept PRs working toward this as an option.

kazimir-malevich commented 2 years ago

There is some options here, and we'd probably want a switch to code in Rust or another mainstream dynamic language. https://arewegameyet.rs/ecosystem/scripting/ https://www.hobofan.com/rust-interop/ https://areweextendingyet.github.io/

However with the traction Rust is getting and type inference is it worth it? But you got to understand that some users will be testers and not coders in static languages.

kazimir-malevich commented 2 years ago

rhai has a major version and is "similar to JavaScript+Rust"

kazimir-malevich commented 2 years ago

I am having second thoughts about this and thinking of closing. The Rust compiler, rust-analyzer, formatter are extremely compelling. (and I am running in Vim). But the GH stars should not be in the hundreds, but thousands as in my opinion this is the best and most comprehensive load tool out there. WDYT @jeremyandrews? Maybe you are just too far in the future!!!

jeremyandrews commented 2 years ago

I also agree that the Rust tools are compelling, but I think we should leave this issue open as it's a frequent comment/request that we should support a simpler language for writing tests. While it's still not on my personal roadmap, I'd not be opposed if someone contributed this as an optional Goose feature.

kazimir-malevich commented 2 years ago

OK. I'll look into this which will be a spike in Rhai against httpbin.org.

kazimir-malevich commented 2 years ago

Maybe AssemblyScript with wasm. This is not going to be trivial.

jeremyandrews commented 2 years ago

That certainly sounds interesting. It would be ideal to explore adding this as a separate project with a Goose dependency -- as ultimately it could be nice to support more than one embedded dynamic language. (Similar to how the goal is to split out Reqwest and to support multiple rust HTTP clients, as well as other protocols.)