{"json_modified": "2016-03-28T08:07:45.749511", "uuid": "ef6343f9-e19e-4028-b58c-a61e1464de36", "title": "Avoiding intermittent test failures", "url": "/en-US/docs/Mozilla/QA/Avoiding_intermittent_oranges", "tags": ["Automated testing", "Mozilla", "QA:Tools", "QA", "Guide"], "translations": [], "modified": "2014-06-26T00:54:01", "label": "Avoiding intermittent test failures", "localization_tags": [], "locale": "en-US", "id": 8541, "last_edit": "2014-06-26T00:53:59", "summary": "Intermittent oranges are test failures which happen intermittently, in a seemingly random way.\u00a0 Many of such failures could be avoided by good test writing principles.\u00a0 This page tries to explain some of those principles for use by people who contribute tests, and also those who review them for inclusion into mozilla-central.", "sections": [{"id": "Accessing_DOM_elements_too_soon", "title": "Accessing DOM\u00a0elements too soon"}, {"id": "Using_script_functions_before_they're_defined", "title": "Using script functions before they're defined"}, {"id": "Relying_on_the_order_of_asynchronous_operations", "title": "Relying on the order of asynchronous operations"}, {"id": "Using_magical_timeouts_to_cause_delays", "title": "Using magical timeouts to cause delays"}, {"id": "Using_objects_without_accounting_for_the_possibility_of_their_death", "title": "Using objects without accounting for the possibility of their death"}, {"id": "Tests_which_require_focus", "title": "Tests which require focus"}, {"id": "Tests_which_take_too_long", "title": "Tests which take too long"}, {"id": "Tests_that_do_not_clean_up_properly", "title": "Tests that do not clean up properly"}, {"id": "Not_waiting_on_the_specific_event_that_you_need", "title": "Not waiting on the specific event that you need"}, {"id": "Tests_that_rely_on_external_sites", "title": "Tests that rely on external sites"}, {"id": "Tests_that_rely_on_Math.random()_to_create_unique_values", "title": "Tests that rely on Math.random()\u00a0to create unique values"}, {"id": "Tests_that_depend_on_the_current_time", "title": "Tests that depend on the current time"}, {"id": "Tests_that_depend_on_time_differences_or_comparison", "title": "Tests that depend on time differences or comparison"}, {"id": "Tests_that_destroy_the_original_tab", "title": "Tests that destroy the original tab"}], "slug": "Mozilla/QA/Avoiding_intermittent_oranges", "review_tags": []}