首页 > 解决方案 > Gatling 代理配置失败

问题描述

这样做时

val HTTP_PROTOCOL = http
    .proxy(Proxy("proxy", 8080))

启动测试时我有这个

too many arguments (2) for method apply:(v1:io.gatling.core.session.Session)io.gatling.commons.validation.Validation[Proxy.type] in trait Function1
    .proxy(Proxy("proxy", 8080))

该文档没有提及其他任何事情

https://gatling.io/docs/current/http/http_protocol#response-handling-parameters

我正在使用可用的最新版本

  <properties>
    <maven.compiler.source>1.8</maven.compiler.source>
    <maven.compiler.target>1.8</maven.compiler.target>
    <encoding>UTF-8</encoding>

    <gatling.version>3.3.1</gatling.version>
    <gatling-maven-plugin.version>3.0.5</gatling-maven-plugin.version>
  </properties>

任何想法,因为它可能是一些 Scala 问题?

标签: scalagatling

解决方案


proxy可以调用:

所以要么你没有在正确的地方调用它,要么你搞砸了 Gatling 进口,严格来说应该像这里一样。

该文档没有提及其他任何事情

文档的正确链接proxy是:


推荐阅读