0
votes

Trying to perform a load testing using Jmeter tool however can not pass authentication. The following curl works well

curl -u <USERNAME>:<PASSWORD> -X PUT "http://server-url/artifactory/my-repository/my/new/artifact/directory/file.txt" -T Desktop/myNewFile.txt

I need to upload file via PUT method based on the curl sample above and can not do it because do not understand where username and password values should be placed in the HTTP Request sampler, in the parameters part, Post Body or somewhere else.

Thanks you

2

2 Answers

0
votes

You need to add a HTTP Authorisation Manager to your Test Plan and configure it as follows:

  • Base URL: http://server-url
  • Username: USERNAME
  • Password: PASSWORD

JMeter will generate relevant Authorization header and add it to the request. See How to Use HTTP Basic Authentication in JMeter article for more details.

0
votes

Guessing, but you probably add the HTTP header

Authentication: basic [base64 of username:password]

Google "HTTP Basic Authentication"