Adding authentication to JMeter REST request

2019-05-22 23:33发布

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

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.

标签: rest jmeter
1条回答
一纸荒年 Trace。
2楼-- · 2019-05-22 23:41

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

  • jmeter.properties:

    httpclient.parameters.file=httpclient.parameters

  • httpclient.parameters:

    http.authentication.preemptive$Boolean=true

查看更多
登录 后发表回答