Skip to content

Latest commit

 

History

History
71 lines (51 loc) · 2.01 KB

tests-overview.adoc

File metadata and controls

71 lines (51 loc) · 2.01 KB

Tests overview

Table 1. Tests overview
Tool Usage

unit tests

make check or ./src/test_bitcoin

functional tests

test/functional/test_runner.py

lint checks

See the documentation

fuzz

See the documentation

util tests

test/util/test_runner.py

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.

Test directory structure

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

Test coverage

Bitcoin Core’s test coverage reports can be found here.