VS2010 负载测试失败 - 无法打开数据库 - 不是负载测试结果数据库
嗨,我一整天都在与这个问题作斗争。我有一个 vs2010 负载测试,它由三个场景组成,这三个场景由三个不同的 Web 性能测试组成。
每个 Web 性能测试都从正确配置并在本地运行的数据库中选择 URL。但是,当远程运行负载测试时,它会失败并显示错误:
无法在代理“AGENTSERVER”上运行负载测试“负载测试”。无法打开登录请求的数据库“URLSDB”。用户帐户登录失败
为了尝试使其正常工作,将代理和控制器设置为在域管理员帐户下运行,我可以通过 Management Studio 登录到数据库。我已经检查了连接字符串,并且可以在本地运行测试,但不能远程运行测试。有人有什么想法吗?我的下一步是将连接字符串设置为 UrlsDB 以使用 SQL 身份验证
Hi I have been battling with this issue all day. I have a vs2010 load test which consists of three scenarios which are composed of three different web performance tests.
Each of the web performance tests select urls from a database which is configured correctly and runs locally. However when the load test is run remotely it fails with the error:
Could not run load test 'Load Test' on agent 'AGENTSERVER'. Could not open the database 'URLSDB' requested by the login. login failed for useraccount
In an attempt to get this working the agents and controller are set to run under a domain admin account, I can login to the database through Management Studio. I've checked the connection string and can run the test locally but not remotely. Does anyone have any ideas? My next step is to set the connection string to the UrlsDB to use SQL Authentication
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。
绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(2)
终于在凌晨 1 点 20 分成功解决了这个问题。在检查构成场景中混合的三个单独测试的数据源时,我发现 UI 显示一旦更新了其中一个,所有三个测试都更新了连接字符串,这就是为什么我对为什么得到这些感到困惑错误,而且错误并不表明哪个连接出现问题。
因此,为了消除测试问题,我从每个测试中删除了数据源,并创建了单独命名的全新数据源,直到有效地指向相同的 sql 服务器和相同的数据库。然后我运行了测试,最后一切都正确执行了!
所以核心问题是底层测试中的连接字符串不正确。将进一步测试用户界面,以检查我是否只是我自己的错误,或者用户界面中实际上可能存在错误,如果我发现错误,我会报告它。
感谢那些花时间尝试帮助我解决问题的人,让我困惑了近 20 个小时,但遗憾的是这个问题是如此之小:/
Finally managed to resolve it at 01:20AM. When checking the datasources of three individual tests which made up the mixes in the scenario, I found that the UI was showing that once one had been updated all three updated the connection string so that is why I was baffled as to why I was getting these errors, plus the error doesn't indicate which connection was having the issue.
So to eliminate the tests as being the issue I removed the datasource from each test and created individually named brand new datasources all till effectively pointing to the same sql server and the same database. Then I ran the tests and all performed correctly, finally!!
So the core issue was the connection strings in the underlying tests were incorrect. Will be testing the UI further to check if I was just my own error or there may actually be a bug in the UI, if I find a bug I'll report it.
Thanks to those who took the time to try to help me solve it, gutted that the issue was so minor when it had me baffled for nearly 20 hours :/
您运行测试的域管理员帐户无法从代理计算机连接到数据库服务器。
登录代理并从那里调试数据库连接。
请注意,Web 测试中的线程阻塞调用(例如这可能会导致负载测试出现问题)。如果可能的话,我建议您在测试实例期间加载所有测试 URL。
从本质上讲,尽可能减少数据库调用。
The domain admin account you are running the test from cannot connect to the database server from the agent machine.
Log into the agent and debug the database connection from there.
Please be aware that a thread blocking call inside a web test, such as this may cause issues with your load test. I recommend that you load all test url's during the test instanciation if at all possible.
Essentially minimise the database calls to as few as possible.