小编The*_*tor的帖子

在加特林请求超时

我正在使用maven运行我的Gatling(Scala)性能测试。

当我将用户数从100增加到150时,它给了我请求超时的问题。

如果将用户数设置为300,则在模拟日志中会出现以下错误。

// Gatling scenario injection
val scn =  scenario("UATEnvironmentTest")
.exec(http("AdminLoginRequest")
.post("/authorization_microservice/oauth/token")
.headers(headers_1).body(RawFileBody("Login.txt"))
.check(jsonPath("$.access_token")
.saveAs("auth_token")))
.pause(2)  

setUp(scn.inject(nothingFor(5 seconds),atOnceUsers(50),rampUsers(250) over(10 seconds))).protocols(httpProtocol)  
Run Code Online (Sandbox Code Playgroud)

错误:-jucTimeoutException:120000 ms后读取到/ IP:80的超时组无法建立请求Request_1:未定义名为“ auth_token”的属性

以下是配置:

//Maven configuration-pom.xml
java.version 1.8
gatling.version 2.2.3
gatling-plugin.version 2.2.1
scala-maven-plugin.version 3.2.2
// Gatling.conf file
connectTimeout 120000                         
handshakeTimeout 120000                       
pooledConnectionIdleTimeout 120000                  
readTimeout 120000                             
requestTimeout 120000                
Run Code Online (Sandbox Code Playgroud)

scala maven gatling

5
推荐指数
1
解决办法
5356
查看次数

标签 统计

gatling ×1

maven ×1

scala ×1