import io.gatling.core.Predef._
import io.gatling.http.Predef ._
导入scala.concurrent.duration ._
类模拟扩展了模拟{
def test(){
val httpConf = http
.baseURL("http://computer-database.gatling.io")
.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 (Windows NT 5.1; rv:31.0) Gecko/20100101 Firefox/31.0")
val scn = scenario(“BasicSimulation”)
.exec(http("request_1")
.get("/"))
.pause(5)
setUp(
scn.inject(atOnceUsers(1)).protocols(httpConf))
}}
对象演示{
def main(args:Array [String]){
val pt = new Simulations
pt.test()
}
}
答案 0 :(得分:0)
根据要求,我的代码。这在IntelliJ中运行良好。我没有日食经验所以我无法帮助你。
y