Setting GatlingIt in sbt project

Hey guys,

Trying to use the Gatling SBT plugin with sbt 0.13.8. Setting it up in a sub module of a multi-module .sbt project.

In the root build.sbt I have;

lazy val reportServer = (
CheckoutBIProject(“report-server”)
configs(GatlingIt)
settings(Revolver.settings: _*)
)

Then in report-server/build.sbt I have;

enablePlugins(GatlingPlugin)

libraryDependencies ++= {
val gattlingV = “2.1.4”
Seq(
“io.gatling.highcharts” % “gatling-charts-highcharts” % gattlingV % “it,test”,
“io.gatling” % “gatling-test-framework” % gattlingV % “it,test”,
“io.gatling” % “gatling-bundle” % gattlingV % “test” artifacts (Artifact(“gatling-bundle”, “zip”, “zip”, “bundle”))
)
}

It seems that running it:test does not work from either the root project or the report-server module. Running test seems to try to run gatling test from the src/test folder.

The gatling-it:test does work however. The same applies for copyConfigFiles. Running that task puts all the config files in src/test/resources, running gatling-it:copyConfigFiles puts them in src/it/resources where I would expect. What am I missing to set the default settings to tie in with Integration Test paths (it) and not the test paths? Or do I need to keep adding gatling-it: config selector to all the sbt targets I want to run because GatlingIt doesnt properly integrate.

show gatling-it:testFrameworks
[info] List(TestFramework(WrappedArray(io.gatling.sbt.GatlingFramework)))

show gatling-it:loadedTestFrameworks
[info] Map(TestFramework(WrappedArray(io.gatling.sbt.GatlingFramework)) → io.gatling.sbt.GatlingFramework@7cf1e0d4)

show gatling:testFrameworks
[info] List(TestFramework(WrappedArray(io.gatling.sbt.GatlingFramework)))

show gatling:loadedTestFrameworks
[info] Map(TestFramework(WrappedArray(io.gatling.sbt.GatlingFramework)) → io.gatling.sbt.GatlingFramework@13efea9b)

Cheers,

N

Hi,

The It configuration is not enabled by default in SBT.
You’ll need to enable it (by passing it to configs(…)) so that GatlingIt configuration can in turn work.

Cheers,

Pierre

You mean like;

lazy val reportServer = (
CheckoutBIProject(“report-server”)
configs(IntegrationTest, GatlingIt)
settings(Revolver.settings: _*)
)

Indeed.

Yeah I tried that as well. it:test doesnt pick up the gatling tests.

I understand that GatlingIt inherits from IntegrationTest so its not needed?

Ah sorry, I see that I misunderstood a point of your original question…
It looks like the SBT plugin does not currently handle things well on that side and that it:test does not run Gatling, whereas gatling-it:test.
I’ll investigate to see if that can be fixed.

Cheers,

Pierre

Thanks Pierre