Skip to content

Instantly share code, notes, and snippets.

@gildegoma
Forked from errordeveloper/LEIN_GATLING_README.md
Created February 1, 2013 23:46
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save gildegoma/4694976 to your computer and use it in GitHub Desktop.
Save gildegoma/4694976 to your computer and use it in GitHub Desktop.

Gatling is an awesome modern load-testing framework written in Scala with asyncronous actors. It's been designed by the folks at Excilys and had been gaining some attention recently.

There a few ways you can get started with Gatling:

Each of these has it's pros and cons, so I have figured yet another way that is meant to be quite easy.

So to get started all you need is:

cd ~/projects/my-awesome-app
lein new gatling load-test

Please note that your project doesn't need to be written in Clojure in order to take advantage of Leiningen, which is just a decent interface to maven!

You will find most information on the wiki, although I do find the following most usefull:

FORKME!

tl;dr

  • if you don't have lein command installed, do it now:
sudo curl https://raw.github.com/technomancy/leiningen/preview/bin/lein -o /usr/local/bin/lein
sudo chmod 0755 /usr/local/bin/lein
  • go to your project:
cd ~/projects/example-app/
  • instantiate the gatling template into ./load-test:
lein new gatling load-test
  • if you do ls -R ./load-test/ you should see this:
load-test/:
conf  data  project.clj  request-bodies  simulations

load-test/conf:
gatling.conf  logback.xml

load-test/data:

load-test/request-bodies:

load-test/simulations:

Start working on our own load-test scenarios!

cd load-test
vim simulations/tryThis.scala
lein run
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment