Rodolphe
Rodolphe

Reputation: 858

Gatling validate scenarii

Before sending my scenarii to our Jenkins/Gatling instance I would like to validate them on my laptop where I write them. Actually I run gatling locally and stop it as soon as it starts, but this is not optimal and I look for a solution to check them with scalac as Gatling does not have a check option. But when running scalac on scenario I always have

Homepage.scala:1: error: object duration is not a member of package concurrent import scala.concurrent.duration._

How do you validate your scenario, can someone helps me using scalac ?

Thanks !

Upvotes: 0

Views: 125

Answers (1)

Stephane Landelle
Stephane Landelle

Reputation: 7038

Scala version numbering uses the following rule: "Epoch"."Major"."Minor"."Fix".

Major versions, that happen every 2 year or so, are not binary compatible, meaning that you can't run a code compiled with a 2.11 compiler with a 2.10 runtime and vice-versa.

Here, you're trying to use the scala.concurrent.duration package that was introduced in Scala 2.10, but you're running with 2.9. Obviously, this package doesn't exist in this version, and that's exactly what the compiler tells you.

  • If you're running Gatling 1.X (EOL'ed), you have to use Scala 2.9.
  • If you're running Gatling 2.0.X, you have to use Scala 2.10.
  • If you're running Gatling 2.1.X, you have to use Scala 2.11.

Upvotes: 1

Related Questions