Univention Bugzilla – Bug 46035
86_selenium/130_miscellaneous fails in UCS 4.3
Last modified: 2018-03-14 14:38:53 CET
[2018-01-15 01:17:05.799485] INFO:univention.testing.selenium.base:Successful login [2018-01-15 01:17:06.382517] INFO:univention.testing.selenium.interactions:Clicking the text 'Switch language' [2018-01-15 01:18:06.477495] ERROR:univention.testing.selenium.base:Exception: <class 'selenium.common.exceptions.TimeoutException'> Message: [2018-01-15 01:18:08.478205] INFO:univention.testing.selenium.base:Saving screenshot '/usr/share/ucs-test/86_selenium/selenium/error_en_20180115011808.png' [2018-01-15 01:18:08.987841] INFO:univention.testing.selenium.base:Saving browser log '/usr/share/ucs-test/86_selenium/selenium/error_en_browserlog_20180115011808.txt' [2018-01-15 01:18:09.060727] Cleanup after exception: <class 'selenium.common.exceptions.TimeoutException'> Message: [2018-01-15 01:18:09.060974] [2018-01-15 01:18:09.060992] Performing UCSTestUDM cleanup... [2018-01-15 01:18:09.061003] UCSTestUDM cleanup done [2018-01-15 01:18:09.061012] Traceback (most recent call last): [2018-01-15 01:18:09.061024] File "130_miscellaneous", line 184, in <module> [2018-01-15 01:18:09.061035] umc_tester.test_umc() [2018-01-15 01:18:09.061047] File "130_miscellaneous", line 31, in test_umc [2018-01-15 01:18:09.061056] self.test_language_switch() [2018-01-15 01:18:09.061066] File "130_miscellaneous", line 39, in test_language_switch [2018-01-15 01:18:09.061076] self.switch_language(self.selenium.language) [2018-01-15 01:18:09.061089] File "130_miscellaneous", line 160, in switch_language [2018-01-15 01:18:09.061100] self.selenium.click_text(_('Switch language')) [2018-01-15 01:18:09.061111] File "/usr/lib/pymodules/python2.7/univention/testing/selenium/interactions.py", line 50, in click_text [2018-01-15 01:18:09.062085] self.click_element('//*[contains(text(), "%s")]' % (text,), **kwargs) [2018-01-15 01:18:09.062197] File "/usr/lib/pymodules/python2.7/univention/testing/selenium/interactions.py", line 138, in click_element [2018-01-15 01:18:09.062214] self.get_all_enabled_elements [2018-01-15 01:18:09.062225] File "/usr/local/lib/python2.7/dist-packages/selenium/webdriver/support/wait.py", line 80, in until [2018-01-15 01:18:09.081462] raise TimeoutException(message, screen, stacktrace) [2018-01-15 01:18:09.081493] selenium.common.exceptions.TimeoutException: Message: http://jenkins.knut.univention.de:8080/job/UCS-4.3/job/UCS-4.3-0/job/AutotestJoin/lastCompletedBuild/SambaVersion=s4,Systemrolle=master/testReport/86_selenium/130_miscellaneous/test/ http://jenkins.knut.univention.de:8080/job/UCS-4.3/job/UCS-4.3-0/job/AutotestJoin/ws/SambaVersion/s4/Systemrolle/master/test/selenium/
@Richard: Could you have a look?
The problem is, that the translation does not work. This is because the test files do not end on .py *and* recently got a non-python shebang. Under these circumstances univention-l10n-build cannot detect that these are python files and won't correctly work with them.
Created attachment 9383 [details] Treat files with the selenium-test-shebang as python files when translating
I've attached a patch, that will make univention-l10n-build translate the selenium test files. An alternative fix would be to rename all selenium-test files, so that they end on '.py'. univention-l10n-build could then recognize the test files without any changes to it. I'd prefer the latter fix, because the attached fix is more of a workaround, which adds bloat to our code. I am unsure if this would be OK, since no other UCS test ends on '.py'. Could a more experienced developer please help with that decision?
I have applied the fix in the patch, since renaming the test-files resulted in errors when building. Commit c2d38a5920dc6d95266c95a4b121a309e92dcc25 Package: univention-ucs-translation-template Version: 5.0.0-3A~4.3.0.201802091551
Code: OK - if other file types without the proper extensions occur it might be advisable to use python-magic as the fallback. It is designed to amongst other things detect the filetype by specific statements inside the source file. Test ran successfully in the last iteration: http://jenkins.knut.univention.de:8080/job/UCS-4.3/job/UCS-4.3-0/job/AutotestJoin/69/
UCS 4.3 has been released: https://docs.software-univention.de/release-notes-4.3-0-en.html https://docs.software-univention.de/release-notes-4.3-0-de.html If this error occurs again, please use "Clone This Bug".