logger.info("Error Response:[" + extraInfo.session("username").asOption[String]
+ "], Code:[" + statusCode + "], Response Body:[" + extraInfo.response.body.string
+ "], Token:[" + extraInfo.session("cspAuthToken").asOption[String]
+ "], Org id:[" + extraInfo.session("defaultOrgId").asOption[String]
+ "], Started At: [" + startedAt + "], Current time:[" + System.nanoTime()
+ "], Total Seconds:[" + totalSecondsPassed + "]")
这是用scala 2.12.3版本编写的代码,后来在将scala版本升级到2.13.1版本时出现此错误,
Sorry, type inference was unable to figure out the type. You need to provide it explicitly.
logger.info("Error Response:[" + extraInfo.session("username").asOption[String]
答案 0 :(得分:1)
加特林不支持Scala 2.13(请参阅https://gatling.io/docs/current/installation) (自Gatling 3.3起)