First of all i have admit that am novice in using gatling. While i use Gatling to test my scenario, i get the below error:
Select simulation id (default is ‘vertexperformance’). Accepted characters are a-z, A-Z, 0-9, - and _ v7 Select run description (optional) test Exception in thread “main” java.lang.IllegalArgumentException: Root element of JSON feeder file isn’t an array
Please find the code below: ```
import io.gatling.core.Predef._
import io.gatling.http.Predef._
import scala.concurrent.duration._
import io.gatling.core.feeder._
class VertexPerformance extends Simulation {
val jsonFileFeeder = jsonFile("test.json")
val httpConf = http
.baseURL("https://rate.feeder")
.acceptHeader("application/xml, text/html, text/plain, application/json, */*")
.acceptCharsetHeader("UTF-8")
.acceptEncodingHeader("gzip, deflate")
val theCommonHeaders = Map(
"Accept" -> "application/xml, text/html, text/plain, application/json, */*",
"Accept-Encoding" -> "gzip, deflate")
val scn = scenario("Vertex API Test")
// .feed(Feeders.jsonFileFeeder)
.exec(
http("request_1")
.post("/tax_rates/v1/quotations")
.header(HttpHeaderNames.ContentType, HttpHeaderValues.ApplicationJson)
.header(HttpHeaderNames.Accept, HttpHeaderValues.ApplicationJson)
.body(RawFileBody("test.json"))
)
setUp(scn.inject(atOnceUsers(1)).protocols(httpConf))
}
Request some advise...