Best way to get casbah available when using gatling.sh

One obvious, old-school solution is to download the jar and put it in the class path. But this is 2015. We have tools like Maven and SBT.

But I’m using gatling.sh to compile and launch Gatling. Does that process have a hook for anything like an SBT dependency that I can use to inject casbah?

Hi John,

The bundle does not have such a mechanism.
If you want to add casbah, you’ll need to put the jar in the lib folder.
Eventually, if you’re going to use a lot of external dependencies, switching to sbt may prove worthwhile.

Cheers,

Pierre

Is there a tutorial somewhere on how to use sbt from the command line with Gatling?

There are no “comprehensive” guide or tutorial that include both, but you can easily find myriads of tutorials for SBT and its official documentation.
Then, you have Gatling’s SBT Plugin documentation, which in the end requires you to add just a few things to your build afterwards.

Can the SBT Plugin work with the latest snapshot build?

It should without issues.
Worst case scenario, you’d need to build a snapshot of the SBT plugin’s master branch.

I’m finally to that point. So, in the build.sbt, what version do I specify to get the latest 2.2 build? I tried “2.2.0-SNAPSHOT” but that didn’t work.

Answer: “2.2.0-M3” (as of today)

You can use snapshot versions, but you’ll need to add Opts.resolver.sonatypeSnapshots to your resolvers.