Feeder issues

Hi ,

Am new bee to Gatling tool

Gattling version : gatling-charts-highcharts-bundle-2.2.3
java version :1.8.0

I have tried using multiple feeders i got more errors. Tried using one feeder having same issues

In one val can we define/mention multiple csv feeder?

I have placed the csv files in : C:\perftools\gatling-charts-highcharts-bundle-2.2.3\user-files\data path
scala file : C:\perftools\gatling-charts-highcharts-bundle-2.2.3\user-files\simulations

Please let me know where and what am doing wrong.

Thanks in advance for the help

SCRIPT

import scala.concurrent.duration._

import io.gatling.core.Predef._
import io.gatling.http.Predef._
import io.gatling.jdbc.Predef._

class Get_param extends Simulation {

val httpProtocol = http
.baseURL(“https://local.host.com”)
.inferHtmlResources()
.acceptHeader(“text/html,application/xhtml+xml,application/xml;q=0.9,image/webp,/;q=0.8”)
.acceptEncodingHeader(“gzip, deflate, sdch”)
.acceptLanguageHeader(“en-US,en;q=0.8”)
.userAgentHeader(“Mozilla/5.0 (Windows NT 6.1; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/55.0.2883.87 Safari/537.36”)

val chub = csv(chub_itemid.csv).random //val Citystage = csv(city_state_zip.csv).sequential

val scn = scenario(“Get_param”)
.exec(http(“GC_GenServ_PIPShippingOpt_chub”)
.get("/shipping/v1/charge?itemId=${pChub}&quantity=1&zipCode=19040&city=Hatboro&state=PA") //&quantity=1&zipCode=${pZipCode}&city=${pCity}&state=${pState}
//.headers(Header.headers_0)
.check(status.in(200)))
.exec(http(“PIPPageLoad_CHUB”)
.get("/shipping/v1/charge?itemId=${pChub}&quantity=2&zipCode=16433&city=Saegertown&state=PA&isDefault=true") //&quantity=2&zipCode=${pZipCode}&city={pCity}&state={pState}&isDefault=true
.headers(Header.headers_0)
.check(status.in(200)))

setUp(scn.inject(atOnceUsers(1))).protocols(httpProtocol)
}
object Header {
val headers_0 = Map(“Upgrade-Insecure-Requests” → “1”)
}

Getting errors :

C:\perftools\gatling-charts-highcharts-bundle-2.2.3>gatling -C:\perftools\Shippi
ng\scala\ -df C:\perftools\Shipping\datafiles\ -rf C:\perftools\Shipping\results

GATLING_HOME is set to “C:\perftools\gatling-charts-highcharts-bundle-2.2.3”
JAVA = “java”
16:49:39.966 [ERROR] i.g.c.ZincCompiler$ - C:\perftools\gatling-charts-highchart
s-bundle-2.2.3\user-files\simulations\Get_param.scala:20: feeder is already defi
ned as value feeder
16:49:39.968 [ERROR] i.g.c.ZincCompiler$ - val feeder = csv(city_state_zip.
csv).sequential
16:49:39.969 [ERROR] i.g.c.ZincCompiler$ - ^
16:49:41.058 [ERROR] i.g.c.ZincCompiler$ - C:\perftools\gatling-charts-highchart
s-bundle-2.2.3\user-files\simulations\Get_param.scala:19: not found: value chub_
itemid
16:49:41.058 [ERROR] i.g.c.ZincCompiler$ - val feeder = csv(chub_itemid.csv
).random
16:49:41.058 [ERROR] i.g.c.ZincCompiler$ - ^
16:49:41.063 [ERROR] i.g.c.ZincCompiler$ - C:\perftools\gatling-charts-highchart
s-bundle-2.2.3\user-files\simulations\Get_param.scala:20: not found: value city_
state_zip
16:49:41.064 [ERROR] i.g.c.ZincCompiler$ - val feeder = csv(city_state_zip.
csv).sequential
16:49:41.064 [ERROR] i.g.c.ZincCompiler$ - ^
16:49:41.672 [ERROR] i.g.c.ZincCompiler$ - C:\perftools\gatling-charts-highchart
s-bundle-2.2.3\user-files\simulations\Get_param.scala:26: value http is not a me
mber of io.gatling.http.request.builder.HttpRequestBuilder
possible cause: maybe a semicolon is missing before `value http’?
16:49:41.672 [ERROR] i.g.c.ZincCompiler$ - http(“PIPPageLoa
d_CHUB”)
16:49:41.672 [ERROR] i.g.c.ZincCompiler$ - ^
16:49:41.673 [ERROR] i.g.c.ZincCompiler$ - C:\perftools\gatling-charts-highchart
s-bundle-2.2.3\user-files\simulations\Get_param.scala:27: type mismatch;
found : String("/shipping/v1/charge?itemId=${pChub}&quantity=2&zipCode=${pZip
Code}&city={pCity}&state={pState}&isDefault=true")
required: Int
16:49:41.673 [ERROR] i.g.c.ZincCompiler$ - .get("/shipping/
v1/charge?itemId=${pChub}&quantity=2&zipCode=${pZipCode}&city={pCity}&state={pSt
ate}&isDefault=true")
16:49:41.673 [ERROR] i.g.c.ZincCompiler$ - ^
16:49:42.084 [ERROR] i.g.c.ZincCompiler$ - 5 errors found
16:49:42.088 [ERROR] i.g.c.ZincCompiler$ - Compilation crashed
sbt.compiler.CompileFailed: null
at sbt.compiler.AnalyzingCompiler.call(AnalyzingCompiler.scala:105)
at sbt.compiler.AnalyzingCompiler.compile(AnalyzingCompiler.scala:47)
at sbt.compiler.AnalyzingCompiler.compile(AnalyzingCompiler.scala:41)
at sbt.compiler.AggressiveCompile$$anonfun$3$$anonfun$compileScala$1$1.a
pply$mcV$sp(AggressiveCompile.scala:95)
at sbt.compiler.AggressiveCompile$$anonfun$3$$anonfun$compileScala$1$1.a
pply(AggressiveCompile.scala:95)
at sbt.compiler.AggressiveCompile$$anonfun$3$$anonfun$compileScala$1$1.a
pply(AggressiveCompile.scala:95)
at sbt.compiler.AggressiveCompile.sbt$compiler$AggressiveCompile$$timed(
AggressiveCompile.scala:168)
at sbt.compiler.AggressiveCompile$$anonfun$3.compileScala$1(AggressiveCo
mpile.scala:94)
at sbt.compiler.AggressiveCompile$$anonfun$3.apply(AggressiveCompile.sca
la:142)
at sbt.compiler.AggressiveCompile$$anonfun$3.apply(AggressiveCompile.sca
la:84)
at sbt.inc.IncrementalCompile$$anonfun$doCompile$1.apply(Compile.scala:6
6)
at sbt.inc.IncrementalCompile$$anonfun$doCompile$1.apply(Compile.scala:6
4)
at sbt.inc.IncrementalCommon.cycle(IncrementalCommon.scala:32)
at sbt.inc.Incremental$$anonfun$1.apply(Incremental.scala:72)
at sbt.inc.Incremental$$anonfun$1.apply(Incremental.scala:71)
at sbt.inc.Incremental$.manageClassfiles(Incremental.scala:99)
at sbt.inc.Incremental$.compile(Incremental.scala:71)
at sbt.inc.IncrementalCompile$.apply(Compile.scala:54)
at sbt.compiler.AggressiveCompile.compile2(AggressiveCompile.scala:159)
at sbt.compiler.AggressiveCompile.compile1(AggressiveCompile.scala:68)
at com.typesafe.zinc.Compiler.compile(Compiler.scala:201)
at com.typesafe.zinc.Compiler.compile(Compiler.scala:183)
at com.typesafe.zinc.Compiler.compile(Compiler.scala:174)
at com.typesafe.zinc.Compiler.compile(Compiler.scala:165)
at io.gatling.compiler.ZincCompiler$$anonfun$7.apply(ZincCompiler.scala:
153)
at io.gatling.compiler.ZincCompiler$$anonfun$7.apply(ZincCompiler.scala:
153)
at scala.util.Try$.apply(Try.scala:161)
at io.gatling.compiler.ZincCompiler$delayedInit$body.apply(ZincCompiler.
scala:153)
at scala.Function0$class.apply$mcV$sp(Function0.scala:40)
at scala.runtime.AbstractFunction0.apply$mcV$sp(AbstractFunction0.scala:
12)
at scala.App$$anonfun$main$1.apply(App.scala:71)
at scala.App$$anonfun$main$1.apply(App.scala:71)
at scala.collection.immutable.List.foreach(List.scala:318)
at scala.collection.generic.TraversableForwarder$class.foreach(Traversab
leForwarder.scala:32)
at scala.App$class.main(App.scala:71)
at io.gatling.compiler.ZincCompiler$.main(ZincCompiler.scala:36)
at io.gatling.compiler.ZincCompiler.main(ZincCompiler.scala)
Error: Unknown option -C:\perftools\Shipping\scala
Try --help for more information.

can we also have good documentation with examples about gatling tool. The current documetation is not so good

this is fixed .

Thx for the time