" value body is not a member of io.gatling.core.structure.ScenarioBuilder"Error

Hi All,

I’m totally new to Gatling. Just started POC today. So, apologies in advance if my question is very basic.

I’m using Gatling Version 3.1.2. Created a simple POST script. However, i’m getting the below compilation error.

" value body is not a member of io.gatling.core.structure.ScenarioBuilder"

Below is my script.

import io.gatling.core.Predef._ // 2
import io.gatling.http.Predef._
import scala.concurrent.duration._

class Test extends Simulation {

val httpProtocol = http // 4
.baseUrl(“http://xxxxxxxxxxxxxxxxxxxxxxxxx”) // 5
.acceptHeader(“Content-Type,application/json”) // 6

val payLoad = “{“Reference”:“xxxx”,“CreditorSortCode”:“xxxxx”,“CreditorAccountNumber”:“xxxxx”,“CreditorName”:“xxxxxxx”,“DebtorSortCode”:“xxxxxxx”,“DebtorAccountNumber”:“xxxxx”,“DebtorName”:“Performance”,“Amount”: 96.00}”

val scn = scenario(“Test”) // 7
.exec(http(“request_1”) // 8
.post("/")) // 9
.body(StringBody("""${payLoad}""")).asJson
.check(status.is(200))

.pause(5) // 10

setUp( // 11
scn.inject(atOnceUsers(1)) // 12
).protocols(httpProtocol) // 13

}

Please can you let me know what i’m missing.

Thanks in advance for your guidance.

Kind Regards,
Prash.

Sorted. It’s a syntax error.

Parens not in the right place :slight_smile:

Have fun!

Thanks Stephane !!!