How do you change the layout of JUnit Reports in Hudson?
So, I'm setting up Hudson right now and couldn't be more pleased. Howev开发者_如何学Pythoner, I need to display a table in the test results page as opposed to the graph it provides. Does anyone know how I would go about doing this?
I guess you'd want to make a custom plugin out of the existing Junit functionality. You can pretty much copy the java files from:
hudson/main/core/src/main/java/hudson/tasks/junit/
and resource files (jellys) from:
hudson/main/core/src/main/resources/hudson/tasks/junit/
to your new plugin (unless you don't want to fork Hudson source). It seems that the files you'd like to fiddle around would be hudson/main/core/src/main/java/hudson/tasks/junit/History.java (where the graphs are created) and hudson/main/core/src/main/resources/hudson/tasks/junit/History/index.jelly (where the created graphs are shown). From History-class you can pretty easily get a grip on how to fiddle around with TestObjects.
What do you want to display in the table - just the results from the latest build, or the same trend data that the default graph displays ? Either way, I think you'd need to modify the Hudson code to do what you want - see the Hudson Wiki.
精彩评论