Files
mongo/buildscripts/resmokelib/testing/testcases
Mike Merrill 5b9acb40b4 SERVER-109955 Fuzztest support and libfuzzer depreciation (#46638)
GitOrigin-RevId: 0b7dbc51c35fde2f50d80ec68a184678165896c0
2026-02-20 19:01:29 +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/