Hi Hans, 

There is one extension point for this, the TestDataPublisher. If you are using 
JUnit XML files, that may work.

Alternatively, you can also create an Action that extends 
AbstractTestResultAction. Have a look at jenkins/core package 
hudson.tasks.test, there you will find other classes that may help you. This 
action binds the testReport URL, and generates the graphs for you, you just 
have to prepare the right objects and override some methods.


I used the second option when writing a new version of the tap-plugin, take a 
look on its source code (and let me know if find any bugs ;-). I also used 
parts of TestNG plugin for the file parsing and file sychronization between 
master/slave.

Hope that helps,

 
Bruno P. Kinoshita
http://kinoshita.eti.br
http://tupilabs.com


>________________________________
> From: Hans Olaf Hågenvik <[email protected]>
>To: [email protected] 
>Sent: Monday, 16 July 2012 6:37 AM
>Subject: Re: Plot data on the « ../job/ %job_name% / %build_number% 
>/testReports» - page.
> 
>
>Thanks. I have tried the plot plugin, but I can't get it work. I get some 
>error (
>
>java.lang.NoSuchMethodError: 
>net.sf.json.JSONObject.put(Ljava/lang/String;Ljava/lang/Object;)Ljava/lang/Object;
> at hudson.plugins.plot.SeriesFactory.createSeries(SeriesFactory.java:27) at 
>hudson.plugins.plot.SeriesFactory.createSeriesList(SeriesFactory.java:43)..... 
>) when I try to add a plot. 
>
>But this plugin plots data across builds, what I really want is to plot 
>different data from the specific build.
>
>I know how to do this using JFreeChart, if I just get to know how I make the 
>connection to hudson from my code (Extension points, hudson.model.Action etc. 
>I have tried reading up on this, but cant really get how it works!)
>
>
>On Monday, July 16, 2012 11:21:52 AM UTC+2, Emanuele Zattin wrote:
>Hello Hans,
>>
>>
>>maybe the plotting plugin (https://wiki.jenkins-ci.org/ 
>>display/JENKINS/Plot+Plugin) or the analysis-core-plugin 
>>(https://wiki.jenkins-ci.org/ display/JENKINS/Static+Code+ Analysis+Plug-ins) 
>>can help you.
>>
>>
>>Alternatively you can plot using JavaScript and canvas. There are several 
>>libraries out there there might help you, including YUI3, to which Jenkins 
>>might migrate to at some point (there is already an experimental branch on 
>>github).
>>
>>
>>BR,
>>Emanuele Zattin
>>------------------------------ ---------------------
>>-I don't have to know an answer. I don't feel frightened by not knowing 
>>things; by being lost in a mysterious universe without any purpose — which is 
>>the way it really is, as far as I can tell, possibly. It doesn't frighten 
>>me.- Richard Feynman
>>
>>
>>
>>On Mon, Jul 16, 2012 at 11:16 AM, Hans Olaf Hågenvik <[email protected]> 
>>wrote:
>>
>>Hi 
>>>
>>>I have been asked to develop a hudson-plugin that makes it 
possible to plot data generated in a .xml-file on the « ../job/ 
%job_name% / %build_number% /testReports» - page. 
>>>
>>>I am really new to both hudson and hudson-plugin development, and I wonder 
>>>if there already exists a plugin that can do this? 
>>>
>>>If not, how do I «connect my code» to this page? What I really ask about 
>>>here is where do I define in my code that I want to display my output on 
>>>this specific page?
>>>
>>>I have been making some modifications on the 
measurement-plots-plugin to make it fit our usage, so I am a little 
familiar with how that plugin works; but as mentioned; am I really new 
to all of this. 
>>>
>>>
>>>
>>>
>>
>
>

Reply via email to