Tool | Usage |
---|---|
unit tests |
|
functional tests |
|
lint checks |
See the documentation |
fuzz |
See the documentation |
util tests |
|
Bitcoin Core is also introducing (functional) "stress tests" which challenge the program via interruptions and missing files to ensure that we fail gracefully, e.g. the tests introduced in PR#23289.
The following diagram gives a brief overview of how the tests are structured within the source directory.
Warning
|
This diagram is not exhaustive and includes simplifications. |
Note
|
dashed lines indicate optional components |
Note
|
The fuzz_targets themselves are located in the test folder, however the fuzz tests are run via the test_runner in src/test so we point fuzz to there.
|
Note
|
qa_assets are found in a separate repo altogether, as they are quite large (~3.5GB repo size and ~13.4GB on clone).
|
Test directory Structure
flowchart LR TR1[test_runner] functional --> test lint --> test util --> test test_framework --> functional TR1 --> functional TR2["test_runner (fuzz)"] fuzz_targets --> fuzz fuzz --> src/test libFuzzer -.-> fuzz TR2 --> fuzz qa-assets -.-> fuzz unit --> src/test Boost --> unit test_bitcoin --> unit classDef types fill:green,color:white,stroke:green; class functional,lint,util,fuzz,unit types
Bitcoin Core’s test coverage reports can be found here.