processone / tsung

Tsung is a high-performance benchmark framework for various protocols including HTTP, XMPP, LDAP, etc.
http://www.process-one.net/en/tsung/
GNU General Public License v2.0
2.53k stars 405 forks source link

Elixir as a test scripting language #355

Open ghost opened 5 years ago

ghost commented 5 years ago

We've started an Elixir book group in a large British media organisation. We are trying to get people using Elixir. Tsung appeals obviously because of BEAM processes and the ability to scale (many machines). We'd like to be able to write our tests in Elixir and not XML. Not familiar with Erlang, else I'd have a go myself.

tisba commented 5 years ago

I'm not sure if I see a question here :)

"Tests" in Tsung are declarative and expressed in XML, that being said, you can create a XML generator using Elixir. But that raises the question of what could be gained by that.

There is currently no direct way to provide the declaration in another format, but that could be a doable project, if you like to contribute.

Does this answer your question?

ghost commented 5 years ago

We could use a generator, but then we have two sources. XML is prohibitive and FP itself is declarative. I think they'd be a preference for scripting (Locust, for example gets a lot of traction) and complex tests are difficult to read in XML. But I know it was a big ask. I'll do a crash course in Erlang and see what I can do. I was also thinking we could tail some logs or something and use InfluxDB as a datasource for real time graphing in Grafana.

ghost commented 5 years ago

You're parsing different protocols maybe start off with HTTP?

tisba commented 5 years ago

I understand the motivation, and I see a similar benefit from having a more dynamic way of programming a test case. But unfortunately that might be a significant undertaking from what I can tell :(