substring fails to find multiple instances of a substring

Hi all!

I’ve run across a problem I’m sure is caused by me being new to Scala and Gatling. I’m trying to count the number of instances of a substring in a JSON response. However, my script seems to only be able to recognize one or zero occurrences of any substring in the response I’m getting. It seems that what I’m trying to do should be supported according to the docs here:, so I’m baffled as to what I’m doing wrong.

Here is my code:
import scala.concurrent.duration._
import io.gatling.core.Predef._
import io.gatling.http.Predef._
import io.gatling.jdbc.Predef._
import util.Random
class GetOne extends Simulation {

/* headers and credentials omitted */

val scn = scenario(“populate”)
.repeat(1) {
.exec(http(“request - login”)
.exec(http(“get offers”)

The test generates this output:
---- Errors --------------------------------------------------------------------

This is the exact same issue that you already reported.

For some reason google swallowed my first post (this one). The one you saw earlier was me reposting it. I don’t know why it’s just now showing up. Sorry for the confusion.