mongo/buildscripts/resmokelib/testing/testcases
ppolato cdaeda023d SERVER-113156 Introduce a new fixture and base suite for Disaggregated Sharded Clusters (#43776)
GitOrigin-RevId: bd0f59bcca8444296a6f1827c96b5cbb307952d1
2025-11-14 17:39:42 +00:00
..
OWNERS.yml SERVER-97276: Added evergreen and resmoke integration for running query-correctness-tests using query_tester (#29465) 2025-01-08 17:05:33 +00:00
README.md SERVER-112569: Document fixture lifecycles better (#42763) 2025-10-20 22:37:25 +00:00
__init__.py SERVER-94076 Remove unused imports via Ruff rule (#27337) 2024-10-04 01:43:13 +00:00
benchmark_test.py SERVER-108127 Add test timeouts to Resmoke (#40419) 2025-08-26 20:16:02 +00:00
bulk_write_cluster_js_test.py SERVER-108653: [revert revert] Add README for resmoke testcases (#39555)" (#39572)" (#39585) 2025-08-04 21:23:57 +00:00
cpp_integration_test.py SERVER-108127 Add test timeouts to Resmoke (#40419) 2025-08-26 20:16:02 +00:00
cpp_libfuzzer_test.py SERVER-108127 Add test timeouts to Resmoke (#40419) 2025-08-26 20:16:02 +00:00
cpp_unittest.py SERVER-108127 Add test timeouts to Resmoke (#40419) 2025-08-26 20:16:02 +00:00
dbtest.py SERVER-111295 Set python as formatter in format_multirun (#41677) 2025-09-24 17:41:24 +00:00
fixture.py SERVER-113156 Introduce a new fixture and base suite for Disaggregated Sharded Clusters (#43776) 2025-11-14 17:39:42 +00:00
fsm_workload_test.py SERVER-108127 Add test timeouts to Resmoke (#40419) 2025-08-26 20:16:02 +00:00
interface.py SERVER-108127 Add test timeouts to Resmoke (#40419) 2025-08-26 20:16:02 +00:00
json_schema_test.py SERVER-94077 Use isort in Ruff configs (#27865) 2024-10-10 19:33:49 +00:00
jsrunnerfile.py SERVER-111295 Set python as formatter in format_multirun (#41677) 2025-09-24 17:41:24 +00:00
jstest.py SERVER-111295 Set python as formatter in format_multirun (#41677) 2025-09-24 17:41:24 +00:00
magic_restore_js_test.py SERVER-101646 Move magic restore test infrastructure into enterprise module (#35020) 2025-04-16 15:33:16 +00:00
mongos_test.py SERVER-108127 Add test timeouts to Resmoke (#40419) 2025-08-26 20:16:02 +00:00
multi_stmt_txn_test.py SERVER-108653: [revert revert] Add README for resmoke testcases (#39555)" (#39572)" (#39585) 2025-08-04 21:23:57 +00:00
pretty_printer_testcase.py SERVER-111295 Set python as formatter in format_multirun (#41677) 2025-09-24 17:41:24 +00:00
pytest.py SERVER-108127 Add test timeouts to Resmoke (#40419) 2025-08-26 20:16:02 +00:00
query_tester_self_test.py SERVER-111295 Set python as formatter in format_multirun (#41677) 2025-09-24 17:41:24 +00:00
query_tester_server_test.py SERVER-111295 Set python as formatter in format_multirun (#41677) 2025-09-24 17:41:24 +00:00
sdam_json_test.py SERVER-111295 Set python as formatter in format_multirun (#41677) 2025-09-24 17:41:24 +00:00
server_selection_json_test.py SERVER-108127 Add test timeouts to Resmoke (#40419) 2025-08-26 20:16:02 +00:00
sleeptest.py SERVER-90570: Enable formatting checks for buildscripts directory, excluding idl (#22254) 2024-05-16 22:07:36 +00:00
tla_plus_test.py SERVER-111877: fix tla+ script argument type (#42134) 2025-10-02 18:10:20 +00:00

README.md

TestCases

TestCases extend Python-based unittest.TestCase objects that resmoke can run as different "kinds" of tests.

Supported TestCases

Specify any of the following as the test_kind in your Suite config:

Interfaces

Top level interfaces:

  • TestCase - A test case to execute. The run_test method must be implemented.
  • ProcessTestCase - Base class for TestCases that executes an external process. The _make_process method must be implemented.

Subclasses:

Fixture TestCases

These are testcases that are used to coordinate fixture lifecycles via resmoke's internal FixtureTestCaseManager.

NOTE This design does lead to seeing "extra" tests in a run, where a fixture sets up, your N tests are run, and the fixture tears down, so you see N+2 "tests" passing via resmoke.

  • FixtureTestCase - Base class for the fixture test cases.
  • FixtureSetupTestCase - TestCase for setting up a fixture.
  • FixtureTeardownTestCase - TestCase for tearing down a fixture.
  • FixtureAbortTestCase - TestCase for killing/aborting a fixture. Intended for use before archiving a failed test.
    • When resmoke detects that a test has failed (and archiving is configured), it dynamically generates a new FixtureAbortTestCase for immediate execution. This test case sends a SIGABRT to each running mongod process.

Testing TestCases

Self-tests for the testcases themselves can be found in buildscripts/tests/resmokelib/testing/testcases/