Skip to Content
DevelopersTesting

Testing

Tidecoin inherits Bitcoin Core’s test layout and adds PQ, PQHD, AuxPoW, and post-quantum transport coverage.

This page is the overview. Use Functional Tests and Fuzzing for deeper workflows.

Test Layers

LayerPathPurpose
Unit testssrc/test/, src/wallet/test/Fast C++ tests for primitives and subsystem behavior
Functional teststest/functional/Python tests that drive regtest nodes through RPC and P2P
Fuzz testssrc/test/fuzz/Parser, script, P2P, policy, and crypto edge cases
Lint teststest/lint/Static checks and style constraints
Test datasrc/test/data/JSON vectors for scripts and transactions

Common Commands

ctest --test-dir build build/test/functional/test_runner.py build/test/functional/test_runner.py --extended

Run wallet-heavy gated unit tests explicitly:

TIDECOIN_RUN_WALLET_TESTS=1 ./build/bin/test_tidecoin --run_test=wallet_tests

Tidecoin-Specific Coverage

Important Tidecoin test areas include:

AreaExamples
PQHDpqhd_kdf_tests, pqhd_keygen_tests, wallet_pqhd_seed_lifecycle.py, wallet_pqhd_policy.py
PQ keys and scriptspq_pubkey_container_tests, pq_multisig_tests, feature_pq_script_assets.py
AuxPoWauxpow_tests, auxpow_serialization_tests, auxpow_mining.py, auxpow_invalidpow.py, auxpow_zerohash.py
Transportbip324_pq_tests, p2p_v2_transport.py, p2p_v2_encrypted.py
Transaction sizingpq_txsize_tests

Before Sending a PR

Change typeMinimum local test expectation
Docs onlyDocs build if the docs repo changed
Wallet changeRelevant wallet unit tests and wallet functional tests
RPC changeUnit tests where applicable plus functional coverage
Consensus/script changeUnit tests, functional tests, and relevant vectors
P2P/transport changeP2P functional tests and fuzz target where practical
AuxPoW changeAuxPoW unit and functional tests
Crypto parsing/signature changeUnit tests, vectors, and fuzzing where practical

Debugging Failures

  • Check the combined functional test logs.
  • Re-run a single failing test with a clean temp directory.
  • Use --jobs=1 to remove parallelism from functional test debugging.
  • Use --nocleanup when you need to inspect node datadirs.
  • Confirm no unrelated tidecoind process is using test ports.
  • For RPC coverage, use test_runner.py --coverage.

See also: Functional Tests, Fuzzing, PQ Test Vectors, Build from Source.

Last updated on