Created
March 29, 2019 07:46
-
-
Save lacoski/624e1be15c969e1bbfd15b2b7239cb6d to your computer and use it in GitHub Desktop.
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
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://10.10.10.86") | |
.inferHtmlResources() | |
.acceptHeader("text/html,application/xhtml+xml,application/xml;q=0.9,image/webp,image/apng,*/*;q=0.8") | |
.acceptEncodingHeader("gzip, deflate") | |
.acceptLanguageHeader("en-US,en;q=0.9") | |
.userAgentHeader("Mozilla/5.0 (X11; Linux x86_64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/72.0.3626.119 Safari/537.36") | |
val headers_0 = Map( | |
"Proxy-Connection" -> "keep-alive", | |
"Upgrade-Insecure-Requests" -> "1") | |
val headers_1 = Map( | |
"Accept" -> "text/css,*/*;q=0.1", | |
"Proxy-Connection" -> "keep-alive") | |
val headers_2 = Map( | |
"Accept" -> "*/*", | |
"Proxy-Connection" -> "keep-alive") | |
val headers_3 = Map( | |
"Accept" -> "image/webp,image/apng,image/*,*/*;q=0.8", | |
"Proxy-Connection" -> "keep-alive") | |
val uri2 = "https://fonts.googleapis.com/css" | |
val scn = scenario("RecordedSimulation") | |
.exec(http("request_0") | |
.get("/") | |
.headers(headers_0) | |
.resources(http("request_1") | |
.get("/wp-content/themes/karuna-wpcom/assets/fonts/genericons/genericons/genericons.css") | |
.headers(headers_1), | |
http("request_2") | |
.get("/wp-includes/js/wp-emoji-release.min.js?ver=4.9.10") | |
.headers(headers_2), | |
http("request_3") | |
.get("/favicon.ico") | |
.headers(headers_3) | |
.check(status.is(404)))) | |
.pause(15) | |
.exec(http("request_4") | |
.get("/index.php/2019/03/19/huawei-p30-lo-anh-thuc-te-thiet-ke-notch-nho-gon-van-tay-duoi-man-hinh/") | |
.headers(headers_0)) | |
.pause(42) | |
.exec(http("request_5") | |
.get("/?s=phone") | |
.headers(headers_0)) | |
.pause(7) | |
.exec(http("request_6") | |
.get("/index.php/2019/03/19/7-ung-dung-game-hap-dan-dang-free-cho-iphone-ipad-19-3/") | |
.headers(headers_0)) | |
.pause(14) | |
.exec(http("request_7") | |
.get("/") | |
.headers(headers_0)) | |
setUp( | |
scn.inject( | |
atOnceUsers(1) | |
) | |
).protocols(httpProtocol) | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment