简体   繁体   English

Visual Studio 负载测试 - Windows 身份验证

[英]Visual Studio Load Test - Windows Authentication

We are using Visual Studio 2013 to perform a load test against a desktop application that communicates to the backend via TCP.我们正在使用 Visual Studio 2013 对通过 TCP 与后端通信的桌面应用程序执行负载测试。

It uses windows authentication, whereby it takes the context of the user currently logged onto the machine, and uses this to log the user into the application automatically when invoked.它使用 Windows 身份验证,从而获取当前登录到机器的用户的上下文,并使用它在调用时自动将用户登录到应用程序中。

We are having trouble figuring out how to add more users to the test since we cannot get past the windows authentication.由于无法通过 Windows 身份验证,我们在弄清楚如何将更多用户添加到测试中时遇到了麻烦。

Has anyone encountered this before?有没有人遇到过这个? If yes, what was your work around?如果是,你的工作是什么?

There are articles about adding data sources to the run settings, but that is for a web test context.有关于将数据源添加到运行设置的文章,但这是针对 Web 测试上下文的。 There isn't an option to add a data source when the project is set to a load test context.当项目设置为负载测试上下文时,没有添加数据源的选项。

Any feedback will be greatly appreciated.任何反馈将不胜感激。

A Visual Studio Load Test is a mechanism for managing multiple executions of test cases. Visual Studio 负载测试是一种管理测试用例多次执行的机制。 Load tests are very good at managing Web Performance Tests, but they can run several other types of test.负载测试非常擅长管理 Web 性能测试,但它们可以运行其他几种类型的测试。 Your question does not specify what sort of test cases the load test is calling.您的问题没有指定负载测试正在调用哪种类型的测试用例。

Assuming that the test calls Web Performance Tests (in *.webtest files) then the web test itself can be data driven and that data can include the user name and password needed for Windows Authentication;假设测试调用 Web 性能测试(在*.webtest文件中),那么 Web 测试本身可以是数据驱动的,并且该数据可以包括 Windows 身份验证所需的用户名和密码; use the "Set credentials" command in the Web Test Editor (the command icon looks like a padlock).使用 Web 测试编辑器中的“设置凭据”命令(命令图标看起来像一个挂锁)。

If you have a Coded Web Performance Test then I suggest recording a minimal .webtest , setting the credentials on that, converting it to a coded web test and then copying the relevant code into your test.如果您有一个编码的 Web 性能测试,那么我建议记录一个最小的.webtest ,在其上设置凭据,将其转换为编码的 Web 测试,然后将相关代码复制到您的测试中。

There are no facilities to add a data source to a load test.没有将数据源添加到负载测试的工具。 That is because load tests manage other test cases, but are not test cases themselves.那是因为负载测试管理其他测试用例,但不是测试用例本身。

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM