向 JMeter REST 请求添加身份验证 [英] Adding authentication to JMeter REST request

查看:24
本文介绍了向 JMeter REST 请求添加身份验证的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我今天大部分时间都在努力使这项工作发挥作用,但仍然没有成功.我有一个简单的案例 - 我只想向我的网络服务发送一个 GET 请求.但是无论我做什么,我都无法对其进行身份验证.我尝试了各种授权管理器、Cookie 管理器、页眉管理器的组合……都无济于事.

I've spent the better part of today trying to get this working, and still haven't been successful. I have a simple case - I'd just like to send one GET request to my web-service. But no matter what I do, I can't get it to authenticate. I've tried all kinds of combinations of Authorization Manager, Cookie Manager, Header Manager... To no avail.

我已经把它归结为这个最简单的测试:

I've boiled it down this simplest test:

Thread Group
---->HTTP Authorization Manager
---->HTTP Request
---->View Results Tree

我可能会遗漏什么??我为授权管理器尝试了多个 URL,目前已将其设置为 https://[domain]:[port].
我已经填写了用户名和密码,就是这样.

What could I possibly be missing?? I've tried several URLs for the Authorization Manager, and currently have it set to https://[domain]:[port].
I've filled in Username and Password, and that's it.

推荐答案

要启用抢先式身份验证,请使用 HTTPClient 3.1 实现 http 请求.
然后更改下面的文件添加:

To enable pre-emptive authentication, use HTTPClient 3.1 implementation of http request.
Then change the files below to add:

  • jmeter.properties:

  • jmeter.properties:

httpclient.parameters.file=httpclient.parameters

httpclient.parameters:

httpclient.parameters:

http.authentication.preemptive$Boolean=true

这篇关于向 JMeter REST 请求添加身份验证的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆