subsystem-summary-of-test
Installation
SKILL.md
Test Subsystem — Test Utilities and Infrastructure
The src/test/ directory contains test infrastructure, helpers, and utilities used across the entire stellar-core test suite. It does NOT contain the actual test cases (those live alongside their subsystems). This document covers the test framework, helper classes, and conventions.
Test Framework and Runner (test.h / test.cpp)
Test Entry Point
runTest(CommandLineArgs const& args)— Main test runner entry point. Configures Catch2 session, parses CLI args (log level, metrics, version selection, tx meta recording), seeds PRNGs, and runs all tests.- Uses Catch2 as the underlying test framework (wrapped via
Catch2.h).
Test Configuration
getTestConfig(int instanceNumber, Config::TestDbMode mode)— Returns a lazily-created, cachedConfigfor the given instance number. Configs are stored ingTestCfg[mode]arrays. Default mode isTESTDB_BUCKET_DB_VOLATILE. Key config settings:RUN_STANDALONE = true,FORCE_SCP = true,MANUAL_CLOSE = trueWORKER_THREADS = 3, invariant checks enabled (exceptEventsAreConsistentWithEntryDiffs)- Test root directories created via
TmpDiringTestRoots - Node seed derived deterministically from instance number + command-line seed
- Single-node quorum with
UNSAFE_QUORUM = true NETWORK_PASSPHRASE = "(V) (;,,;) (V)"- DB can be in-memory SQLite, file-backed SQLite, or PostgreSQL
Related skills
More from stellar/stellar-core
running-tests
running tests at various levels from smoke tests to full suite to randomized tests
1subsystem-summary-of-scp
read this skill for a token-efficient summary of the scp subsystem
1running-make-to-build
how to run make correctly to get a good build, and otherwise understand the build system
1subsystem-summary-of-history
read this skill for a token-efficient summary of the history subsystem
1subsystem-summary-of-invariant
read this skill for a token-efficient summary of the invariant subsystem
1subsystem-summary-of-soroban-env
read this skill for a token-efficient summary of the soroban-env subsystem
1