Jiri Holusa
unread,Sep 8, 2016, 5:19:45 AM9/8/16Sign in to reply to author
Sign in to forward
You do not have permission to delete messages in this group
Either email addresses are anonymous for this group or you need the view member email addresses permission to view the original message
to jenkin...@googlegroups.com
Hi everyone,
during development of my plugin I came across the need to override view of another plugin. Let me be more specific.
I'm developing an extension of JUnit plugin (extends TestDataPublisher), which displays the test results in different way. To be even more specific - it automatically searches issue tracker, allows to associate (and remember this association) the test name failure with issues, then depending whether the test failure has some issues linked, it shows the failing tests in two tables - with some issues found (aka known failures) and without any links (unknown new failures). Since I want to redo the view into to tables, I cannot use the "normal" summary.jelly, badge.jelly etc. way of extending the UI, since it only allows to "insert" some new information, not remove some existing structure.
When starting the development, a thought came to my mind - maybe if I place the jelly file into the corresponding directory like src/main/resources/hudson/tasks/test/MetaTabulatedResults, Jenkins will smartly pick up the file from my plugin and overrides the default JUnit jelly file. I tried it and voila, it works! Fantastic!
However, when I tried to deploy it to our existing Jenkins instance, it doesn't work, it's not just picking the "correct (my)" view. The plugin's backend however works correctly, hence the files are there correctly. It works completely fine during development, when I run it (as stated in Plugin development tutorial) with mvn hpi:run. However, when I download Jenkins WAR file, deploy my plugin there, it sometimes worked, sometimes didn't. I found some relation with having "Flaky test results reporter plugin" or "Test stability plugin" installed. When I have them installed, it doesn't work. When I do, it *sometimes* work, I haven't found any reasonable pattern so far.
Uh, very long description, so here's some question - am I doing it (overriding the view) in a correct way? Or is it just pure luck that it work? And the most important questioni - how to do it right?
Thank you very much for any response,
Jiri