mongo/docs/testing
Steve McClure 2e6173ecc6 SERVER-124481: Team Rename: DevProd Test Infrastructure (#52100)
GitOrigin-RevId: 6c9a9cf8146772bd21d0f091bfcb1ffed450de00
2026-04-28 20:09:30 +00:00
..
fsm_concurrency_testing_framework.md SERVER-124136 Format markdown via prettier: wrap lines and use width of 100 (#52231) 2026-04-21 19:20:11 +00:00
hang_analyzer.md SERVER-124136 Format markdown via prettier: wrap lines and use width of 100 (#52231) 2026-04-21 19:20:11 +00:00
network_fault_injection_mongobridge.md SERVER-124136 Format markdown via prettier: wrap lines and use width of 100 (#52231) 2026-04-21 19:20:11 +00:00
otel_resmoke.md SERVER-124136 Format markdown via prettier: wrap lines and use width of 100 (#52231) 2026-04-21 19:20:11 +00:00
OWNERS.yml SERVER-124481: Team Rename: DevProd Test Infrastructure (#52100) 2026-04-28 20:09:30 +00:00
README.md SERVER-124136 Format markdown via prettier: wrap lines and use width of 100 (#52231) 2026-04-21 19:20:11 +00:00
resmoke_modules.md SERVER-124136 Format markdown via prettier: wrap lines and use width of 100 (#52231) 2026-04-21 19:20:11 +00:00

Testing

Most tests for MongoDB are run through resmoke, our test runner and orchestration tool. The entry point for resmoke can be found at buildscripts/resmoke.py

Concepts

Learn more about related topics using their own targeted documentation:

  • resmoke, the test runner
  • suites, how tests are grouped and configured
  • fixtures, specify the server topology that tests run against
  • hooks, logic to run before, after and/or between individual tests
  • testcases, Python-based unittest interfaces that resmoke can run as different "kinds" of tests.

Basic Example

First, ensure that your python venv is active and up to date:

python3 -m venv python3-venv
source python3-venv/bin/activate
buildscripts/poetry_sync.sh

and you've built the source binaries to run against, eg:

bazel build install-dist-test

Now, run the test content from one test file:

buildscripts/resmoke.py run --suites=no_passthrough jstests/noPassthrough/shell/js/string.js

The suite defined in buildscripts/resmokeconfig/suites/no_passthrough.yml includes that string.js file via glob selections, specifies no fixtures, no hooks, and a minimal config for the executor.