Observing error while running Gatling project 'object gatling is not a member of package io'

285 Views Asked by At

I m seeing the following error while running Engine.scala:

object gatling is not a member of package io
import io.gatling.app.Gatling

Below is the code that is used

import io.gatling.app.Gatling
import io.gatling.core.config.GatlingPropertiesBuilder

object Engine extends App {

     val props = new GatlingPropertiesBuilder()
       .resourcesDirectory(IDEPathHelper.mavenResourcesDirectory.toString)
       .resultsDirectory(IDEPathHelper.resultsDirectory.toString)
       .binariesDirectory(IDEPathHelper.mavenBinariesDirectory.toString)

     Gatling.fromMap(props.build)
}

I tried changing the Gatling version in mvn file, but no luck. could someone please help

1

There are 1 best solutions below

0
On

It means the Gatling jars are not properly imported in your classpath.

No idea how to help you though as you're not describing exactly what you're doing and how you're getting this error: when running maven from the command line? when running from IntelliJ? or another IDE?

Note: if you're struggling with properly setting up a development environment for Scala, you should probably consider using Gatling with Java instead, where the set up is way more simple.