Bug 46035 - 86_selenium/130_miscellaneous fails in UCS 4.3
86_selenium/130_miscellaneous fails in UCS 4.3
Status: CLOSED FIXED
Product: UCS Test
Classification: Unclassified
Component: UMC
unspecified
Other Linux
: P5 normal (vote)
: UCS 4.3
Assigned To: Richard Ulmer
Eduard Mai
: interim-2
Depends on: 46168
Blocks:
  Show dependency treegraph
 
Reported: 2018-01-15 12:57 CET by Florian Best
Modified: 2018-03-14 14:38 CET (History)
2 users (show)

See Also:
What kind of report is it?: Development Internal
What type of bug is this?: ---
Who will be affected by this bug?: ---
How will those affected feel about the bug?: ---
User Pain:
Enterprise Customer affected?:
School Customer affected?:
ISV affected?:
Waiting Support:
Flags outvoted (downgraded) after PO Review:
Ticket number:
Bug group (optional):
Max CVSS v3 score:


Attachments
Treat files with the selenium-test-shebang as python files when translating (795 bytes, patch)
2018-02-09 12:13 CET, Richard Ulmer
Details | Diff

Note You need to log in before you can comment on or make changes to this bug.
Description Florian Best univentionstaff 2018-01-15 12:57:08 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/
Comment 1 Florian Best univentionstaff 2018-01-15 12:57:50 CET
@Richard: Could you have a look?
Comment 4 Richard Ulmer univentionstaff 2018-02-09 10:38:50 CET
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.
Comment 5 Richard Ulmer univentionstaff 2018-02-09 12:13:33 CET
Created attachment 9383 [details]
Treat files with the selenium-test-shebang as python files when translating
Comment 6 Richard Ulmer univentionstaff 2018-02-09 12:27:03 CET
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?
Comment 7 Richard Ulmer univentionstaff 2018-02-09 15:55:35 CET
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
Comment 8 Eduard Mai univentionstaff 2018-02-16 12:35:53 CET
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/
Comment 9 Stefan Gohmann univentionstaff 2018-03-14 14:38:53 CET
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".