0
0
mirror of https://github.com/mongodb/mongo.git synced 2024-11-28 16:24:56 +01:00
mongodb/docs/testing
2023-04-26 19:19:19 +00:00
..
fsm_concurrency_testing_framework.md
hang_analyzer.md
README.md

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

run

The run subcommand can run suites (list of tests and the MongoDB topology and configuration to run them against), and explicitly named test files.

A single suite can be specified using the --suite flag, and multiple suites can be specified by providing a comma separated list to the --suites flag.

Additional parameters for the run subcommand can be found on the help page, accessible by running buildscripts/resmoke.py run --help

Additional documentation on our suite configuration can be found on the Suites configuration file page

Testable Installations (--installDir)

resmoke can run tests against any testable installation of MongoDB (such as ASAN, Debug, Release). When possible, resmoke will automatically locate and run with a locally built copy of MongoDB Server, so long as that build was installed to a subdirectory of the root of the git repository, and there is exactly one build. In other situations, the --installDir flag, passed to run subcommand, can be used to indicate the location of the mongod/mongos binaries.

As an alternative, you may instead prefer to use the resmoke.py wrapper script located in the same directory as the mongod binary, which will automatically set installDir for you.

Note that this wrapper is unavailable in packaged installations of MongoDB Server, such as those provided by Homebrew, and other package managers. If you would like to run tests against a packaged installation, you must explicitly pass --installDir to resmoke.py