问题
This is a question about performance testing specific to SharePoint web parts and controls (although standard ASP.NET methods would be applicable as well). I'm wondering what are some good techniques, considering factors such as:
- caching (what and when should you cache?)
- load balanced servers (storing state)
- interaction with other parts of the page (e.g. multiple JavaScript execution)
- measuring CPU usage for a particular control
- rendered page size
回答1:
I recommend Visual Studio Test Suite 2008 with SP1. We have used a test agent on our indexing server with the test controller running on the developers desktop with Visual Studio installed.
It is possible to simulate browser caching and we have found errors with our own server caching where the caching was not actually working.
Load balanced servers are easy to work with as you can simulate a range of ip addresses. You do need to be able to assign a range of ip addresses to the machine running the tests and only the last octet of the ip address is able to be adjusted. The stats on each web front end can be added to the perfmon stats generated by the test.
You can simulate clicks on different parts of the page if required, but the more complex the scenario the harder it is to get perfect.
The CPU and other stats measuring is great. All the test results can be added to a database and the charting of the tests during and after the load test is really good.
Comments can be added to each test run so you can identify them easily when you need to view the results of tests that have been run before.
Be warned that the results can quickly add up in size over time.
来源:https://stackoverflow.com/questions/315490/what-are-some-good-techniques-for-performance-testing-sharepoint-web-parts-and-c