Apacha Jmeter 问题

问题描述 投票:0回答:1

如何将登录响应中的 apikey 传递到仪表板 HTTP 请求?

我收到 401 错误{"response_code":401, "response_message": "Auth Key not Found", "result":[]}

当我尝试在仪表板中获取 API 时。

我不会在标头中传递该 API 密钥,以便获取仪表板数据。[401 错误问题]

https://i.sstatic.net/7ANg3NAe.png

parameters jmeter
1个回答
0
投票

我没有看到任何 HTTP 标头管理器的迹象,它可能解释了这种行为。

如果您使用 Beanshell PreProcessor 设置标头 - 请查看 jmeter.log 文件,您的脚本可能会在某个地方失败

另请注意,从 JMeter 3.1 开始,建议使用 JSR223 测试元素和 Groovy 语言进行脚本编写,因此请考虑迁移。更多信息:Apache Groovy:Groovy 的用途是什么?

© www.soinside.com 2019 - 2024. All rights reserved.