Your browser was unable to load all of the resources. They may have been blocked by your firewall, proxy or browser configuration.
Press Ctrl+F5 or Ctrl+Shift+R to have your browser try again.

Report Aggregation on mail #2165

prabi ·
hi robin,

we are getting a report aggregation in the dashboard, i would to get the same report through email, how can i achieve it.

Recent PMD Inspections
Violated Files
296 High
42 2.74% Medium
63 4.11% Normal
1,426 93.14% Low
0 0.00%

Build In Configuration
Age
Violations
Summary
1.0.6
HPSIM/Organize by Projects/ProjectC
about 2 days ago 4194310



1.0.2
HPSIM/Organize by Projects/ProjectB
about 2 days ago 27245800

1.0.5
HPSIM/Organize by Projects/ProjectA
about 2 days ago 11204150
  • replies 19
  • views 4608
  • stars 0
robinshen ADMIN ·
For now this is not doable unfortunately. Please file improvement request at track.pmease.com.
prabi ·
hi robin,

thanks for your prompt reply, one quick thing,

we know that the aggregation feature is retrieving the results of the last executed/available pmd reports of the projects(a|b|c). could you tell me where and how its retrieving the data?

it would be helpful for our further analysis.
robinshen ADMIN ·
When a build finishes, it will send PMD data held in memory for this build to parent configurations for aggregation, and parent configurations will do the aggregation based on aggregation rule.
prabi ·
good, could you pls let us know the file names to look at, which would really be helpful..
steveluo ADMIN ·
Hi,

Please don't access the report file directly as it may cause READ ONLY exception when running a build. It would be better to access the report data via REST API.

In your case, you can retrieve the report data via REST API by visiting:

http://your-server:8810/rest/pmd/records/agg_overview/{configuration-id}/{aggregation name}

For all available functions, you can visit:

http://your-server:8810/rest/pmd/help

or refer to below page for details:

http://wiki.pmease.com/display/QB50/Int ... th+Reports
steveluo ADMIN ·
You may also want to know the aggregated stats for a specified day, then you can visit below url:

http://your-server:8810/rest/pmd/records/agg_stats/{configuration-id}/{aggregation name}?filters={your-filters}

the filters can any sql-like filter, for example:
day>'2012-05-06', day='2013-01-17', etc.

here, day is a field defined in agg_stats, you can visit below url for the definition of a specified report:

// all report names available
http://your-server:8810/rest/pmd/reports

// the definition for a specified report
http://your-server:8810/rest/pmd/meta/{report-name}
prabi ·
excellent steve and robin,

i would try these steps and get back to you.
prabi ·
hi steve & robin,

as per your suggestions, we are able to view the xml based file for the particular configuration

my ques is

is it possible to store that xml file physically in a drive?

can we parse the values in that xml file and create a html file and show/send in the email.
robinshen ADMIN ·
This can be hard, the idea is:
Publish these xml files as ordinary artifacts, then write a custom plugin to implement the "BuildListener" extension point to analyze these xml files to generate in-memory object and put into buid.reports as a map entry, and finally modify the email notification template to read that entry to render desired custom reports.
prabi ·
Could you please answer few queries that I have.

1.I wish to access the REST API's published by quickbuild to build my customized reports.
2.Which language should I use to access the REST API's ? PHP ,ASP or some other language.
3.Basically I wish to Access the REST API and convert into HTML page using the returned data.
4.It would be really helpful,if you can post a sample script code to access REST API and kindly tel me which directory should I place the script in quickbuild installed directory.

Thanks a lot for the help.
robinshen ADMIN ·
The RESTful API is neutral to programming language, and you may access from any language with http library. The tutorial in wiki below explains how to access RESTful API through curl utilty:
http://wiki.pmease.com/display/QB50/RESTful+API

And also QB installation package contains below folder on how to access the RESTful API via Java:
dev\restapi\samples\java\samples

For other language, we are not very familar, but the theory should be the same.

The script can be put into any directory you like as it will be a standalone process than QB.
prabi ·
as per the previous suggestion, if we provide the below query what type of data will be retrieved from the system,

could you pls send us the sample data after executing the below query for our further process.

i.e what will be the data output from the system, if we pass {configuration-id}/{aggregation name}?

http://your-server:8810/rest/pmd/records/agg_stats/{configuration-id}/{aggregation name}?filters={your-filters}
steveluo ADMIN ·
Most of the report related REST API returns an XML format data.
You may do a 'GET' request to below URL (can use curl command or just input the url directly in your browser)

http://demo.pmease.com/rest/pmd/records/agg_stats/1/PMD%20DEFAULT?filters=day>'2012-06-08'


and the sample data looks like:


<report name="agg_stats" version="2.1" locale="en_US">
<row ID="51" day="2012-06-15T00:00:00.000Z" packages="33" files="63" violations="163" highs="0" mediums="13" normals="121" lows="29" added="87" fixed="84" notFixed="76"/>
<row ID="52" day="2012-06-18T00:00:00.000Z" packages="33" files="63" violations="163" highs="0" mediums="13" normals="121" lows="29" added="87" fixed="84" notFixed="76"/>
<row ID="53" day="2012-07-09T00:00:00.000Z" packages="33" files="63" violations="163" highs="0" mediums="13" normals="121" lows="29" added="87" fixed="84" notFixed="76"/>
<row ID="54" day="2012-07-11T00:00:00.000Z" packages="33" files="63" violations="163" highs="0" mediums="13" normals="121" lows="29" added="87" fixed="84" notFixed="76"/>
...
</report>


visit
http://your-quickbuild/rest/pmd/help for all available REST functions and their related params.
prabi ·
i have installed quickbuild 5.0.4, where the aggregation support is available for findbugs report, pmd report and many other reports, but when i installed the latest version 5.0.18, i could not see it, pls let me know the issue.

how can i downgrade the version from 5.0.18 to 5.0.4
prabi ·
i have installed 5.0.10 in system 1 and 5.0.19 in system 2

now i wanted the complete data to be exported from system 1 and import it in system 2, so i can use the latest version going forward

pls help me to know, how it can be done?
robinshen ADMIN ·
You may export data from system1 by taking database backup from menu "administration / database backup", and get it restored to system2 by running "bin/restore".
robinshen ADMIN ·
[quote="prabi"]i have installed quickbuild 5.0.4, where the aggregation support is available for findbugs report, pmd report and many other reports, but when i installed the latest version 5.0.18, i could not see it, pls let me know the issue.

how can i downgrade the version from 5.0.18 to 5.0.4[/quote]
Do you mean aggregation setting for these reports in "aggregations" menu? I checked and it does exist there.
prabi ·
hi robin,

i am using QB for quite sometime 5.0.19 version, i am unable to schedule a build automatically, i have scheduled for every 8 hours(28800 seconds) but not even one time it got scheduled, pls help me on this.
robinshen ADMIN ·
I guess the build condition is not satisified. You may observe the server log to see if there are below log entries around the scheduled time:
Build condition not satisfied, new build won't be generated.

Or you may edit build condition of the configuration to set it run always, then check if the build gets fired at expected time.