Co-authored-by: Benety Goh <benety@mongodb.com> Co-authored-by: Mathias Stearn <mathias@mongodb.com> Co-authored-by: Kaitlin Mahar <kaitlin.mahar@mongodb.com> Co-authored-by: Brandon Stoll <bstoll@users.noreply.github.com> Co-authored-by: Vanessa Noia <54818020+nessnoia@users.noreply.github.com> Co-authored-by: graphite-app[bot] <96075541+graphite-app[bot]@users.noreply.github.com> Co-authored-by: Vishnu K <vishnu.kaushik@mongodb.com> Co-authored-by: Sunil Narasimhamurthy <suniltheta@gmail.com> Co-authored-by: Jiawei Yang <youngyang0820@gmail.com> Co-authored-by: Will Korteland <korteland@users.noreply.github.com> Co-authored-by: Saman Memaripour <amirsaman.memaripour@mongodb.com> Co-authored-by: huayu-ouyang <huayu.ouyang@mongodb.com> Co-authored-by: Suganthi Mani <38441312+smani87@users.noreply.github.com> Co-authored-by: Thomas Goyne <thomas.goyne@mongodb.com> Co-authored-by: Haley Connelly <haley.connelly@mongodb.com> Co-authored-by: Billy Donahue <BillyDonahue@users.noreply.github.com> Co-authored-by: Kirollos Morkos <kiro.morkos@mongodb.com> Co-authored-by: Lingzhi Deng <lingzhi.deng@mongodb.com> Co-authored-by: Hartek Sabharwal <hartek.sabharwal@mongodb.com> Co-authored-by: Aaron Himelman <aaron.himelman@mongodb.com> Co-authored-by: Moustafa Maher <m.maher@mongodb.com> Co-authored-by: prathmesh-kallurkar <prathmesh.kallurkar@mongodb.com> Co-authored-by: Dan Larkin-York <13419935+dhly-etc@users.noreply.github.com> Co-authored-by: Shreyas Kalyan <35750327+shreyaskalyan@users.noreply.github.com> Co-authored-by: Shreyas Kalyan <shreyas.kalyan@mongodb.com> Co-authored-by: Jonathan Reams <jbreams@mongodb.com> Co-authored-by: adriangzz <adriangonzalezmontemayor@gmail.com> Co-authored-by: Eric Milkie <milkie@users.noreply.github.com> Co-authored-by: Aaron B <aaron.balsara@mongodb.com> Co-authored-by: Ali Mir <ali.mir@mongodb.com> Co-authored-by: Alex Blekhman <alexander.blekhman@mongodb.com> Co-authored-by: mpobrien <mpobrien005@gmail.com> Co-authored-by: Mark Benvenuto <mark.benvenuto@mongodb.com> Co-authored-by: Ruby Chen <ruby.chen@mongodb.com> Co-authored-by: Jagadish Nallapaneni <146780625+jagadishmdb@users.noreply.github.com> Co-authored-by: Jonas Bergler <jonas.bergler@mongodb.com> Co-authored-by: Peter Macko <peter.macko@mongodb.com> Co-authored-by: Nic <nic.hollingum@mongodb.com> Co-authored-by: Jiawei Yang <jiawei.yang@mongodb.com> Co-authored-by: Jordi Serra Torrens <jordist@users.noreply.github.com> Co-authored-by: Sunil Narasimhamurthy <sunil.narasimhamurthy@mongodb.com> GitOrigin-RevId: a1c6609c820052137e2aa759711e86c337ae6f9f
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:
all_versions_js_test:AllVersionsJSTestCase- Alias for JSTestCase for multiversion passthrough suites.- It runs with all combinations of versions of replica sets and sharded clusters. The distinct name is picked up by task generation.
benchmark_test:BenchmarkTestCase- A Benchmark test to execute.bulk_write_cluster_js_test:BulkWriteClusterTestCase- A test to execute with connection data for multiple clusters passed through TestData.cpp_integration_test:CPPIntegrationTestCase- A C++ integration test to execute.cpp_libfuzzer_test:CPPLibfuzzerTestCase- A C++ libfuzzer test to execute.cpp_unit_test:CPPUnitTestCase- A C++ unit test to execute.db_test:DBTestCase- A dbtest to execute.fsm_workload_test:FSMWorkloadTestCase- A wrapper for several copies of a_SingleFSMWorkloadTestCaseto execute.js_test:JSTestCase- A wrapper for several copies of a_SingleJSTestCaseto executejson_schema_test:JSONSchemaTestCase- A JSON Schema test to execute.magic_restore_js_test:MagicRestoreTestCase- A test to execute for running tests in a try/catch block.mongos_test:MongosTestCase- A TestCase which runs a mongos binary with the given parameters.multi_stmt_txn_passthrough:MultiStmtTxnTestCase- Test case for multi statement transactions.parallel_fsm_workload_test:ParallelFSMWorkloadTestCase- An FSM workload to execute.pretty_printer_test:PrettyPrinterTestCase- A pretty printer test to execute.py_test:PyTestCase- A python test to execute.query_tester_self_test:QueryTesterSelfTestCase- A QueryTester self-test to execute.query_tester_server_test:QueryTesterServerTestCase- A QueryTester server test to execute.sdam_json_test:SDAMJsonTestCase- Server Discovery and Monitoring JSON test case.server_selection_json_test:ServerSelectionJsonTestCase- Server Selection JSON test case.sleep_test:SleepTestCase- SleepTestCase class.tla_plus_test:TLAPlusTestCase- A TLA+ specification to model-check.
Interfaces
Top level interfaces:
TestCase- A test case to execute. Therun_testmethod must be implemented.ProcessTestCase- Base class for TestCases that executes an external process. The_make_processmethod must be implemented.
Subclasses:
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 a fixture. Intended for use before archiving a failed test.JSRunnerFileTestCase- A test case with a static JavaScript runner file to execute.MultiClientsTestCase- A wrapper for several copies of a SingleTestCase to execute.TestCaseFactory- Convenience interface to initialize and build test cases
Testing TestCases
Self-tests for the testcases themselves can be found in buildscripts/tests/resmokelib/testing/testcases/