Skip to content

Instantly share code, notes, and snippets.

@lalo-mx
Created August 21, 2019 21:19
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save lalo-mx/0a690290f6aac5017f15a65fc100eaa2 to your computer and use it in GitHub Desktop.
Save lalo-mx/0a690290f6aac5017f15a65fc100eaa2 to your computer and use it in GitHub Desktop.
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