scala - 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 问题?
解决方案
proxy
可以调用:
- 或者在像这里这样的 HttpProtocol 上
- 或者像这里的 HttpRequestBuilder
所以要么你没有在正确的地方调用它,要么你搞砸了 Gatling 进口,严格来说应该像这里一样。
该文档没有提及其他任何事情
文档的正确链接proxy
是:
推荐阅读
- r - 将列表转换为所需的结构化数据框
- javascript - 如何为数据更改编写firebase函数,以一个链式惯用承诺将文件写入云存储桶?
- javascript - 在 php 中回显时 Javascript 不起作用
- python - 如何在 tensorflow 中实现多对多 RNN?
- java - 使用 spark-avro 编写数据帧创建 topLevelRecord - 想要使用现有模式
- drupal-7 - 在视图结果之间插入添加块仅适用于 S 和 XS 设备
- java - 用户支持的分配未能满足步幅要求,退回到单独分配
- javascript - 如何从 json 文件访问类别->平板电脑->描述?
- css - css边框角覆盖
- android - 如何以编程方式将社交媒体帖子作为图像保存到图库