Feeder - use another Escaping character generates error overloaded method value csv with alternatives

Hello,

I try to use a feeder with the escaping character ‘#’, as the example on the wiki.

So, i have this declaration on my scenario :

val partnerInfosFeeder = csv(“configTestPerf_12_sites_RSP_Qualif.csv”,’#’)

Unfortunately, this causes on this line the follow compilation error :

overloaded method value csv with alternatives:

(fileName: String,rawSplit: Boolean)io.gatling.core.feeder.RecordSeqFeederBuilder[String]

(file: scala.reflect.io.File,rawSplit: Boolean)io.gatling.core.feeder.RecordSeqFeederBuilder[String]

cannot be applied to (String, Char)

I have this error with 2 snapshost of gatling 2.0…snapshot of 2014/06/10 and 2014/07/03.

I don’t understand why compilation expects a boolean instead of char ?

Something wrong in my declaration ? Does the API change ?

So, what is the correct use to set a different escaping character from comma, semicolon or tabulation ?

Thanks for your help.

Cheers,

Franck

Yes, API changes for Gatling 2.

The second (optional) parameter is to force a raw split, ignoring escaping chars.

If you want to customize this, you have to use:
def separatedValues(fileName: String, separator: Char, quoteChar: Char = ‘"’, rawSplit: Boolean = false)

In your case, that would be:
separatedValues(“configTestPerf_12_sites_RSP_Qualif.csv”, ‘,’, ‘#’)

As usual, a good point with Gatling, is its high reactive community :wink:

Thanks.

Have a good day.

Franck

Thanks for your kind words :slight_smile: