Created
August 21, 2019 21:19
-
-
Save lalo-mx/0a690290f6aac5017f15a65fc100eaa2 to your computer and use it in GitHub Desktop.
Test Gatling Tomcat - Sample app
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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