Performance testing of dotnet core WebAPI

Viewed 600

I was wondering if there are any tools worth of trying to test dotnet core WebAPI performance during high load.

In the past I used jMeter of Apache, but configuring that alongside with TeamCity and dotnet core builds is a bit of pain.

I am looking for something that could deliver statistics, so automated run of tests can give me information if recent changes have or haven't decreased performance etc.

I also did a quick google, VisualStudio has something on board, but first of all it requires Enterprise edition of software, and I am not convinced if that tool is good enough.

Thank you

1 Answers

Take a look at https://github.com/dotnet/BenchmarkDotNet - it's a widely used and respected library.

If your goal is to test WebAPI you can create a HttpClient and use it for making calls to the API, wrap it in a benchmark and run it on TeamCity as a simple dotnet step.

The tool also can create reports in HTML which then can be added to TeamCity as a custom tab.

If it's not enough then you can extract performance metrics e.g. from PlainExporter and integrate it with TeamCity built-in Service Messages and create Custom Charts from those stats so TeamCity will help you track performance trends.

You could even act on those measures and e.g. fail the build if there is a significant performance degradation.

Related