#25471: Random test failures with parallel selenium tests
-----------------------------------+--------------------
     Reporter:  MoritzS            |      Owner:  nobody
         Type:  Bug                |     Status:  new
    Component:  Testing framework  |    Version:  master
     Severity:  Normal             |   Keywords:
 Triage Stage:  Unreviewed         |  Has patch:  0
Easy pickings:  0                  |      UI/UX:  0
-----------------------------------+--------------------
 When running selenium tests in parallel I often get test failures that
 seem to be some kind of race condition. However with `--parallel 1` these
 errors don't occur and sometimes even when running in parallel all tests
 pass.

 I usually run the tests with `xvfb-runner`, however I also tested it
 without xvfb and the errors still occur.

 {{{
 $ chromium --version
 Chromium 45.0.2454.101
 $ chromedriver --version
 ChromeDriver 2.16
 $ firefox --version
 Mozilla Firefox 41.0
 }}}

 Here are some of the results of running the test suite multiple times with
 `./runtests --selenium` (running on 8 cores):


 {{{
 ======================================================================
 ERROR: test_ForeignKey
 (admin_widgets.tests.AdminRawIdWidgetSeleniumFirefoxTests)
 ----------------------------------------------------------------------
 selenium.common.exceptions.NoSuchElementException: Message: Unable to
 locate element: {"method":"link text","selector":"Bogey Blues"}
 Stacktrace:
     at FirefoxDriver.prototype.findElementInternal_
 
(file:///tmp/django_m_oympys/tmpqtuo3nbn/extensions/fxdri...@googlecode.com/components
 /driver-component.js:10647)
     at FirefoxDriver.prototype.findElement
 
(file:///tmp/django_m_oympys/tmpqtuo3nbn/extensions/fxdri...@googlecode.com/components
 /driver-component.js:10656)
     at DelayedCommand.prototype.executeInternal_/h
 
(file:///tmp/django_m_oympys/tmpqtuo3nbn/extensions/fxdri...@googlecode.com/components
 /command-processor.js:12617)
     at DelayedCommand.prototype.executeInternal_
 
(file:///tmp/django_m_oympys/tmpqtuo3nbn/extensions/fxdri...@googlecode.com/components
 /command-processor.js:12622)
     at DelayedCommand.prototype.execute/<
 
(file:///tmp/django_m_oympys/tmpqtuo3nbn/extensions/fxdri...@googlecode.com/components
 /command-processor.js:12564)

 ======================================================================
 ERROR: test_many_to_many
 (admin_widgets.tests.AdminRawIdWidgetSeleniumFirefoxTests)
 ----------------------------------------------------------------------
 selenium.common.exceptions.TimeoutException: Message:


 ======================================================================
 ERROR: test_prepopulated_fields
 (admin_views.tests.SeleniumAdminViewsChromeTests)
 ----------------------------------------------------------------------
 selenium.common.exceptions.NoSuchElementException: Message: no such
 element
   (Session info: chrome=45.0.2454.101)
   (Driver info: chromedriver=2.16,platform=Linux 4.1.6-1-ARCH x86_64)


 ======================================================================
 FAIL: test_multiple_locales
 (i18n.test_compilation.MultipleLocaleCompilationTests)
 ----------------------------------------------------------------------
 AssertionError: False is not true

 ----------------------------------------------------------------------
 Ran 10308 tests in 61.830s
 }}}
 {{{
 ======================================================================
 ERROR: test_calendar_nonday_class
 (admin_widgets.tests.DateTimePickerSeleniumChromeTests)
 ----------------------------------------------------------------------
 selenium.common.exceptions.NoSuchElementException: Message: no such
 element
   (Session info: chrome=45.0.2454.101)
   (Driver info: chromedriver=2.16,platform=Linux 4.1.6-1-ARCH x86_64)


 ======================================================================
 FAIL: test_add_inlines (admin_inlines.tests.SeleniumChromeTests)
 ----------------------------------------------------------------------
 AssertionError: 0 != 1

 ----------------------------------------------------------------------
 Ran 10308 tests in 62.124s
 }}}
 {{{
 ======================================================================
 ERROR: test_filter
 (admin_widgets.tests.HorizontalVerticalFilterSeleniumChromeTests)
 ----------------------------------------------------------------------
 selenium.common.exceptions.StaleElementReferenceException: Message: stale
 element reference: element is not attached to the page document
   (Session info: chrome=45.0.2454.101)
   (Driver info: chromedriver=2.16,platform=Linux 4.1.6-1-ARCH x86_64)


 ----------------------------------------------------------------------
 Ran 10308 tests in 65.913s
 }}}

--
Ticket URL: <https://code.djangoproject.com/ticket/25471>
Django <https://code.djangoproject.com/>
The Web framework for perfectionists with deadlines.

-- 
You received this message because you are subscribed to the Google Groups 
"Django updates" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to django-updates+unsubscr...@googlegroups.com.
To post to this group, send email to django-updates@googlegroups.com.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/django-updates/050.6fcfe110311e6226ab3f21cc9e0610e1%40djangoproject.com.
For more options, visit https://groups.google.com/d/optout.

Reply via email to