authentication - JMeter 自定义身份验证
问题描述
我们目前采用非标准身份验证方法,并在我们的请求授权标头中提供该方法。
因此,我们不得不使用 JMeter 等软件。我已经进行了一些挖掘,但我们在这方面没有经验。
推进这一进程的最佳方式是什么?
解决方案
There are several workarounds:
- You can use a real browser driven by the WebDriver Sampler, once you have the authentication context you can extract it and add the header to JMeter's HTTP Request samplers using HTTP Header Manager
- The custom client code can be implemented in JMeter in the appropriate JSR223 Test Element, you can even re-use JavaScript code but be aware that you won't be able to use Navigator object or anything else connected with the browser.
- If you don't to load-test the authentication routine itself and want to focus solely on the application you can hard-code a test header which will be accepted by the application and use the aforementioned HTTP Header Manager to supply this token
推荐阅读
- typescript - 将接口类型分配给代码优先的 GraphQL 解析器参数
- r - 如何将每一行数据帧与 R 中的数据帧进行比较?
- r - R:3D 散点图未显示在 Web 浏览器中
- ssl - 如何让 TLS 1.2 KB4019276 补丁在 Windows Server 2008 上运行?
- python - 如何在 Pandas 中创建具有 ```yyyy-mm-dd``` 格式的虚拟列?
- matlab - 杠杆和帽子矩阵完全一样?
- php - 将json数组转换为html表
- flutter - DraggableScrollableSheet 在 NestedScrollView 中不起作用
- html - 如何使用 CSS 更改 Google 表格背景?
- python - 来自 API 的嵌套 JSON 转换为 Dataframe