Anusha adapa
Anusha adapa

Reputation: 11

Jmeter default windows authentication

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!

Upvotes: 1

Views: 401

Answers (1)

Jackey Roy
Jackey Roy

Reputation: 11

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

Upvotes: 0

Related Questions