This article is a mirror article of machine translation, please click here to jump to the original article.

View: 62334|Reply: 6

[Source] .NET/C# Load Test NBomber Simple Tutorial

[Copy link]
Posted on 2021-7-19 10:26:47 | | | |
NBomber is an open-source .NET framework, the open-source protocol is Apache 2.0, NBomber is used to load test a variety of services, including web, message queues, databases, etc.  NBomber version 2.0 was released in May this year. NBomber is similar to JMeter, but the difference from JMeter is that NBomber expresses test scenarios through F#/C#/JSON code.

The main reason behind NBomber is to provide a lightweight framework for writing load tests that you can use to test any system and simulate any production workload. We just want to provide some abstraction so that we can describe any type of payload and still have a simple, intuitive API.
Another goal is to provide building blocks to validate your POC (proof of concept) project by applying any complex load distribution.
With NBomber, you can test any PULL or PUSH system (HTTP, WebSockets, GraphQl, gRPC, SQL Databse, MongoDb, Redis, etc.).
With NBomber, you can easily convert some integration tests into load tests.

NBomber as a modern framework provides:

  • Zero-dependency protocols (HTTP/WebSockets/AMQP/SQL)
  • Zero dependency on semantic models (Pull/Push)
  • Very flexible configuration and very simple API (F#/C#/JSON)
  • Cluster support
  • Real-time reporting
  • CI/CD integration
  • Data feed support

GitHub address:The hyperlink login is visible.
Document address:The hyperlink login is visible.

First, create a new .NET Core 3.1 console project and use nuget to install the following package:

To get the most performance from NBomber, you should edit your project settings with the following configuration:

Garbage collection settings
GarbageCollection should switch to server and concurrency mode:



Full project setup:

Test sending a GET request to this site and set a custom request header with the following code:



The program will automatically generate a test report under the bin\Debug\netcoreapp3.1\reports\ directory, as shown in the figure below:



(End)




Previous:Spring Cloud Gateway cannot find a service solution using nacos
Next:Docker builds SFTP services
 Landlord| Posted on 2021-7-19 10:29:57 |
windows Apache ab web site stress test
https://www.itsvse.com/thread-4836-1-1.html

Stress test using Apache's ab tool
https://www.itsvse.com/thread-4410-1-1.html

Posted on 2021-7-29 15:53:40 |
The code cannot be viewed                        
 Landlord| Posted on 2021-12-18 20:00:07 |
 Landlord| Posted on 2021-12-18 20:01:18 |

Lasts 30 seconds at 500 concurrency per second

Posted on 2022-3-22 11:43:18 |
Nice, finally found
Posted on 2023-4-15 18:53:29 |
Very good and powerful, thanks for sharing
Disclaimer:
All software, programming materials or articles published by Code Farmer Network are only for learning and research purposes; The above content shall not be used for commercial or illegal purposes, otherwise, users shall bear all consequences. The information on this site comes from the Internet, and copyright disputes have nothing to do with this site. You must completely delete the above content from your computer within 24 hours of downloading. If you like the program, please support genuine software, purchase registration, and get better genuine services. If there is any infringement, please contact us by email.

Mail To:help@itsvse.com