0

I work in a company where we use a proxy to access any browser website.

We would like to start API testing with JMeter, but have a problem.

Whenever I try to add an API call to petstore.swagger.io/v2/pet/10, for example, and put in the proxy details in the "Advanced" section of the HTTP request + adding an HTTP authorization manager with Username + Password, it still gives me a "407 Authenticationrequired" error back.

Request headers:

JMeter - request headers

Response headers:

JMeter - response headers

In the information I have also it's that the proxy is "Ruleset Name: Authentication with Kerberos and NTLM Fallback".

This is quite a problem if I'd like to test internal APIs with any authorization on it.

Helen
  • 87,344
  • 17
  • 243
  • 314
  • _"we use a proxy to access any browser website ... Authentication with Kerberos "_ >> this kind of proxy is meant for browsers (i.e. for humans), not for services. And especially not for Java stuff. Can you get clearance to install a **proxyfier** utility on your desktop, to bridge the gap between JDumpster and your proxy? I suspect Microsoft extensions in the mix... – Samson Scharfrichter Feb 03 '20 at 18:24
  • Hi, Company doesn't allow my to bypass the proxy unfortunately. As a simple Automation tester i don't have those rights.. I have seen i could authenticate with kerberos with Jmeter would that be a solution you think? I've been trying to authenticate with NTLM. But i always get a 407 back even with User/Pass + Domain – Aymeric Wilmotte Feb 04 '20 at 07:52
  • A "proxyfier" does not bypass the proxy -- it handles the proxy negotiation for apps that cannot do that natively. Check Wikipedia... – Samson Scharfrichter Feb 04 '20 at 18:38
  • I have installed proxyfier and set up the proxy + proxy rule. Even with that i still get the same 407 error back. (I realised my error after research, sorry my bad.) But even with it, It still doesn't work. Any tips? – Aymeric Wilmotte Feb 05 '20 at 07:39

1 Answers1

0

HTTP Status code 407 means that proxy authentication required, it seems that you're using a corporate proxy to access the application under test and this proxy requires credentials.

You have 2 options of passing the proxy credentials to JMeter:

  1. Command-line arguments like:

    jmeter -H my.proxy.server -P 8000 -u username -a password
    
  2. JMeter System properties (you can put these lines to system.properties file

    http.proxyUser=username
    http.proxyPass=password
    
Dmitri T
  • 159,985
  • 5
  • 83
  • 133