I am new to Gatling. My project deals with SOAP requests only. So I created a sample SOAP request for my understanding.
Error:
15:01:40.509 [WARN ] i.g.h.e.r.DefaultStatsProcessor - Request ‘request_1’ failed for user 6: status.find.in(200,201,202,203,204,205,206,207,208,209,304), found 404
Scala:
`
package computerdatabase
import io.gatling.core.Predef._
import io.gatling.http.Predef._
import scala.concurrent.duration._
class BasicSimulation1 extends Simulation {
val httpProtocol = http
.baseUrl(“http://www.dataaccess.com/webservicesserver/numberconversion.wso”) // Here is the root for all relative URLs
val header = Map(
“Content-Type” → “application/soap+xml;charset=UTF-8”,
“User-agent” → “Mozilla/5.0 (Macintosh; Intel Mac OS X 10.8; rv:16.0) Gecko/20100101 Firefox/16.0”)
val scn = scenario(“SoapTest1”) // A scenario is a chain of requests and pauses
.exec(http(“request_1”)
.post(“Claim”)
.headers(header)
.body(StringBody("""<soapenv:Envelope xmlns:soapenv=“http://schemas.xmlsoap.org/soap/envelope/” xmlns:web=“http://www.dataaccess.com/webservicesserver/”>
web:dNum100</web:dNum>
</web:NumberToDollars>
</soapenv:Body>
</soapenv:Envelope>""")))
setUp(scn.inject(rampUsers(100) during (60 seconds))).protocols(httpProtocol)
}
`