Hi, I am trying to reach a specific TPS with given number os users which I am able to successfully reach with Jmeter but didn’t get it to achieve similar functionality in Gatling. I am sure I must be missing something here, so please advise!
`
package computerdatabase
import io.gatling.core.Predef._
import io.gatling.http.Predef._
import scala.concurrent.duration._
class Eligibility extends Simulation {
val httpProtocol = http
.baseUrl(“https://abc.com”) // Here is the root for all relative URLs
val header = Map(
“Content-Type” → “application/soap+xml;charset=UTF-8”,
“Connection” → “alive”,
“User-agent” → “Mozilla/5.0 (Macintosh; Intel Mac OS X 10.8; rv:16.0) Gecko/20100101 Firefox/16.0”)
val data1 = csv(“elig_latest_3mon.csv”).circular
val data2 = csv(“elig_pre_3mon.csv”).circular
val pl1 = scenario(“Eligility_pre_3mon”).feed(data2).exec(http(“Eligility_pre_3mon”)
.post("/xyz123.asmx")
.headers(header)
.body(ElFileBody(“eligibility.txt”)))
val pl2 = scenario(“Eligility_latest_3mon”).feed(data1).exec(http(“Eligility_latest_3mon”)
.post("/aaaabbbb.asmx")
.headers(header)
.body(ElFileBody(“eligibility.txt”)))
//Desired number of TPS so that overall I can achieve around 301560 = 27000 txns in 15 minutes but my execution is showing only 1000 target txns
setUp(
pl1.inject(rampUsers(1000) during (15 minutes)))
.throttle(
reachRps(30) in (10 seconds),
holdFor(15 minutes)
)
.protocols(httpProtocol)
}
`