Error in Custom feeder

I am trying to call a custom feeder in one of my simulation. Custom feeder is created as below:

object getAccountDetails {

val accountDetails = new Feeder[String] {

override def hasNext = true
override def next: Map[String, String] = {
Map(“accountHolderName” → Random.nextString(10),“paymentMethodName” → Random.nextString(8),
“accountType” → Random.nextString(10),“transactionType” → Random.nextString(3))
}
}
}

and calling this feeder as

val scn = scenario(“Test”).feed(getAccountDetails.accountFeeder,getAccountDetails.accountDetails).exec(paymentMethod.getPaymentMethod,createPaymentMethodECP.createPaymentMethodECP)

but this fails with following error

type mismatch;
found : io.gatling.core.Predef.Feeder[String]
required: io.gatling.core.session.Session => io.gatling.core.validation.Validation[Int]

Any suggestions on how to resolve this issue.

Thanks in advance any help. I am using Gatling 2.0.1

Sameer

Invalid usage of the feed method 2-parameters version, that wasn’t documented: https://github.com/gatling/gatling/issues/2522

The second parameter is used for defining a number of records to be fed at once, not another feeder.

You have to call feed once per feeder.

Thanks a lot Stephane

बुधवार, 21 जनवरी 2015 को 8:12:44 अपर UTC+5:30 को, Stéphane Landelle ने लिखा:

You’re welcome :slight_smile: