Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

How to load test a WinForms application?

Tags:

c#

winforms

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.

like image 737
Carl Weis Avatar asked Nov 04 '25 23:11

Carl Weis


1 Answers

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

like image 91
Amr Avatar answered Nov 06 '25 14:11

Amr