views:

50

answers:

2

So, I'm setting up Hudson right now and couldn't be more pleased. However, 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?

A: 

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.

gareth_bowles
I'm trying to replace the graph with a simple table. I know I'm going to have to modify the Hudson source, I'm just not sure where I'd have to modify it.
dave
+1  A: 

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.

Haju