开发者

Trace/Log load test parameters

I can't find an easy way to combine load test results and tracing custom parameters.

I have a load test containing a single unit test. this unit test calls a web method with some parameters. There are many parameters and a large amount of values for each. During a load test, I want to trace the context (values of parameters) of each call and the results (error, duration, ...) in order to establish some metrics. How can I do that ?

I know I can do that insi开发者_JAVA技巧de the unit test, but I want to keep it as simple as possible. In a loadtestplugin, I am unable to correlate TestStarting and TestFinished.


The only way I can think of to do this is to use the BeginTimer and EndTimer methods of the TestContext object. For each web method call, start up one or more timers using the parameter values as part of the timer name. Then in the load test results you'll see individual results for each differently named timer.

I do a similar thing for webtests.


Visual Studio load tests can collect Windows performance counters from the agents and controllers running the tests. They can also be collected from other computer, typically the servers being loaded by the test.

You could arrange that various data from your test is written to new Windows performance counters, created specifically for your tests. These counters can then be collected by the load test and they can then be graphed and analysed etc in the same way as the counters normally collected in a load test.

There are lots of web pages about creating your own performance counters plus many more about how a Visual Studio load test can collect them.

0

上一篇:

下一篇:

精彩评论

暂无评论...
验证码 换一张
取 消

最新问答

问答排行榜