Load testing
Test whether the app can handle a specified user load under specific conditions while still meeting the response goals. The app runs in a normal state.
Stress testing
Test the app’s stability when running under extreme conditions, usually for a long period. The test places high user load on the app (spike or gradually increasing load) or restricts the app’s compute resources. Stress testing determines whether the app under stress can recover from failure and correctly return to the expected behavior. Under stress, the app runs under unusually high pressure.
Testing tools
Cloud-based testing and Apache JMeter are two popular load testing tools. Load and stress tests should be performed in release and production modes, not in debug and development modes.
Using Apache JMeter
Apache JMeter is an open-source Java application for load testing, functional testing, and performance testing. JMeter can simulate many kinds of load, including load testing, stress testing, functional testing, benchmark testing, and more.
It provides a powerful graphical interface where you can build a test plan and then execute it. JMeter supports many protocols, including HTTP, HTTPS, FTP, JMS, SOAP, TCP, and LDAP, and additional protocols can be supported through plugins.
https://jmeter.apache.org/usermanual/build-web-test-plan.html
Benchmark testing
Benchmark testing is a testing method used to establish an application’s performance baseline so that performance can be optimized over the application’s lifecycle. BenchmarkDotNet can be used to run benchmarks in .NET applications.
dotnet add package BenchmarkDotNet
public class Md5VsSha256
{
[Benchmark]
public byte[] Sha256() => sha256.ComputeHash(data);
[Benchmark]
public byte[] Md5() => md5.ComputeHash(data);
}
public class Program
{
public static void Main(string[] args)
{
BenchmarkRunner.Run<Md5VsSha256>();
}
}