我有一个使用我的Windows域凭据自动登录的应用程序。我在Jmeter中尝试了下面的内容。
HTTP请求 HTTP标头管理器(使用基本编码字符串进行授权)
我的反应低于预期 回复代码:500 响应消息:内部服务器错误
我能够在浏览器上查看内容。我尝试使用以下的java代码
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());
这给了我200 OK回复。
请通过Jmeter告诉我如何实现这一目标。提前谢谢!
答案 0 :(得分:0)
尝试在您的jmeter测试套件中添加HTTP授权管理器并在那里输入您的凭据。这可能会解决您的问题