#, fuzzy msgid "" msgstr "" "MIME-Version: 1.0\n" "Content-Transfer-Encoding: 8bit\n" "Content-Type: text/plain; charset=UTF-8\n" msgctxt "b9983316eecc3623a48ee54c5949cf4b" msgid "Tempest Coding Guide" msgstr "" msgctxt "58c48d6d7727aa0cf7190cca0f6d57d0" msgid "====================" msgstr "" msgctxt "c00bf4040d7ce82472454b461ae9b1cd" msgid "- Step 1: Read the OpenStack Style Commandments" msgstr "" msgctxt "d0741409df823f60b931eedba63a55e2" msgid " http://docs.openstack.org/developer/hacking/" msgstr "" msgctxt "1c1f0d76ca0b8e608939bba3b254c7b1" msgid "- Step 2: Read on" msgstr "" msgctxt "f9a97de49646ef0e9da744ad3bad0434" msgid "Tempest Specific Commandments" msgstr "" msgctxt "34e8da3d228b4a8529b8fa1819b88f68" msgid "------------------------------" msgstr "" msgctxt "26bfe7df59639e8040d9f64bdc14bbd4" msgid "- [T102] Cannot import OpenStack python clients in tempest/api &" msgstr "" msgctxt "c23fca60a32052bec553123f365bf0a1" msgid " tempest/scenario tests" msgstr "" msgctxt "ec7369724af0470a57287ab9050400a2" msgid "- [T104] Scenario tests require a services decorator" msgstr "" msgctxt "54006ed54f48bec68716220e2365d24f" msgid "- [T105] Tests cannot use setUpClass/tearDownClass" msgstr "" msgctxt "606f90df1854b6af3f48fb5d0454705d" msgid "- [T106] vim configuration should not be kept in source files." msgstr "" msgctxt "7b49a1dd72092595517396bbc2761559" msgid "- [T107] Check that a service tag isn't in the module path" msgstr "" msgctxt "895b1ba94b268e842203b2ee4c1a11f5" msgid "- [T108] Check no hyphen at the end of rand_name() argument" msgstr "" msgctxt "47199b6eae23ff5e78dd954b2c7b555d" msgid "- [T109] Cannot use testtools.skip decorator; instead use" msgstr "" msgctxt "9c4a97ca9f58faae52da3676db28d571" msgid " decorators.skip_because from tempest-lib" msgstr "" msgctxt "f32637fa3898c2d1f9e9171d3fa9e39d" msgid "- [T110] Check that service client names of GET should be consistent" msgstr "" msgctxt "7c8e2175e56f1816b2082cfc832a746b" msgid "- [N322] Method's default argument shouldn't be mutable" msgstr "" msgctxt "267c5b7a0a1752af5f282f6bb7d9fa79" msgid "Test Data/Configuration" msgstr "" msgctxt "377a11258c9b4c572ed4e571d2648ac7" msgid "-----------------------" msgstr "" msgctxt "156769978351ddc6259ef1155372ec9a" msgid "- Assume nothing about existing test data" msgstr "" msgctxt "1bb977e2ac9e8a8b8d20f427a71aad05" msgid "- Tests should be self contained (provide their own data)" msgstr "" msgctxt "96036182d17b3a028cff6d8b8054586d" msgid "- Clean up test data at the completion of each test" msgstr "" msgctxt "2f81665355b42d0f00d89905d2844209" msgid "- Use configuration files for values that will vary by environment" msgstr "" msgctxt "32d519541273e152f1e859b4172fd7f3" msgid "Exception Handling" msgstr "" msgctxt "66442a0c865af2204a8d7b789a5f7fcb" msgid "------------------" msgstr "" msgctxt "a169b822cafd9e9bd91d2978bb8255b0" msgid "According to the ``The Zen of Python`` the" msgstr "" msgctxt "b816f7b8429d4d96276c1490f9e78d3d" msgid "``Errors should never pass silently.``" msgstr "" msgctxt "0a249fc5854092f9bafc290122aa9b1e" msgid "" "Tempest usually runs in special environment (jenkins gate jobs), in every" msgstr "" msgctxt "5918509058f7d80935ba0a1cd3be1c35" msgid "error or failure situation we should provide as much error related" msgstr "" msgctxt "3b1b372f7ac4ec422d43717e5100f8a5" msgid "information as possible, because we usually do not have the chance to" msgstr "" msgctxt "46598c6b5669f8e9d87b9e3b4549a3f2" msgid "investigate the situation after the issue happened." msgstr "" msgctxt "3388a243bcbf354ad15fa8c3bc2c9553" msgid "" "In every test case the abnormal situations must be very verbosely explained," msgstr "" msgctxt "8e35867dac0ef24ae43a3b294d14c936" msgid "by the exception and the log." msgstr "" msgctxt "a4faaba86a0daae525bd528389220308" msgid "In most cases the very first issue is the most important information." msgstr "" msgctxt "3b4ec31c6bc433931419d145703ecd29" msgid "" "Try to avoid using ``try`` blocks in the test cases, as both the ``except``" msgstr "" msgctxt "42033948b71b68b4a6144741a84cf204" msgid "and ``finally`` blocks could replace the original exception," msgstr "" msgctxt "0e07dbee6bffe53e0e8f3d2e1bd0a45b" msgid "when the additional operations leads to another exception." msgstr "" msgctxt "ae4970eda841b918bfedb34e04d5b2f3" msgid "" "Just letting an exception to propagate, is not a bad idea in a test case," msgstr "" msgctxt "7c10f7cef9505695ac3ac7852d8eea3c" msgid "at all." msgstr "" msgctxt "cdf372ee397383a1847aaf6856bc4059" msgid "" "Try to avoid using any exception handling construct which can hide the " "errors" msgstr "" msgctxt "bfc8c0b520d2736b23ab7521c3e7e6f4" msgid "origin." msgstr "" msgctxt "6ec33fe4707ca41210b042ee4a0337fd" msgid "If you really need to use a ``try`` block, please ensure the original" msgstr "" msgctxt "ccf39dd573d970db24a5feb7ca0a53ce" msgid "" "exception at least logged. When the exception is logged you usually need" msgstr "" msgctxt "e7d9006c2245e5e0421cc8c65c5a4695" msgid "to ``raise`` the same or a different exception anyway." msgstr "" msgctxt "fa7d28e9696a8b1b14da8c19a1d73bc9" msgid "" "Use of ``self.addCleanup`` is often a good way to avoid having to catch" msgstr "" msgctxt "bcd5b227ea069f8a23ec8e9b08a6f9f1" msgid "exceptions and still ensure resources are correctly cleaned up if the" msgstr "" msgctxt "af042d4b6c0e0393f3e9470922558d88" msgid "test fails part way through." msgstr "" msgctxt "7f34d178d83f4a0d4e01bc0e78226ca6" msgid "Use the ``self.assert*`` methods provided by the unit test framework." msgstr "" msgctxt "5dda81d65e55b6654453edcc9392053c" msgid "This signals the failures early on." msgstr "" msgctxt "3083f72b0ea2c47ad007adbe2bbf95c4" msgid "Avoid using the ``self.fail`` alone, its stack trace will signal" msgstr "" msgctxt "ac16f653b6c48adb2ce1b866b8b448f0" msgid "the ``self.fail`` line as the origin of the error." msgstr "" msgctxt "fed01d168f71062b4656e4d1a1e7bbba" msgid "Avoid constructing complex boolean expressions for assertion." msgstr "" msgctxt "258fb585f8b2140d17969815832803c4" msgid "" "The ``self.assertTrue`` or ``self.assertFalse`` without a ``msg`` argument," msgstr "" msgctxt "3325464b6e71907461d97f6320106464" msgid "" "will just tell you the single boolean value, and you will not know anything" msgstr "" msgctxt "cb46a873eee1860de2592b7f00e5e833" msgid "" "about the values used in the formula, the ``msg`` argument might be good " "enough" msgstr "" msgctxt "facef47687dd131c52045be9ee679cb6" msgid "for providing more information." msgstr "" msgctxt "592f3d93ae989da3811e34fb2e43bce6" msgid "Most other assert method can include more information by default." msgstr "" msgctxt "0dde3e14d6354350b82280647326d6e7" msgid "For example ``self.assertIn`` can include the whole set." msgstr "" msgctxt "c48c924065049f4c22112d15f2c6c098" msgid "" "It is recommended to use testtools `matcher`_ for the more tricky assertions." "" msgstr "" msgctxt "dcdee132c444fa0cd371a32e466b94c3" msgid "You can implement your own specific `matcher`_ as well." msgstr "" msgctxt "d38fb4edc5498eac8f31c6207016c5d1" msgid "" ".. _matcher: http://testtools.readthedocs.org/en/latest/for-test-authors." "html#matchers" msgstr "" msgctxt "cce747f5b8219a7047818b1618026a52" msgid "" "If the test case fails you can see the related logs and the information" msgstr "" msgctxt "712b72c134fc73e05c40f22c5c9d26e7" msgid "" "carried by the exception (exception class, backtrack and exception info)." msgstr "" msgctxt "12c0f82b917e243987d2311e0910031b" msgid "" "This and the service logs are your only guide to finding the root cause of " "flaky" msgstr "" msgctxt "87fa8b1afc351aecaa8dddc088271b2d" msgid "issues." msgstr "" msgctxt "707590b6a30ad642a7fdc78b47585feb" msgid "Test cases are independent" msgstr "" msgctxt "f15d3cc76a064278eb835b58134ea7f3" msgid "--------------------------" msgstr "" msgctxt "c340db2cb5bf7d46bc09bfe85aa1c794" msgid "" "Every ``test_method`` must be callable individually and MUST NOT depends on," msgstr "" msgctxt "215a931103017da47886bfff364c80af" msgid "any other ``test_method`` or ``test_method`` ordering." msgstr "" msgctxt "144d7adda3d3e1f5859b42a1c71129fc" msgid "" "Test cases MAY depend on commonly initialized resources/facilities, like" msgstr "" msgctxt "ab7c98baa69125bf3f39a42bb5d9873c" msgid "" "credentials management, testresources and so on. These facilities, MUST be " "able" msgstr "" msgctxt "23f2f5800896d5627ac643df1e6982bf" msgid "to work even if just one ``test_method`` is selected for execution." msgstr "" msgctxt "62150da6b1b867a67517b8bfb03fc614" msgid "Service Tagging" msgstr "" msgctxt "73b6f6ae3a377dd9cb8bf94564cc12f5" msgid "---------------" msgstr "" msgctxt "39d89f7092df55a11d2c0bddc92e9c3c" msgid "" "Service tagging is used to specify which services are exercised by a " "particular" msgstr "" msgctxt "fb9d074c8180383033f3d7ba34b42789" msgid "" "test method. You specify the services with the tempest.test.services " "decorator." msgstr "" msgctxt "506c2c0c7f5b70af3df68c45c46f45a7" msgid "For example:" msgstr "" msgctxt "e681e2863d2941a5e439f272d2eefbf9" msgid "@services('compute', 'image')" msgstr "" msgctxt "1891c3c8af1d581c3f29c6c2561211f0" msgid "" "Valid service tag names are the same as the list of directories in tempest." "api" msgstr "" msgctxt "eb6e8d05c66d6b8fd7b1870262a01487" msgid "that have tests." msgstr "" msgctxt "71b6e4bc20298e6427b029682389d3d5" msgid "" "For scenario tests having a service tag is required. For the api tests " "service" msgstr "" msgctxt "add48cec6421607fe7d47c3063b00feb" msgid "" "tags are only needed if the test method makes an api call (either directly " "or" msgstr "" msgctxt "a16375135d81d7993b93d34b06938fc2" msgid "" "indirectly through another service) that differs from the parent directory" msgstr "" msgctxt "bdf522eaca3e7d0b6cb0e7f5de04ff02" msgid "" "name. For example, any test that make an api call to a service other than " "nova" msgstr "" msgctxt "4daea4ef323e2ede20a65b38d38f1b4a" msgid "" "in tempest.api.compute would require a service tag for those services, " "however" msgstr "" msgctxt "8c5cdfe5b5fdae065d7fe64e7c50adc8" msgid "they do not need to be tagged as compute." msgstr "" msgctxt "ce0d052dc41149bc2429b64f8eee996c" msgid "Test fixtures and resources" msgstr "" msgctxt "2acdcbbe90b5dff7aab49da61731c8ce" msgid "---------------------------" msgstr "" msgctxt "0a67468e21b9f7337c0744b65c33d77c" msgid "" "Test level resources should be cleaned-up after the test execution. Clean-up" msgstr "" msgctxt "9654296b941c16e511cc4d1ed744cc40" msgid "" "is best scheduled using `addCleanup` which ensures that the resource cleanup" msgstr "" msgctxt "7c1bf27071a40d760713f2265e7ebd3b" msgid "" "code is always invoked, and in reverse order with respect to the creation" msgstr "" msgctxt "5e9b72a1dcaa52be753e58e202b2a772" msgid "order." msgstr "" msgctxt "7a4bb948cd0b77743eadb16d41b609d4" msgid "" "Test class level resources should be defined in the `resource_setup` method " "of" msgstr "" msgctxt "4f17ff6d8e2c58fefbf4b994f3529342" msgid "" "the test class, except for any credential obtained from the credentials" msgstr "" msgctxt "fb4a97f42440667016b6538568e7328a" msgid "provider, which should be set-up in the `setup_credentials` method." msgstr "" msgctxt "6931b75e1d028f45bae099a9bc8bdf1d" msgid "" "The test base class `BaseTestCase` defines Tempest framework for class level" msgstr "" msgctxt "96f6e8820a48b7aad0bf34317a77b90e" msgid "" "fixtures. `setUpClass` and `tearDownClass` are defined here and cannot be" msgstr "" msgctxt "405b153e6994eee4582a481019e17cbe" msgid "overwritten by subclasses (enforced via hacking rule T105)." msgstr "" msgctxt "61a91a010490ac99a2e05a7a3ff3ecdc" msgid "" "Set-up is split in a series of steps (setup stages), which can be " "overwritten" msgstr "" msgctxt "d7dda8b0b74a5f766715b118f705241c" msgid "by test classes. Set-up stages are:" msgstr "" msgctxt "a674db46ad61820d86d3bf9a8890a7bf" msgid "- `skip_checks`" msgstr "" msgctxt "812f25a023ae91e3bcf07cda0bbb1210" msgid "- `setup_credentials`" msgstr "" msgctxt "5cf06e04682d098decee1ad707f7e670" msgid "- `setup_clients`" msgstr "" msgctxt "c9ec09c826e23813511b84550dde4b4c" msgid "- `resource_setup`" msgstr "" msgctxt "6be5abe81ef495cc50a730297bd91b11" msgid "" "Tear-down is also split in a series of steps (teardown stages), which are" msgstr "" msgctxt "70e05ed392c81368294450059a50a09b" msgid "stacked for execution only if the corresponding setup stage had been" msgstr "" msgctxt "d8f4b6f4e1e7c44bc2d3939c0beab8ad" msgid "reached during the setup phase. Tear-down stages are:" msgstr "" msgctxt "9edd500164362afb13a54a087e246090" msgid "- `clear_credentials` (defined in the base test class)" msgstr "" msgctxt "0091b9bff40bc82319a60da69e069e27" msgid "- `resource_cleanup`" msgstr "" msgctxt "d8fa8714fd7b653851098f30fa09c643" msgid "Skipping Tests" msgstr "" msgctxt "7632602020c14162ce71e01d0fda5ac5" msgid "--------------" msgstr "" msgctxt "314d5fc12e48419db37572b2cb6c7791" msgid "" "Skipping tests should be based on configuration only. If that is not " "possible," msgstr "" msgctxt "3f562fb6c7b3dd6ec09c5c38d13d2f9a" msgid "" "it is likely that either a configuration flag is missing, or the test should" msgstr "" msgctxt "7bea8ca8b9770ff22c71047f54731cd9" msgid "fail rather than be skipped." msgstr "" msgctxt "eee4680c0e8a7a38835e3e8f17a4b3d1" msgid "Using discovery for skipping tests is generally discouraged." msgstr "" msgctxt "898a912a3516d5156876bc66510a44d3" msgid "When running a test that requires a certain \"feature\" in the target" msgstr "" msgctxt "5795e744029c48804de0c26d7124153d" msgid "" "cloud, if that feature is missing we should fail, because either the test" msgstr "" msgctxt "b6399b4a0e5e957075b9dd67704b9d27" msgid "" "configuration is invalid, or the cloud is broken and the expected " "\"feature\" is" msgstr "" msgctxt "392049db1c2b9354d12b2f46e8bfa3fa" msgid "not there even if the cloud was configured with it." msgstr "" msgctxt "45059d305cd4ce2df498a0f9d7336195" msgid "Negative Tests" msgstr "" msgctxt "da7226c783084e6c088bf5a5d17ee722" msgid "" "Newly added negative tests should use the negative test framework. First " "step" msgstr "" msgctxt "fe4995ce42a1d9038e680afa2af089f0" msgid "is to create an interface description in a python file under" msgstr "" msgctxt "f5cd1fb1468833bfce20782e3d7e8426" msgid "" "`tempest/api_schema/request/`. These descriptions consists of two important" msgstr "" msgctxt "5918cde4124c3a695ad8abbd3dc24d95" msgid "sections for the test (one of those is mandatory):" msgstr "" msgctxt "e44c66a00f2644a6c0a06ee6d66164ae" msgid "" " - A resource (part of the URL of the request): Resources needed for a test" msgstr "" msgctxt "ac530ac403c6c231ea3c50cfb63d6f43" msgid "" " must be created in `setUpClass` and registered with `set_resource` e.g.:" msgstr "" msgctxt "bda9884c4d5bc8812683861d97195a27" msgid " `cls.set_resource(\"server\", server['id'])`" msgstr "" msgctxt "ba73586b5338590d91373be4c38a4777" msgid " - A json schema: defines properties for a request." msgstr "" msgctxt "a80a3488c9b52f7cc6b628871bc2daf5" msgid "" "After that a test class must be added to automatically generate test " "scenarios" msgstr "" msgctxt "1242795bdbce5b58f6c7ae0fc29a64d4" msgid "out of the given interface description::" msgstr "" msgctxt "5ce868a9ead877430aedfae5d8b19d1a" msgid " load_tests = test.NegativeAutoTest.load_tests" msgstr "" msgctxt "38925670ad3ede134b8eec7f1e1c7b82" msgid " @test.SimpleNegativeAutoTest" msgstr "" msgctxt "1cd7d56cb26c5f631f41d4123dd3e9b0" msgid "" " class SampleTestNegativeTestJSON(, test." "NegativeAutoTest):" msgstr "" msgctxt "7a9730e5df893f8c87b6290b849938dc" msgid " _service = 'compute'" msgstr "" msgctxt "4bfe35083ca0f46274e4fa5af83fd73c" msgid " _schema = " msgstr "" msgctxt "3a743c31609fefd3e717ddc658537bf6" msgid "" "The class decorator `SimpleNegativeAutoTest` will automatically generate " "test" msgstr "" msgctxt "213277432e86effb316b88a4695aac1a" msgid "cases out of the given schema in the attribute `_schema`." msgstr "" msgctxt "239cb6b64b95f2b703f495ee065611be" msgid "All negative tests should be added into a separate negative test file." msgstr "" msgctxt "f7ce57e1b9e876774bfe6a8c484eda94" msgid "" "If such a file doesn't exist for the particular resource being tested a new" msgstr "" msgctxt "6c305d1c251b1a333613bef7d6814c40" msgid "test file should be added." msgstr "" msgctxt "1cec9431f3a84a61e45ba18ae21a95ef" msgid "Test skips because of Known Bugs" msgstr "" msgctxt "99a447d78334c5d687b8433e30c97b65" msgid "--------------------------------" msgstr "" msgctxt "d4914a3869029cdc0de26a110d472046" msgid "" "If a test is broken because of a bug it is appropriate to skip the test " "until" msgstr "" msgctxt "df7a883dec1bd83d30b7ce46e71ffc3d" msgid "bug has been fixed. You should use the skip_because decorator so that" msgstr "" msgctxt "787ac3be072294065949c6d90fdce761" msgid "Tempest's skip tracking tool can watch the bug status." msgstr "" msgctxt "a672b0fbdeffe479c04188dfe7f3ee43" msgid "Example::" msgstr "" msgctxt "775e3f023d83d678a3f03e7ef14dce21" msgid " @skip_because(bug=\"980688\")" msgstr "" msgctxt "0fb0f87b713d4cf19afa8234cb466a88" msgid " def test_this_and_that(self):" msgstr "" msgctxt "4217cdcd480169e41db92b734336e4f1" msgid " ..." msgstr "" msgctxt "af68aec6a9ff864bb2ea1a13ec1ac66f" msgid "Guidelines" msgstr "" msgctxt "01a6651a94ab602dbfc47587d234b52c" msgid "----------" msgstr "" msgctxt "9c43c7c8432dcbe6010f2c2404bf028f" msgid "- Do not submit changesets with only testcases which are skipped as" msgstr "" msgctxt "9cb3ed82f9bc898608c2ec8aab43428d" msgid " they will not be merged." msgstr "" msgctxt "1db6305901323db1c2fbd9def80365fa" msgid "- Consistently check the status code of responses in testcases. The" msgstr "" msgctxt "3c63028cc40adc9ff6824c67d628ac23" msgid " earlier a problem is detected the easier it is to debug, especially" msgstr "" msgctxt "98e8d6400fbe86f51c74ea46e64c1737" msgid " where there is complicated setup required." msgstr "" msgctxt "c2f368ea3ae77069b18d763e9bd5d332" msgid "Parallel Test Execution" msgstr "" msgctxt "675b632a4478d05a4b0a52b1b7506c12" msgid "" "Tempest by default runs its tests in parallel this creates the possibility " "for" msgstr "" msgctxt "841e76bad92a8d69e0fe357b3b340274" msgid "" "interesting interactions between tests which can cause unexpected failures." msgstr "" msgctxt "d6d2439901fb44181c89f7207fc82228" msgid "" "Dynamic credentials provides protection from most of the potential race" msgstr "" msgctxt "af8c8649193fc1363a82afbc25f5fefb" msgid "" "conditions between tests outside the same class. But there are still a few " "of" msgstr "" msgctxt "364d502098a88ea534e41b4276340386" msgid "" "things to watch out for to try to avoid issues when running your tests in" msgstr "" msgctxt "ac6b4810c4d00bc272c7c6c36158c0f4" msgid "parallel." msgstr "" msgctxt "58c3e3308391e1c2f0da437315d29d87" msgid "" "- Resources outside of a tenant scope still have the potential to conflict. " "This" msgstr "" msgctxt "b25aab020552a0b9bb8a67063d2d1047" msgid "" " is a larger concern for the admin tests since most resources and actions " "that" msgstr "" msgctxt "dee2338fd28def98a39d141b172670f9" msgid " require admin privileges are outside of tenants." msgstr "" msgctxt "1d76dc4a307cddb39378309cfd7506ff" msgid "- Races between methods in the same class are not a problem because" msgstr "" msgctxt "b3a226d4688b7321a3ed4c394201ad9f" msgid "" " parallelization in tempest is at the test class level, but if there is a " "json" msgstr "" msgctxt "a9edc733c99e2ae1b3637fea3e949f9e" msgid "" " and xml version of the same test class there could still be a race between" msgstr "" msgctxt "b39d3fe19f789ecd4a29b01c1c72c470" msgid " methods." msgstr "" msgctxt "f57a6ce34b759199ed4d8ee2054c54a8" msgid "" "- The rand_name() function from tempest.common.utils.data_utils should be " "used" msgstr "" msgctxt "42f92fbc534eafab4d6cdfd4a76003e2" msgid "" " anywhere a resource is created with a name. Static naming should be " "avoided" msgstr "" msgctxt "44bdf6f048f17bc852b43713987254fe" msgid " to prevent resource conflicts." msgstr "" msgctxt "203e8582ab57b40e41e45a95f2e65ad3" msgid "" "- If the execution of a set of tests is required to be serialized then " "locking" msgstr "" msgctxt "d67694ed58358c6a99689ff203b01fe3" msgid " can be used to perform this. See AggregatesAdminTest in" msgstr "" msgctxt "0c1d6a6b2eaefbda4c2c2e2a10d54c8f" msgid " tempest.api.compute.admin for an example of using locking." msgstr "" msgctxt "b18d0d6cb09e0ed7ee0654594c481c3b" msgid "Stress Tests in Tempest" msgstr "" msgctxt "665a3efb77c78a4be5ebf3aa8f987051" msgid "" "Any tempest test case can be flagged as a stress test. With this flag it " "will" msgstr "" msgctxt "5b8e43e898148b941313e9a990dcce81" msgid "" "be automatically discovery and used in the stress test runs. The stress test" msgstr "" msgctxt "e1d1bba4d7c8340d112152e07e1f1f28" msgid "" "framework itself is a facility to spawn and control worker processes in " "order" msgstr "" msgctxt "8f0b4e68d0a0c326b0cb09d89a8269ca" msgid "" "to find race conditions (see ``tempest/stress/`` for more information). " "Please" msgstr "" msgctxt "e3bca7290a84e025a989bc23cac3c662" msgid "" "note that these stress tests can't be used for benchmarking purposes since " "they" msgstr "" msgctxt "847d48e76b05a4ba49fd91a8962f1c67" msgid "don't measure any performance characteristics." msgstr "" msgctxt "706028219afdb6d25398f3fff7e73c23" msgid " @stresstest(class_setup_per='process')" msgstr "" msgctxt "ea53b7f899385c1f8343b9f90a5d2557" msgid "" "This will flag the test ``test_this_and_that`` as a stress test. The " "parameter" msgstr "" msgctxt "c62c97f3c703d5a546271ef1ae4c99fe" msgid "" "``class_setup_per`` gives control when the setUpClass function should be " "called." msgstr "" msgctxt "e05f365962a4e563077e79d122acb858" msgid "Good candidates for stress tests are:" msgstr "" msgctxt "9820c8c68f3e3de5c7de8f5825922f29" msgid "- Scenario tests" msgstr "" msgctxt "ae331e9b8fcde464c463d4ed3f34f85e" msgid "- API tests that have a wide focus" msgstr "" msgctxt "0a0e53003a5e1fb0aec499c644fee3a7" msgid "Sample Configuration File" msgstr "" msgctxt "179775a30826ad3957a7bd9eed49a285" msgid "-------------------------" msgstr "" msgctxt "1e507dfdf859e05ed9aa5a6494b5766d" msgid "" "The sample config file is autogenerated using a script. If any changes are " "made" msgstr "" msgctxt "dacd69f9a4df3cbdd549edc7de432600" msgid "" "to the config variables in tempest/config.py then the sample config file " "must be" msgstr "" msgctxt "ac1cd8ab24d90dc7a651abcb29bbec0d" msgid "regenerated. This can be done running::" msgstr "" msgctxt "be5a838e38e3af16d6433e795e0ca35e" msgid " tox -egenconfig" msgstr "" msgctxt "d6a712b8912b88fc5654b52032b40f5b" msgid "Unit Tests" msgstr "" msgctxt "6345b9bbf4afe06772b3d12499197e7a" msgid "" "Unit tests are a separate class of tests in tempest. They verify tempest" msgstr "" msgctxt "ff2f20a6a69fee6c978aa9b5abcf6473" msgid "itself, and thus have a different set of guidelines around them:" msgstr "" msgctxt "2285ba4749f620b89dee1faecf723ac2" msgid "" "1. They can not require anything running externally. All you should need to" msgstr "" msgctxt "d04be6063c318a8c5566ffa8c46d6582" msgid "" " run the unit tests is the git tree, python and the dependencies installed." "" msgstr "" msgctxt "4735e3dc4622e88a50af1ad62f96d3ab" msgid " This includes running services, a config file, etc." msgstr "" msgctxt "8e3490eb8f7cbc7588c0035bea4fb6fa" msgid "" "2. The unit tests cannot use setUpClass, instead fixtures and testresources" msgstr "" msgctxt "2400c512311adc9aa13d77ffcf78b50f" msgid " should be used for shared state between tests." msgstr "" msgctxt "0dd8fadd7ac10aa9001d50ad1423f136" msgid ".. _TestDocumentation:" msgstr "" msgctxt "1e7c1df92ffbfd9ec7183094692ff4ed" msgid "Test Documentation" msgstr "" msgctxt "b8d82724ec9fde98418b19b9f73b7892" msgid "" "For tests being added we need to require inline documentation in the form of" msgstr "" msgctxt "1223bf80ab2a92d51c39caa950b5a573" msgid "" "docstrings to explain what is being tested. In API tests for a new API a " "class" msgstr "" msgctxt "7824fe013ae27eab29c16b5f1c681d33" msgid "" "level docstring should be added to an API reference doc. If one doesn't " "exist" msgstr "" msgctxt "5ccb3635b2cfb56e073370a04db34916" msgid "" "a TODO comment should be put indicating that the reference needs to be added." "" msgstr "" msgctxt "21d2609f3095088aa22e6ea51386a108" msgid "" "For individual API test cases a method level docstring should be used to" msgstr "" msgctxt "ddde7a4a1d3569b70dc0bc3d8eb406e0" msgid "" "explain the functionality being tested if the test name isn't descriptive" msgstr "" msgctxt "1f975e858f7f4ca4c6c50207b4bf530a" msgid "enough. For example::" msgstr "" msgctxt "5680eaa58065c80f4a60193bf6a893f9" msgid " def test_get_role_by_id(self):" msgstr "" msgctxt "0b1b91cabcbf0c8466baf6d90697a080" msgid " \"\"\"Get a role by its id.\"\"\"" msgstr "" msgctxt "d50d438b92a0fa6d9e5abb572450fcb2" msgid "" "the docstring there is superfluous and shouldn't be added. but for a method" msgstr "" msgctxt "33508a39271d0bc831467d4acbb93e05" msgid "like::" msgstr "" msgctxt "bcafc577ab7b7718481ae6ce9fcdf1a7" msgid "" " def test_volume_backup_create_get_detailed_list_restore_delete(self):" msgstr "" msgctxt "c16bf2542cc34567d355784564d365d7" msgid " pass" msgstr "" msgctxt "41d5d063478830ddb40ac66e5265881d" msgid "" "a docstring would be useful because while the test title is fairly " "descriptive" msgstr "" msgctxt "2023a6f6cc138f836a4ddffcd2524667" msgid "" "the operations being performed are complex enough that a bit more " "explanation" msgstr "" msgctxt "b4a9bf9df20581956ceb36d3db4bb87d" msgid "will help people figure out the intent of the test." msgstr "" msgctxt "4e042168c01883019fcca6e726331255" msgid "" "For scenario tests a class level docstring describing the steps in the " "scenario" msgstr "" msgctxt "f80f6d55503bf33f6212b7398ee627ee" msgid "" "is required. If there is more than one test case in the class individual" msgstr "" msgctxt "b1dc9017c8dabbb5cfdea169d1005f6b" msgid "" "docstrings for the workflow in each test methods can be used instead. A good" msgstr "" msgctxt "6e8718d470344b8c0ade3e8d97f167c8" msgid "example of this would be::" msgstr "" msgctxt "f4c0c035a21044cd41bbf95897209ee0" msgid " class TestVolumeBootPattern(manager.ScenarioTest):" msgstr "" msgctxt "0739818b9412b05fa0e161f9732fa27b" msgid " \"\"\"" msgstr "" msgctxt "372a201a189eb9b7bde2696e1d800852" msgid " This test case attempts to reproduce the following steps:" msgstr "" msgctxt "d4e860068b87f1bd1ad186df6d275009" msgid "" " * Create in Cinder some bootable volume importing a Glance image" msgstr "" msgctxt "f2004c074606c23d926f328fc7d7ec83" msgid " * Boot an instance from the bootable volume" msgstr "" msgctxt "f97923a661af3fa66e5e0be91ee20c3f" msgid " * Write content to the volume" msgstr "" msgctxt "cda55b2d0456d4e84c9654c610a1992d" msgid " * Delete an instance and Boot a new instance from the volume" msgstr "" msgctxt "5e0e94905250b11649ba497d6e2e0379" msgid " * Check written content in the instance" msgstr "" msgctxt "dfe5b9484caf3337528641898630b352" msgid " * Create a volume snapshot while the instance is running" msgstr "" msgctxt "28b92d720945f8512fe19fa603f6d3e7" msgid "" " * Boot an additional instance from the new snapshot based volume" msgstr "" msgctxt "bd6848133f7772d678d920a5af083aa1" msgid " * Check written content in the instance booted from snapshot" msgstr "" msgctxt "7f96c71881be47b7938563e81f46971a" msgid "Test Identification with Idempotent ID" msgstr "" msgctxt "89ccfaa7e59d4d4845b2adf4848c90df" msgid "--------------------------------------" msgstr "" msgctxt "463fcf38a780816b217a800864e52087" msgid "" "Every function that provides a test must have an ``idempotent_id`` decorator" msgstr "" msgctxt "6544b21e098caa1ea07d8cc60b8486d5" msgid "" "that is a unique ``uuid-4`` instance. This ID is used to complement the " "fully" msgstr "" msgctxt "b65adfc692eb7194dfa57dde69b76841" msgid "" "qualified test name and track test functionality through refactoring. The" msgstr "" msgctxt "e0c96c35b0548f4ffc12292c7dde2191" msgid "format of the metadata looks like::" msgstr "" msgctxt "62dd0ecd40f27f381753992572509694" msgid " @test.idempotent_id('585e934c-448e-43c4-acbf-d06a9b899997')" msgstr "" msgctxt "820a26ae1af62334199a5747f7918e32" msgid " def test_list_servers_with_detail(self):" msgstr "" msgctxt "70f26e8e7f246c0bc32197abd74eacd4" msgid "" " # The created server should be in the detailed list of all servers" msgstr "" msgctxt "1bddbe55f51fa30d3eb3bd714f8167d9" msgid " ..." msgstr "" msgctxt "c94553e2195b57dd7aa1270286a3072b" msgid "" "Tempest-lib includes a ``check-uuid`` tool that will test for the existence" msgstr "" msgctxt "fdc000ade138fe4aa0f57c951e209ffd" msgid "and uniqueness of idempotent_id metadata for every test. If you have" msgstr "" msgctxt "e96bbc8c52514e0bae56e99f8625964f" msgid "" "tempest-lib installed you run the tool against Tempest by calling from the" msgstr "" msgctxt "464dc5de3cd15275a156f33cce45553b" msgid "tempest repo::" msgstr "" msgctxt "d9c6bc58bec6b592c7aff9e8cb058047" msgid " check-uuid" msgstr "" msgctxt "cc0342241a5a25b2c380dd7307d77213" msgid "It can be invoked against any test suite by passing a package name::" msgstr "" msgctxt "5abfdda8494dcd2d829f2062852009fb" msgid " check-uuid --package " msgstr "" msgctxt "2a31732f791fc7488c3f26df907a008c" msgid "" "Tests without an ``idempotent_id`` can be automatically fixed by running" msgstr "" msgctxt "7f66403cc3a77d0a3e55894d7da01a1a" msgid "" "the command with the ``--fix`` flag, which will modify the source package" msgstr "" msgctxt "8c600ddac917598da3e334195529cc62" msgid "" "by inserting randomly generated uuids for every test that does not have" msgstr "" msgctxt "b6d87ce4f45ce0f58634d435aa43d299" msgid "one::" msgstr "" msgctxt "0148622e9daea4336b1fd506aecce313" msgid " check-uuid --fix" msgstr "" msgctxt "b5f7242680807b6c28a3ebb8c7251055" msgid "The ``check-uuid`` tool is used as part of the tempest gate job" msgstr "" msgctxt "e8781978eba5e569dd216c796b91dda3" msgid "to ensure that all tests have an ``idempotent_id`` decorator." msgstr "" msgctxt "6ca12d54e4d6750ba5c8db2ef7a86fec" msgid "Branchless Tempest Considerations" msgstr "" msgctxt "1da3bcf1f98a6394e4e87242c7fb1308" msgid "---------------------------------" msgstr "" msgctxt "e04d6a093f22530c9dbe8b21c7a2f6e7" msgid "" "Starting with the OpenStack Icehouse release Tempest no longer has any " "stable" msgstr "" msgctxt "04e0324958546bc6f4ecfea4084d5970" msgid "" "branches. This is to better ensure API consistency between releases because" msgstr "" msgctxt "1ca3ff6270823a8c1ed05f4017f3f086" msgid "" "the API behavior should not change between releases. This means that the " "stable" msgstr "" msgctxt "a788d7573607ae293d28832d98d4cc56" msgid "" "branches are also gated by the Tempest master branch, which also means that" msgstr "" msgctxt "5e4e19501da5de3218a443edd1c10f0a" msgid "" "proposed commits to Tempest must work against both the master and all the" msgstr "" msgctxt "fd2f7e6856922dedaa3b28d49693b331" msgid "" "currently supported stable branches of the projects. As such there are a few" msgstr "" msgctxt "47a8855799b5e463bb4ab0489c97feb9" msgid "" "special considerations that have to be accounted for when pushing new " "changes" msgstr "" msgctxt "db03467ac3a918d8a384db33c2e34fcc" msgid "to tempest." msgstr "" msgctxt "335cca5ff1f31a0ec87916d43e596f40" msgid "1. New Tests for new features" msgstr "" msgctxt "aa11601ef4b810075cf15f1eb992dce1" msgid "^^^^^^^^^^^^^^^^^^^^^^^^^^^^^" msgstr "" msgctxt "f0e98883f14cdd50314d3929d09144ae" msgid "" "When adding tests for new features that were not in previous releases of the" msgstr "" msgctxt "3f45411340fa2e9017422c8520fc6463" msgid "" "projects the new test has to be properly skipped with a feature flag. " "Whether" msgstr "" msgctxt "be0b34c0ca6dda54a0ce5b557f3fab39" msgid "" "this is just as simple as using the @test.requires_ext() decorator to check" msgstr "" msgctxt "4fc09d31c68b1b5afd964fd7780cf1c6" msgid "" "if the required extension (or discoverable optional API) is enabled or " "adding" msgstr "" msgctxt "e010b43d523029a7c02e48683e1a1568" msgid "" "a new config option to the appropriate section. If there isn't a method of" msgstr "" msgctxt "8aa55e885691d9fe1746ca8f0d6f346a" msgid "" "selecting the new **feature** from the config file then there won't be a" msgstr "" msgctxt "750dcede3fdf09fcf81c8ff077cf6c87" msgid "" "mechanism to disable the test with older stable releases and the new test " "won't" msgstr "" msgctxt "d493a83cf6db640afa18664de57a9907" msgid "be able to merge." msgstr "" msgctxt "92a0d7df35faac386a3c606d862b672b" msgid "2. Bug fix on core project needing Tempest changes" msgstr "" msgctxt "a54e43cad1a773e0b84c363fbfbe972a" msgid "^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^" msgstr "" msgctxt "dd9d3536b04c543ed5889d283cfa7b36" msgid "" "When trying to land a bug fix which changes a tested API you'll have to use " "the" msgstr "" msgctxt "7d8a896f2a44fda23b3bc67d6770a307" msgid "following procedure::" msgstr "" msgctxt "eec90eb9d3a117c100b02829e773ee75" msgid "" " - Propose change to the project, get a +2 on the change even with " "failing" msgstr "" msgctxt "2e3aeac0ba1249fa44f4cf7b20d4a81c" msgid " - Propose skip on Tempest which will only be approved after the" msgstr "" msgctxt "5efc384acfbd4fe53d7120322f96fd1d" msgid " corresponding change in the project has a +2 on change" msgstr "" msgctxt "1953dd5a5f547d35c5d22f83166d04af" msgid "" " - Land project change in master and all open stable branches (if " "required)" msgstr "" msgctxt "f6f110560cf8ccbb48b119e0ce3e3e3c" msgid " - Land changed test in Tempest" msgstr "" msgctxt "84b057d2e4bc36223245ec470548f8de" msgid "Otherwise the bug fix won't be able to land in the project." msgstr "" msgctxt "28016c7538779eed7ce6e7bbcc5f2a86" msgid "3. New Tests for existing features" msgstr "" msgctxt "4abbb6c66d63a232595d8843d15a304a" msgid "^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^" msgstr "" msgctxt "8038d9ccaa84c34a739660f80ee19d70" msgid "" "If a test is being added for a feature that exists in all the current " "releases" msgstr "" msgctxt "1188bf03b2c4bbddee5365ad073cff5d" msgid "" "of the projects then the only concern is that the API behavior is the same" msgstr "" msgctxt "df286df4a4aa6ca5255d20c0e3084cd7" msgid "" "across all the versions of the project being tested. If the behavior is not" msgstr "" msgctxt "eef08dfe480d6a26b70c09b8f50ac9f2" msgid "consistent the test will not be able to merge." msgstr "" msgctxt "7ac1b7ac11e50f236d800c25df4e5d09" msgid "API Stability" msgstr "" msgctxt "7d782973c1ecd4d5a8475ea5d4ad4bd4" msgid "-------------" msgstr "" msgctxt "2a2209f23f9f81d916aa1f5f58fb3d9a" msgid "" "For new tests being added to Tempest the assumption is that the API being" msgstr "" msgctxt "9355ea215a39a446665e75cd6b78000f" msgid "tested is considered stable and adheres to the OpenStack API stability" msgstr "" msgctxt "235d24390e9fed916e5c9ba654c37881" msgid "" "guidelines. If an API is still considered experimental or in development " "then" msgstr "" msgctxt "71f45ed0d2b01b66c6bfb9347c714074" msgid "it should not be tested by Tempest until it is considered stable." msgstr ""