Univention Bugzilla – Bug 49188
Show host name in Jenkins result
Last modified: 2021-09-17 10:55:03 CEST
It would be helpful if the host name is displayed in the Jenkins during failed tests. This is especially relevant when the results are collected from multiple systems.
Done in UCS 4.4: * Bug #49188: Change name of the testcase to <testcase>.$hostname instead of <testcase>.test https://git.knut.univention.de/univention/ucs/commit/bce3eb661eb8fa36d2747708ac729b8d9c6b8da5
As neither this bug nor the commit contains any information about the "why", here is our combined research result from our software archaeology: - we run `ucs-test` for several scenarios - all of the `Autotest*` scenarios setup a Primary and most of them an additional second system like a Backup / Replica / Member. - `ucs-test` is executed on those secondary systems only - respectively the Primary if that is the only system for that scenario. - for those scenarios the systems are all named differently, so the different hostname is appended to the test name, which results in the *same test* being named *differently* for each of those 8+ scenarios. - This now complicates correlating them together as Jenkins reports them as different tests, which for example completely breaks the "failed test history": Failed Tests History: (O=Okay S=Skipped F=Failed -=Setup not run) 01_base.104_check-archive-keyring.backup072 build 255 254 253 252 251 250 249 248 247 246 245 SambaVersion=no-samba,Systemrolle=backup F F F F F F SambaVersion=no-samba,Systemrolle=master - - - - - - SambaVersion=no-samba,Systemrolle=master-part-II - - - - - - SambaVersion=no-samba,Systemrolle=member - - - - - - SambaVersion=no-samba,Systemrolle=slave - - - - - - SambaVersion=s4,Systemrolle=backup - - - - - - SambaVersion=s4,Systemrolle=master - - - - - - SambaVersion=s4,Systemrolle=master-part-II - - - - - - SambaVersion=s4,Systemrolle=member - - - - - - SambaVersion=s4,Systemrolle=slave - - - - - - 01_base.104_check-archive-keyring.backup073 build 255 254 253 252 251 250 249 248 247 246 245 SambaVersion=no-samba,Systemrolle=backup - - - - - - SambaVersion=no-samba,Systemrolle=master - - - - - - SambaVersion=no-samba,Systemrolle=master-part-II - - - - - - SambaVersion=no-samba,Systemrolle=member - - - - - - SambaVersion=no-samba,Systemrolle=slave - - - - - - SambaVersion=s4,Systemrolle=backup F F F F F F SambaVersion=s4,Systemrolle=master - - - - - - SambaVersion=s4,Systemrolle=master-part-II - - - - - - SambaVersion=s4,Systemrolle=member - - - - - - SambaVersion=s4,Systemrolle=slave - - - - - - 01_base.104_check-archive-keyring.master070 build 255 254 253 252 251 250 249 248 247 246 245 SambaVersion=no-samba,Systemrolle=backup - - - - - - SambaVersion=no-samba,Systemrolle=master F F F F F F SambaVersion=no-samba,Systemrolle=master-part-II - - - - - - SambaVersion=no-samba,Systemrolle=member - - - - - - SambaVersion=no-samba,Systemrolle=slave - - - - - - SambaVersion=s4,Systemrolle=backup - - - - - - SambaVersion=s4,Systemrolle=master - - - - - - SambaVersion=s4,Systemrolle=master-part-II - - - - - - SambaVersion=s4,Systemrolle=member - - - - - - SambaVersion=s4,Systemrolle=slave - - - - - - 01_base.104_check-archive-keyring.master071 build 255 254 253 252 251 250 249 248 247 246 245 SambaVersion=no-samba,Systemrolle=backup - - - - - - SambaVersion=no-samba,Systemrolle=master - - - - - - SambaVersion=no-samba,Systemrolle=master-part-II - - - - - - SambaVersion=no-samba,Systemrolle=member - - - - - - SambaVersion=no-samba,Systemrolle=slave - - - - - - SambaVersion=s4,Systemrolle=backup - - - - - - SambaVersion=s4,Systemrolle=master F F F F F F SambaVersion=s4,Systemrolle=master-part-II - - - - - - SambaVersion=s4,Systemrolle=member - - - - - - SambaVersion=s4,Systemrolle=slave - - - - - - 01_base.104_check-archive-keyring.member076 build 255 254 253 252 251 250 249 248 247 246 245 SambaVersion=no-samba,Systemrolle=backup - - - - - - SambaVersion=no-samba,Systemrolle=master - - - - - - SambaVersion=no-samba,Systemrolle=master-part-II - - - - - - SambaVersion=no-samba,Systemrolle=member F F F F F F SambaVersion=no-samba,Systemrolle=slave - - - - - - SambaVersion=s4,Systemrolle=backup - - - - - - SambaVersion=s4,Systemrolle=master - - - - - - SambaVersion=s4,Systemrolle=master-part-II - - - - - - SambaVersion=s4,Systemrolle=member - - - - - - SambaVersion=s4,Systemrolle=slave - - - - - - 01_base.104_check-archive-keyring.member077 build 255 254 253 252 251 250 249 248 247 246 245 SambaVersion=no-samba,Systemrolle=backup - - - - - - SambaVersion=no-samba,Systemrolle=master - - - - - - SambaVersion=no-samba,Systemrolle=master-part-II - - - - - - SambaVersion=no-samba,Systemrolle=member - - - - - - SambaVersion=no-samba,Systemrolle=slave - - - - - - SambaVersion=s4,Systemrolle=backup - - - - - - SambaVersion=s4,Systemrolle=master - - - - - - SambaVersion=s4,Systemrolle=master-part-II - - - - - - SambaVersion=s4,Systemrolle=member F F F F F F SambaVersion=s4,Systemrolle=slave - - - - - - 01_base.104_check-archive-keyring.slave074 build 255 254 253 252 251 250 249 248 247 246 245 SambaVersion=no-samba,Systemrolle=backup - - - - - - SambaVersion=no-samba,Systemrolle=master - - - - - - SambaVersion=no-samba,Systemrolle=master-part-II - - - - - - SambaVersion=no-samba,Systemrolle=member - - - - - - SambaVersion=no-samba,Systemrolle=slave F F F F F F SambaVersion=s4,Systemrolle=backup - - - - - - SambaVersion=s4,Systemrolle=master - - - - - - SambaVersion=s4,Systemrolle=master-part-II - - - - - - SambaVersion=s4,Systemrolle=member - - - - - - SambaVersion=s4,Systemrolle=slave - - - - - - 01_base.104_check-archive-keyring.slave075 build 255 254 253 252 251 250 249 248 247 246 245 SambaVersion=no-samba,Systemrolle=backup - - - - - - SambaVersion=no-samba,Systemrolle=master - - - - - - SambaVersion=no-samba,Systemrolle=master-part-II - - - - - - SambaVersion=no-samba,Systemrolle=member - - - - - - SambaVersion=no-samba,Systemrolle=slave - - - - - - SambaVersion=s4,Systemrolle=backup - - - - - - SambaVersion=s4,Systemrolle=master - - - - - - SambaVersion=s4,Systemrolle=master-part-II - - - - - - SambaVersion=s4,Systemrolle=member - - - - - - SambaVersion=s4,Systemrolle=slave F F F F F F - but we also have the "installation tests", which also consists of multiple systems. There `ucs-test` is executed on **all** systems and the result is collected and **combined**. As the **same** tests are executed on **multiple** systems, they should be distinguishable. For that this Bug changed `test` to the hostname. - Since Bug #40709 `pytest` can also be used, which writes the result to its own XML file, which does *not* contain the hostname in the test name. So by now this is already inconsistent. `pytest` supports "--junit-prefix=str" for "prepend prefix to classnames in junit-xml output" and "junit_suite_name", which might be used to get a similar functionally from there. All in all we now have a great inconsistent mass, which needs to be cleaned up.