-
Notifications
You must be signed in to change notification settings - Fork 2
/
RecordedSimulation.scala
36 lines (26 loc) · 1 KB
/
RecordedSimulation.scala
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
import scala.concurrent.duration._
import io.gatling.core.Predef._
import io.gatling.http.Predef._
import io.gatling.jdbc.Predef._
class RecordedSimulation extends Simulation {
val httpProtocol = http
.baseURL("http://localhost:8080")
.inferHtmlResources()
.acceptHeader("text/html,application/xhtml+xml,application/xml;q=0.9,image/webp,*/*;q=0.8")
.acceptEncodingHeader("gzip, deflate, sdch")
.acceptLanguageHeader("en-US,en;q=0.8,ru;q=0.6")
.userAgentHeader("Mozilla/5.0 (Macintosh; Intel Mac OS X 10_11_6) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/56.0.2924.87 Safari/537.36")
val headers_0 = Map("Upgrade-Insecure-Requests" -> "1")
val headers_1 = Map(
"Accept" -> "image/webp,image/*,*/*;q=0.8",
"Pragma" -> "no-cache")
val scn = scenario("RecordedSimulation")
.exec(http("request_0")
.get("/")
.headers(headers_0)
.resources(http("request_1")
.get("/favicon.ico")
.headers(headers_1)))
setUp(
scn.inject(rampUsers(30000) over(30 seconds)).protocols(httpProtocol))
}