From 33d01232de21536492530a6656ac88d173e8fbe9 Mon Sep 17 00:00:00 2001 From: Muhammad Ammar Date: Thu, 22 May 2014 14:51:57 +0000 Subject: [PATCH] Flaky is a plugin for nose that automatically reruns flaky tests. --- common/test/acceptance/tests/test_video_module.py | 2 ++ rakelib/bok_choy.rake | 2 +- requirements/edx/base.txt | 1 + 3 files changed, 4 insertions(+), 1 deletion(-) diff --git a/common/test/acceptance/tests/test_video_module.py b/common/test/acceptance/tests/test_video_module.py index 523010a676..b1352c0f9b 100644 --- a/common/test/acceptance/tests/test_video_module.py +++ b/common/test/acceptance/tests/test_video_module.py @@ -13,6 +13,7 @@ from ..pages.lms.course_nav import CourseNavPage from ..pages.lms.auto_auth import AutoAuthPage from ..pages.lms.course_info import CourseInfoPage from ..fixtures.course import CourseFixture, XBlockFixtureDesc +from box.test.flaky import flaky VIDEO_SOURCE_PORT = 8777 YOUTUBE_STUB_PORT = 9080 @@ -36,6 +37,7 @@ class YouTubeConfigError(Exception): pass +@flaky class VideoBaseTest(UniqueCourseTest): """ Base class for tests of the Video Player diff --git a/rakelib/bok_choy.rake b/rakelib/bok_choy.rake index e656400fb0..5ca1e61dbe 100644 --- a/rakelib/bok_choy.rake +++ b/rakelib/bok_choy.rake @@ -147,7 +147,7 @@ def run_bok_choy(test_spec) # Construct the nosetests command, specifying where to save screenshots and XUnit XML reports cmd = [ "SCREENSHOT_DIR='#{BOK_CHOY_LOG_DIR}'", "nosetests", test_spec, - "--with-xunit", "--xunit-file=#{BOK_CHOY_XUNIT_REPORT}", "--verbosity=2" + "--with-xunit", "--with-flaky", "--xunit-file=#{BOK_CHOY_XUNIT_REPORT}", "--verbosity=2" ] # Configure parallel test execution, if specified diff --git a/requirements/edx/base.txt b/requirements/edx/base.txt index a47632c5d8..84f08a1782 100644 --- a/requirements/edx/base.txt +++ b/requirements/edx/base.txt @@ -124,6 +124,7 @@ rednose==0.3 selenium==2.39.0 splinter==0.5.4 testtools==0.9.34 +flaky==0.2.0 git+https://github.com/mfogel/django-settings-context-processor.git