Skip to content

Instantly share code, notes, and snippets.

@lalo-mx lalo-mx/Sample.scala
Created Aug 21, 2019

Embed
What would you like to do?
Test Gatling Tomcat - Sample app
package sample
import io.gatling.core.Predef._
import io.gatling.http.Predef._
import scala.concurrent.duration._
class Sample extends Simulation {
val httpProtocol = http
.enableHttp2
.baseUrl("https://localhost:8443/app")
.acceptHeader("text/html,application/xhtml+xml,application/xml;q=0.9,*/*;q=0.8")
.doNotTrackHeader("1")
.acceptLanguageHeader("en-US,en;q=0.5")
.acceptEncodingHeader("gzip, deflate")
.userAgentHeader("Mozilla/5.0")
val scn = scenario("Test App")
.exec(
http("Download data")
.get("/")
)
setUp(scn.inject(rampUsersPerSec(10) to(50) during (30 seconds)).protocols(httpProtocol));
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
You can’t perform that action at this time.