Stress test the ASP. NET Web API service using West wind Websurge

Source: Internet
Author: User

West Wind Web Surge (hereinafter referred to as Websurge) is not just a stress test feature for the ASP, but also a simple stress test for ASP. NET MVC, ASP. WebForm or other Web application services, and Load testing is also only a function of Websurge, Websurge also has a similar Telerik Fiddler function, can be issued for the specified browser request and received Response to retrieve, interested friends can go to We Bsurge's official website for more information.

However, this article simply explains the function of Load testing.

West Wind Websurge

http://websurge.west-wind.com/

Take a closer look at the Features list on the homepage of the official website, Websurge offers quite a few features.

Websurge is developed by the great god Rick Strahl , which is an open source software, although open source software but there is a differentiated authorization, in the case of personal use is free to use, basically personal use of the free version or Professional, ORG Version of the function is the same, the only difference is that the ORG version can be used in the same organization to provide multi-person use.

Http://websurge.west-wind.com/pricing.aspx

The difference between the free version and the paid version is that the free version will appear in the event of an alert registration statement.

??

For Websurge still do not know what kind of tool and what features are provided, it is recommended to first crossing the function of the network to introduce instructions,

Http://websurge.west-wind.com/features.aspx

If still feel quite vague, then is to see the direct author of the operation of the video, the length of about 15 minutes, although the title of the film is said to be Web Load testing, but in the film has been the majority of the functions of the operation once, so through the film will know Websurge is doing something ~

https://www.youtube.com/watch?v=TSfWYcr6q5o

? The download and installation of Websurge is quite simple, you can download it directly from the official website, or go to Github to download the latest version, or install it via the chocolaty command.

Http://websurge.west-wind.com/download.aspx

??

Use

The above is a brief introduction and description, although the author has provided the film to us, but I believe that some people will still skip the film to see how the Websurge exactly how to use, this side with a simple ASP. NET Web API service to do the demonstration.

The following are three web APIs that provide data and the data content provided (the Client tool used to manipulate the Web API is Postman)

_http://localhost:35346/v1/customers/{customerid}

_http://localhost:35346/v1/customers/all

_http://localhost:35346/v1/customers/paging?start={pageindex}&count={pagesize}

??

Now to use Websurge to execute these three Web APIs,

Add a new Request

Fill in the connection address of the Web API

There are two buttons below, Save and test respectively, it is recommended that the test confirmed that the address is valid and then stored after validation is valid.

Test and execution results

Add the Web API address you want to test sequentially

Just a test, if you want to test all the Web API services you just joined, you can directly execute the "all" option above,

The result of the execution, you can see the results of all the execution, the total execution of the execution time, the average run time, the shortest run time, the maximum run time, the execution results of individual Request will also be displayed.

? Load Testing

The above is a single execution, whether for the individual request or all request, is only executed once, but if you want to do a time to send multiple request execution Stress test, you can use the features provided by Websurge,

The time unit is the second, Threads can decide how many threads to send the request, this side is not recommended to open too much, because to consider the execution of the environment of the hardware (that is, your own computer CPU memory hard disk ... etc), after the setting can press the "start" start to perform the test.

Execution will show the current project in the Output,

Execution complete

Websurge also provides statistical charts for execution results, with: Requests per Second and time taken per URL

Request per Second

Time taken per URL

??

If you do not want to issue the request too regularly, but want to send a request randomly, you can first select a request and then go to the Session Options to change the "randomizerequrests" from False to True,

Re-executing the Load testing, you can see that the request sent will be more random than orderly (if you're not adding a lot of the request, then you can't see it),

??

If you want to create a series of Request can be saved, you can save the session, the next time you re-open Websurge can be loaded session use.

?

? will find Websurge really is a mistake, originally was just to see Rick Strahl this article "prettifying a JSON String in. NET", and then in the article see Websurge interface, at the beginning still feel This should be no different from Fiddler, but after reading the official website and operating the film, it is a pretty good tool.

I'll use Websurge as a simple stress test tool when developing WEB APIs, because it's fairly straightforward to work with, and if you're paired with Visual Studio Ultimate, the " Performance and diagnostics feature, you will find a system bottleneck, or you can match some of the well-paid diagnostic and testing tools, such as Dottrace, Dotmemory, ANTS Performance Profiler or Memory Profiler, Justtrace. NET Memory and Performance Profiler.

However, if you want to do more detailed stress testing, it is recommended to use other functionally more complete pressure measurement tools, and Websurge is used as the development phase of the pressure measurement tool, after all, developers for performance and system load still have basic correspondence, before delivering a functional finished product, Developers are going to do basic processing, such as validation, security, performance, unit testing, and so on, rather than waiting until the end to go live.

Surge means big waves, waves, surges, which is why Websurge's logo has the main cause of the wave sign, but in fact should be taken with SURGE (scalable URL Reference Generator) meaning.

In addition, for stress testing of the ASP, you can use Jmemter or the superbenchmaker that MicroSoft mvp-bruce Chen has described in the article.

KingKong Bruce Chronicle: free website and Rest Service stress testing tool ?

Related connections

http://websurge.west-wind.com/

Https://github.com/rickstrahl/WestwindWebSurge

Http://jpkc.nwpu.edu.cn/yjsgsp/06/news/1.5.htm

West Wind Websurge-an Easy-to-Load Test Web Applications-rick Strahl ' s web Log

?

Original address: http://kevintsengtw.blogspot.com/2015/07/west-wind-websurge-aspnet-web-api.html

Stress test the ASP. NET Web API service using West wind Websurge

Related Article

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.