开发者

How to load test a WinForms application?

开发者 https://www.devze.com 2023-03-21 23:33 出处:网络
I\'m trying 开发者_开发问答to figure out the best way to load test a Windows Forms application, that hits a server and gets a response. I need to load test it for multiple users and I\'m not sure if t

I'm trying 开发者_开发问答to figure out the best way to load test a Windows Forms application, that hits a server and gets a response. I need to load test it for multiple users and I'm not sure if the load testing tools inside visual studio 2010 will work.

Any advice is appreciated.


Here's something you can try..

  • In a test application, write a method A that encapsulates the code that makes call to the server, and receives the response.
  • In the same application, write a method B that create multiple threads. Each thread would execute method A.
  • Make sure to calculate how much time it takes to finish work on each thread.
  • Increase the number of threads to simulate more load.

Moving the code that makes the call to the server to method A without the rest of the application should make repeating the test much easier and ease the load on the client machine performing the test.

Here's sample code of a similar idea simulating load test of accessing a database C# Stress Test - Simulate multiple access to a given shared resource


I don't have any experience with it, but if you have VS2010 ultimate try out Microsoft.VisualStudio.QualityTools.LoadTestFramework:
http://msdn.microsoft.com/en-us/library/ms243153.aspx

If you need some additional direction, here is a sample of the framework in use: http://blogs.msdn.com/b/edglas/archive/2006/02/06/525614.aspx


Well, my first instinct is to create a bunch of virtual machines and run a whole bunch of your programs at once. Possibly bouncing the ip's around a little bit(I dont know how large scale this needs to be).

It might be a little rough but it would work if you simply keep adding a couple connections at a time. Obviously this wont work if you need thousands open at once. But I hope this helps a little.

-Kenetik

0

精彩评论

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