class RecordedSimulation extends Simulation {
val httpProtocol = http
.baseURL(url)
.inferHtmlResources()
val headers_0 = Map("Origin" -> "chrome-extension://aejoelaoggembcahagimdiliamlcdmfm")
val uri1 = "abc.com"
val scn = scenario("RecordedSimulation")
.exec(http("request_0")
.post("/abc/efg")
.headers(headers_0)
.body(RawFileBody("RecordedSimulation_0000_request.txt"))
.basicAuth("uid","pwd")
.check(bodyString.is(RawFileBody("RecordedSimulation_0000_response.txt"))))
setUp(scn.inject(atOnceUsers(1))).protocols(httpProtocol)
}
RecordedSimulation_0000_request.txt file consists of JSON content.
Request you to kindly suggest me a solution at the earliest.
PS:- I have tried using .asJSON as well after body eg. - body(RawFileBody("RecordedSimulation_0000_request.txt")).asJSON
but still not getting the response as expected.
Thanks,
Anuja