mozreview: skip all Selenium tests (bug 1348725) r=mcote
authorPiotr Zalewa <pzalewa@mozilla.com>
Mon, 20 Mar 2017 10:52:34 +0100
changeset 10511 385a8dbe089c389633c96dd1c4e01bdb0ad6611c
parent 10510 28c4acf45e65c11dd5a1ea7498115d92da853d87
child 10514 c32247e16499a2487f29d78bf492784dfa6baff4
push id1572
push userbmo:pzalewa@mozilla.com
push dateMon, 20 Mar 2017 09:52:54 +0000
reviewersmcote
bugs1348725
mozreview: skip all Selenium tests (bug 1348725) r=mcote MozReview Selenium are all firing up Firefox and skipping after a while. This is time consuming. Instead all of these tests are skipping before running the TestDriver. Testing all 11 passing tests takes now 2.7s instead of 369.05s MozReview-Commit-ID: CWAPccJgpKk
pylib/mozreview/mozreview/tests/test-autoland-inbound.py
pylib/mozreview/mozreview/tests/test-autoland-try.py
pylib/mozreview/mozreview/tests/test-browser-cache.py
pylib/mozreview/mozreview/tests/test-filediffreviewer-buttons-on-drafts.py
pylib/mozreview/mozreview/tests/test-filediffreviewer-buttons.py
pylib/mozreview/mozreview/tests/test-hostingservice.py
pylib/mozreview/mozreview/tests/test-publish-no-reviewer.py
pylib/mozreview/mozreview/tests/test-reviewer-selection.py
pylib/mozreview/mozreview/tests/test-reviewer-specification.py
pylib/mozreview/mozreview/tests/test-reviewer-status.py
pylib/mozreview/mozreview/tests/test_autocomplete.py
pylib/mozreview/mozreview/tests/test_login.py
--- a/pylib/mozreview/mozreview/tests/test-autoland-inbound.py
+++ b/pylib/mozreview/mozreview/tests/test-autoland-inbound.py
@@ -1,27 +1,29 @@
 # This Source Code Form is subject to the terms of the Mozilla Public
 # License, v. 2.0. If a copy of the MPL was not distributed with this
 # file, You can obtain one at http://mozilla.org/MPL/2.0/.
 from __future__ import absolute_import, unicode_literals
 
 import os
 import time
+import unittest
 
 from rbtools.api.client import RBClient
 from rbtools.api.transport.sync import SyncTransport
 
 import selenium.webdriver.support.expected_conditions as EC
 from selenium.common.exceptions import StaleElementReferenceException
 from selenium.webdriver.common.by import By
 from selenium.webdriver.support.wait import WebDriverWait
 
 from vcttesting.unittest import MozReviewWebDriverTest
 
 
+@unittest.skip('Skipped due to Bug 1348725')
 class AutolandInboundTest(MozReviewWebDriverTest):
     @classmethod
     def setUpClass(cls):
         MozReviewWebDriverTest.setUpClass()
 
         try:
             self = cls('run')
             self.create_users([
--- a/pylib/mozreview/mozreview/tests/test-autoland-try.py
+++ b/pylib/mozreview/mozreview/tests/test-autoland-try.py
@@ -1,26 +1,29 @@
 # This Source Code Form is subject to the terms of the Mozilla Public
 # License, v. 2.0. If a copy of the MPL was not distributed with this
 # file, You can obtain one at http://mozilla.org/MPL/2.0/.
 
 from __future__ import absolute_import, unicode_literals
 
 import time
+import unittest
 
 import selenium.webdriver.support.expected_conditions as EC
 from selenium.common.exceptions import (ElementNotVisibleException,
                                         NoSuchElementException,
                                         StaleElementReferenceException)
 from selenium.webdriver.common.by import By
 from selenium.webdriver.common.keys import Keys
 from selenium.webdriver.support.wait import WebDriverWait
 
 from vcttesting.unittest import MozReviewWebDriverTest
 
+
+@unittest.skip('Skipped due to Bug 1348725')
 class AutolandTryTest(MozReviewWebDriverTest):
     @classmethod
     def setUpClass(cls):
         MozReviewWebDriverTest.setUpClass()
 
         try:
             self = cls('run')
             self.create_users([
--- a/pylib/mozreview/mozreview/tests/test-browser-cache.py
+++ b/pylib/mozreview/mozreview/tests/test-browser-cache.py
@@ -1,24 +1,26 @@
 # This Source Code Form is subject to the terms of the Mozilla Public
 # License, v. 2.0. If a copy of the MPL was not distributed with this
 # file, You can obtain one at http://mozilla.org/MPL/2.0/.
 
 from __future__ import absolute_import, unicode_literals
 
 import time
+import unittest
 
 import selenium.webdriver.support.expected_conditions as EC
 from selenium.webdriver import ActionChains
 from selenium.webdriver.common.by import By
 from selenium.webdriver.support.wait import WebDriverWait
 
 from vcttesting.unittest import MozReviewWebDriverTest
 
 
+@unittest.skip('Skipped due to Bug 1348725')
 class BrowserCacheTest(MozReviewWebDriverTest):
     @classmethod
     def setUpClass(cls):
         MozReviewWebDriverTest.setUpClass()
 
         try:
             self = cls('run')
             self.create_users([
--- a/pylib/mozreview/mozreview/tests/test-filediffreviewer-buttons-on-drafts.py
+++ b/pylib/mozreview/mozreview/tests/test-filediffreviewer-buttons-on-drafts.py
@@ -1,23 +1,26 @@
 # This Source Code Form is subject to the terms of the Mozilla Public
 # License, v. 2.0. If a copy of the MPL was not distributed with this
 # file, You can obtain one at http://mozilla.org/MPL/2.0/.
 
 from __future__ import absolute_import, unicode_literals
 
+import unittest
+
 import selenium.webdriver.support.expected_conditions as EC
 from selenium.common.exceptions import TimeoutException
 from selenium.webdriver import ActionChains
 from selenium.webdriver.common.by import By
 from selenium.webdriver.support.wait import WebDriverWait
 
 from vcttesting.unittest import MozReviewWebDriverTest
 
 
+@unittest.skip('Skipped due to Bug 1348725')
 class FileDiffReviewerDraftTest(MozReviewWebDriverTest):
     @classmethod
     def setUpClass(cls):
         MozReviewWebDriverTest.setUpClass()
 
         try:
             self = cls('run')
             self.create_users([
--- a/pylib/mozreview/mozreview/tests/test-filediffreviewer-buttons.py
+++ b/pylib/mozreview/mozreview/tests/test-filediffreviewer-buttons.py
@@ -1,23 +1,26 @@
 # This Source Code Form is subject to the terms of the Mozilla Public
 # License, v. 2.0. If a copy of the MPL was not distributed with this
 # file, You can obtain one at http://mozilla.org/MPL/2.0/.
 
 from __future__ import absolute_import, unicode_literals
 
+import unittest
+
 import selenium.webdriver.support.expected_conditions as EC
 from selenium.common.exceptions import TimeoutException
 from selenium.webdriver import ActionChains
 from selenium.webdriver.common.by import By
 from selenium.webdriver.support.wait import WebDriverWait
 
 from vcttesting.unittest import MozReviewWebDriverTest
 
 
+@unittest.skip('Skipped due to Bug 1348725')
 class FileDiffReviewerTest(MozReviewWebDriverTest):
     @classmethod
     def setUpClass(cls):
         MozReviewWebDriverTest.setUpClass()
 
         try:
             self = cls('run')
             self.create_users([
--- a/pylib/mozreview/mozreview/tests/test-hostingservice.py
+++ b/pylib/mozreview/mozreview/tests/test-hostingservice.py
@@ -1,23 +1,26 @@
 # This Source Code Form is subject to the terms of the Mozilla Public
 # License, v. 2.0. If a copy of the MPL was not distributed with this
 # file, You can obtain one at http://mozilla.org/MPL/2.0/.
 
 from __future__ import absolute_import, unicode_literals
 
+import unittest
+
 from selenium.common.exceptions import ElementNotVisibleException
 
 from selenium.webdriver.common.keys import Keys
 from selenium.webdriver.support.ui import Select
 from selenium.webdriver.support.wait import WebDriverWait
 
 from vcttesting.unittest import MozReviewWebDriverTest
 
 
+@unittest.skip('Skipped due to Bug 1348725')
 class HostingServiceTest(MozReviewWebDriverTest):
 
     def test_add_hostingservice(self):
         self.create_users([
             ('mjane@example.com', 'password', 'Mary Jane [:mary]'),
         ])
         self.create_ldap(b'mjane@example.com', b'mjane', 2001, b'Mary Jane')
         bb = self.user_bugzilla('mjane@example.com')
--- a/pylib/mozreview/mozreview/tests/test-publish-no-reviewer.py
+++ b/pylib/mozreview/mozreview/tests/test-publish-no-reviewer.py
@@ -1,15 +1,16 @@
 # This Source Code Form is subject to the terms of the Mozilla Public
 # License, v. 2.0. If a copy of the MPL was not distributed with this
 # file, You can obtain one at http://mozilla.org/MPL/2.0/.
 
 from __future__ import absolute_import, unicode_literals
 
 import time
+import unittest
 
 from selenium.webdriver.common.by import (
     By,
 )
 from selenium.webdriver.common.keys import (
     Keys,
 )
 import selenium.webdriver.support.expected_conditions as EC
@@ -17,16 +18,17 @@ from selenium.webdriver.support.wait imp
     WebDriverWait,
 )
 
 from vcttesting.unittest import (
     MozReviewWebDriverTest,
 )
 
 
+@unittest.skip('Skipped due to Bug 1348725')
 class PublishNoReviewerTest(MozReviewWebDriverTest):
     @classmethod
     def setUpClass(cls):
         MozReviewWebDriverTest.setUpClass()
 
         try:
             self = cls('run')
             self.create_users([
--- a/pylib/mozreview/mozreview/tests/test-reviewer-selection.py
+++ b/pylib/mozreview/mozreview/tests/test-reviewer-selection.py
@@ -1,27 +1,27 @@
 # This Source Code Form is subject to the terms of the Mozilla Public
 # License, v. 2.0. If a copy of the MPL was not distributed with this
 # file, You can obtain one at http://mozilla.org/MPL/2.0/.
 
 from __future__ import absolute_import, unicode_literals
 
 import time
+import unittest
 
 import selenium.webdriver.support.expected_conditions as EC
 from selenium.webdriver.common.by import By
 from selenium.webdriver.common.keys import Keys
 from selenium.webdriver.support.wait import WebDriverWait
 
 from vcttesting.unittest import MozReviewWebDriverTest
 
 
+@unittest.skip('Skipped due to Bug 1348725')
 class AutocompleteTest(MozReviewWebDriverTest):
-
-
     def test_reviewer_autocomplete(self):
         self.create_users([
             ('jsmith@example.com', 'password1', 'Jeremy Smith [:jsmith]'),
             ('mjane@example.com', 'password2', 'Mary Jane [:mary]'),
         ])
         self.create_ldap(b'mjane@example.com', b'mjane', 2001, b'Mary Jane')
         mjb = self.user_bugzilla('mjane@example.com')
         mjb.create_bug('TestProduct', 'TestComponent', 'bug1')
--- a/pylib/mozreview/mozreview/tests/test-reviewer-specification.py
+++ b/pylib/mozreview/mozreview/tests/test-reviewer-specification.py
@@ -1,24 +1,26 @@
 # This Source Code Form is subject to the terms of the Mozilla Public
 # License, v. 2.0. If a copy of the MPL was not distributed with this
 # file, You can obtain one at http://mozilla.org/MPL/2.0/.
 
 from __future__ import absolute_import, unicode_literals
 
 import time
+import unittest
 
 import selenium.webdriver.support.expected_conditions as EC
 from selenium.webdriver.common.by import By
 from selenium.webdriver.common.keys import Keys
 from selenium.webdriver.support.wait import WebDriverWait
 
 from vcttesting.unittest import MozReviewWebDriverTest
 
 
+@unittest.skip('Skipped due to Bug 1348725')
 class ReviewerSpecificationTest(MozReviewWebDriverTest):
     def test_reviewer_specification(self):
         # This tests whether or not it's possible to specify a review in the
         # commit summary and have it appear in the UI and be publishable.
         # Some validation occurs in the UI so it is possible to break
         # publishing but have it appear to work in other tests.
         self.create_users([
             ('jsmith@example.com', 'password1', 'Jeremy Smith [:jsmith]'),
--- a/pylib/mozreview/mozreview/tests/test-reviewer-status.py
+++ b/pylib/mozreview/mozreview/tests/test-reviewer-status.py
@@ -1,17 +1,20 @@
 # This Source Code Form is subject to the terms of the Mozilla Public
 # License, v. 2.0. If a copy of the MPL was not distributed with this
 # file, You can obtain one at http://mozilla.org/MPL/2.0/.
 
 from __future__ import absolute_import, unicode_literals
 
+import unittest
+
 from vcttesting.unittest import MozReviewWebDriverTest
 
 
+@unittest.skip('Skipped due to Bug 1348725')
 class ReviewerStatusTest(MozReviewWebDriverTest):
 
     @classmethod
     def setUpClass(cls):
         MozReviewWebDriverTest.setUpClass()
 
         try:
             self = cls('run')
--- a/pylib/mozreview/mozreview/tests/test_autocomplete.py
+++ b/pylib/mozreview/mozreview/tests/test_autocomplete.py
@@ -1,21 +1,23 @@
 # This Source Code Form is subject to the terms of the Mozilla Public
 # License, v. 2.0. If a copy of the MPL was not distributed with this
 # file, You can obtain one at http://mozilla.org/MPL/2.0/.
 
 from __future__ import absolute_import, unicode_literals
 
 import time
+import unittest
 
 from selenium.webdriver.common.keys import Keys
 
 from vcttesting.unittest import MozReviewWebDriverTest
 
 
+@unittest.skip('Skipped due to Bug 1348725')
 class AutocompleteTest(MozReviewWebDriverTest):
     @classmethod
     def setUpClass(cls):
         MozReviewWebDriverTest.setUpClass()
 
         try:
             self = cls('run')
             self.create_users([
--- a/pylib/mozreview/mozreview/tests/test_login.py
+++ b/pylib/mozreview/mozreview/tests/test_login.py
@@ -1,17 +1,20 @@
 # This Source Code Form is subject to the terms of the Mozilla Public
 # License, v. 2.0. If a copy of the MPL was not distributed with this
 # file, You can obtain one at http://mozilla.org/MPL/2.0/.
 
 from __future__ import absolute_import, unicode_literals
 
+import unittest
+
 from vcttesting.unittest import MozReviewWebDriverTest
 
 
+@unittest.skip('Skipped due to Bug 1348725')
 class LoginTest(MozReviewWebDriverTest):
     def assertInvalidLogin(self, verify_error_msg=True):
         self.verify_bzurl('auth.cgi')
         if verify_error_msg:
             el = self.browser.find_element_by_id('error_msg')
             self.assertIn('The username or password you entered is not valid',
                           el.text)