Gatling 2 with sbt

A few comments :

  • Gatling 2.0 needs Scala 2.10, and won’t work with Scala 2.11. Gatling 2.1.0 will use Scala 2.11.
  • Strange that IntelliJ tries to download a dependency that just doesn’t exist : http://search.maven.org/#artifactdetails%7Ccom.typesafe.sbt%7Ccompiler-interface%7C0.13.5%7Cpom. There is no compiler-interface-0.13.5.jar, only a jar published with a “sources qualifier.
  • .settings(libraryDependencies) is wrong, just wrong. You’ll have to set the libraryDependencies when you call settings, not just pass libraryDependencies as is.

.settings(libraryDependencies ++= Seq(
“io.gatling.highcharts” % “gatling-charts-highcharts” % “2.0.1” % “test",
“io.gatling” % “test-framework” % “1.0” % “test”))

Looks like that resolved it, thank you.

  • The readme should probably include something about scala 2.10

  • With regards to settings, I’m not sure how anyone could possibly infer that as the course of action from the readme. Could you point me at some reading that might explain it

Looks like SBT compiles the ocmpiler interface from source.

  • You’re right, I should mention that the plugin expects that you’re using Scala 2.10. This is, however, mentionned in Gatling’s documentation.
  • To be completely honest, the README does guide you on how to setup the plugin, but it expects some prior knowledge of SBT. About setting up libraryDependencies and dependency management in general, well… there’s SBT documentation : http://www.scala-sbt.org/0.13/docs/Library-Management.html
  • Yep, it does when needed (eg. when compiling against a Scala version that is not the one SBT is built with, which is currently 2.10.4, as Gatling 2.0.1 is). But it should use the compiler interface with the “sources” classifier.

Admittedly I have some experience but from 3 years ago, so pretty stale so
far as knowledge goes.

I had never seen the enable plugin with the settings call before - I don't
see much mentioned about it in the link.

I had originally been doing something like this

libraryDependencies ++= Seq(
    "io.gatling.highcharts" % "gatling-charts-highcharts" % "2.0.1" %
"test",
    "io.gatling" % "test-framework" % "1.0" % "test")

Above in my sbt file. which actually looks as though it works fine - so the
main issue must have been the scala version. It was unclear to me why that
had to be passed into the .settings method on the enablePlugin call

Thanks again for your help.

.joe

What you did is perfectly fine… as long as you use SBT 0.13.6.
Unfortunately, if you’re using a version prior to 0.13.6, you need to do it as it is in shown in the README.
If you happen to use SBT 0.13.6, you can write :

enablePlugins(GatlingPlugin)

libraryDependencies ++= Seq(
“io.gatling.highcharts” % “gatling-charts-highcharts” % “2.0.1” % “test”,