Files
mongo/buildscripts/resmokelib/testing/testcases
Alex Li 88deba90af SERVER-115106 Port to GoogleTest (#45689)
Co-authored-by: James Bronsted <james.bronsted@mongodb.com>
Co-authored-by: Billy Donahue <billy.donahue@mongodb.com>
Co-authored-by: James Bronsted <32047428+jpbronsted@users.noreply.github.com>
Co-authored-by: Sean Lyons <sean.lyons@mongodb.com>
Co-authored-by: Billy Donahue <BillyDonahue@users.noreply.github.com>
Co-authored-by: Ronald Steinke <167128994+rsteinkeX@users.noreply.github.com>
GitOrigin-RevId: 44975de45e91c0666e545b65519822f7b6a4ad15
2025-12-29 22:43:55 +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/