다음을 통해 공유


Visual Studio Load Test Performance Testing

Recently, my team needed to do some perf testing on some ASP.NET application with sql backend.  After some research, I discovered two ways to approach the problem that seemed easier than the rest:

Option 1:

Create what's known as web tests within Visual Studio.  Plug these into the load test framework in Visual Studio and off you go.  Here is a link that will give you more information that I can ever tell you:

https://blogs.msdn.com/b/edglas/archive/2007/12/17/content-index-for-web-tests-and-load-tests.aspx

Pros: Quick and fast.  No programming knowledge required at all since everything is down via an action recorder.  Basic XML knowledge can help.

Con: Hard to modify.

Option 2:

This is the option that I picked.  Write a bunch of unit tests inside Visual Studio using WatiN(https://watin.sourceforge.net/).  Then plug the unit tests into the load test framework.

Pros: Quick still, but not as fast as web tests.  Customizable just like any other desktop application.  Ability to have static initializers that run per performance test run and per performance unit function call.  Absolutely necessary if you want to query a database to form an url.

Cons: Not as easy as web test.

Comments

  • Anonymous
    January 01, 2003
    Thanks for the feedback Arshad.  We went with option 2 because we also had web services that we wanted to do some perf work on.  Could you elaborate more on why option 2 is no good?

  • Anonymous
    December 29, 2010
    Hello Option 1 will always be the best one. I think you have not explored "Web Test". If you open recorded web test in visual web test editor, in the tool bar you will see a button which can generate C# code for the recorded webtest. And once you do that, you can achieve what ever you want. through coding. Option 2 is certainly not a good idea for performance tesing.