mongo/buildscripts/resmokelib/testing/testcases
Steve McClure 32e8f260de SERVER-124136 Format markdown via prettier: wrap lines and use width of 100 (#52231)
GitOrigin-RevId: 3305c1e2ee3a6a2c3a5b2b7883b0f491a59ed646
2026-04-21 19:20:11 +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-121737 Add fixture and hook support to external resmoke modules (#49689) 2026-03-17 14:54:06 +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-121737 Add fixture and hook support to external resmoke modules (#49689) 2026-03-17 14:54:06 +00:00
cpp_libfuzzer_test.py SERVER-121737 Add fixture and hook support to external resmoke modules (#49689) 2026-03-17 14:54:06 +00:00
cpp_unittest.py SERVER-121737 Add fixture and hook support to external resmoke modules (#49689) 2026-03-17 14:54:06 +00:00
dbtest.py SERVER-121737 Add fixture and hook support to external resmoke modules (#49689) 2026-03-17 14:54:06 +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-120178 add unixDomainSocket support to resmoke (#49009) 2026-03-06 16:21:18 +00:00
interface.py SERVER-121737 Add fixture and hook support to external resmoke modules (#49689) 2026-03-17 14:54:06 +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-121737 Add fixture and hook support to external resmoke modules (#49689) 2026-03-17 14:54:06 +00:00
jstest.py SERVER-121737 Add fixture and hook support to external resmoke modules (#49689) 2026-03-17 14:54:06 +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-121737 Add fixture and hook support to external resmoke modules (#49689) 2026-03-17 14:54:06 +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
OWNERS.yml SERVER-101181 Change ownership of query_tester to query-optimization-correctness (#50700) 2026-04-20 20:56:09 +00:00
pretty_printer_testcase.py SERVER-121737 Add fixture and hook support to external resmoke modules (#49689) 2026-03-17 14:54:06 +00:00
pytest.py SERVER-121737 Add fixture and hook support to external resmoke modules (#49689) 2026-03-17 14:54:06 +00:00
query_tester_self_test.py SERVER-121737 Add fixture and hook support to external resmoke modules (#49689) 2026-03-17 14:54:06 +00:00
query_tester_server_test.py SERVER-121737 Add fixture and hook support to external resmoke modules (#49689) 2026-03-17 14:54:06 +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
sdam_json_test.py SERVER-121737 Add fixture and hook support to external resmoke modules (#49689) 2026-03-17 14:54:06 +00:00
server_selection_json_test.py SERVER-121737 Add fixture and hook support to external resmoke modules (#49689) 2026-03-17 14:54:06 +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-121737 Add fixture and hook support to external resmoke modules (#49689) 2026-03-17 14:54:06 +00:00

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/