1
votes

I have an application which automatically login using my windows domain credentials. I tried with the below in Jmeter.

HTTP Request HTTP Header manager(Authorization with Basic encoded string)

I am getting below response Response code: 500 Response message: Internal Server Error

I was able to view content on browser. I tried the same with java code as below

CookieHandler.setDefault(new CookieManager(null, CookiePolicy.ACCEPT_ALL));
            Authenticator.setDefault(new MyAuthenticator("username", "password"));
           URL url = new URL("http://someurl");
            HttpURLConnection connection = (HttpURLConnection)url.openConnection();
            System.out.println(connection.getResponseCode());
            System.out.println(connection.getResponseMessage());

This gives me 200 OK response.

Please let me know how to achieve this through Jmeter. Thanks in advance!

1
Tried with that too..when I use HTtpClient4 it gives me 410 unauthorised error...the same if I just change to httpclient3.1....it gives me 500 internal server error. Not sure what is the issue hereAnusha adapa
my httprequest header has [no cookies]. Any idea why is it so?Anusha adapa

1 Answers

0
votes

Try adding HTTP Authorization Manager in your jmeter test suite and enter your credentials there.This will likely solve your problem