docs/articles/contributing/running-tests.md
To run all tests just run the following command in the repo root:
dotnet test -c Release BenchmarkDotNet.slnx
Most of the tests projects target net462 and net8.0. If the change that you want to test is not specific to any particular runtime, you can run the tests for one of them.
dotnet test -c Release -f net8.0 BenchmarkDotNet.slnx
You should be able to run all of tests from your IDE as well.
For some unit tests (e.g. for exporter tests) BenchmarkDotNet uses Verify.
*.verified.txt file located near the test source file in the repository. Verify generates verified file's names automatically according test name and its parameters. This files must be added under the source control.*.received file for each failed test. You can use diff tools for convenient file comparison. By default you can find test run results on the test runner console as usual. You can comment out the line result.DisableDiff() in VerifySettingsFactory.Create method and then Verify will open KDiff for each failed test. This way you can easily understand what's the difference between verified and received values and choose the correct one.