<< View previous version | view page history | view next version >>
For those reports supported by QuickBuild, you can retrieve the report data via RESTful APIs. The supported reports included:
Report Category | Base URI |
---|---|
CheckStyle | /rest/checkstyle |
Cobertura | /rest/cobertura |
CPD | /rest/cpd |
EMMA | /rest/emma |
FindBugs | /rest/findbugs |
Fxcop | /rest/fxcop |
JUnit | /rest/junit |
MBUnit | /rest/mbunit |
MSTest | /rest/mstest |
NCover | /rest/ncover |
NUnit | /rest/nunit |
PMD | /rest/pmd |
TestNG | /rest/testng |
NOTE
All report related RESTful APIs use http GET method.
List all supported APIs
URI | Params | Response Format |
---|---|---|
$baseURI/help | application/html |
for example, all available RESTful functions for JUnit can be accessed by visiting the following URL:
http://quickbuild:8810/rest/junit/help
Get the version of category
URI | Params | Response Format |
---|---|---|
$baseURI/version | plain/text |
For example, you can get the current data version of the JUnit category.
http://quickbuild:8810/rest/junit/version
and it will return the data version 2.1(example only) in plain/text format.
List reports stored in the category
URI | Params | Response Format |
---|---|---|
$baseURI/reports | application_xml |
For example, visit below URL to list all reports in JUnit category:
http://quickbuild:8810/rest/junit/reports
and the response looks like:
<list> <string>unprocessed</string> <string>tests</string> <string>testsuites</string> <string>packages</string> <string>stats</string> <string>agg_overview</string> <string>agg_stats</string> <string>tests_trends</string> </list>
Get the report definition (meta data)
URI | Params | Response Format |
---|---|---|
$baseURI/meta/{report_name} |
|
application/xml |
for example, when visit:
http://quickbuild:8810/rest/junit/meta/stats
the response looks like:
<meta name="stats" group="STATISTICS"> <column name="ID" isKey="false" indexed="false" nullable="false" updatable="false" sqlType="BIGINT" dataType="ID"/> <column name="buildId" isKey="true" indexed="false" nullable="true" updatable="true" sqlType="BIGINT" dataType="ID"/> <column name="duration" isKey="false" indexed="false" nullable="true" updatable="true" sqlType="BIGINT" dataType="DURATION"/> <column name="tests" isKey="false" indexed="false" nullable="true" updatable="true" sqlType="INT" dataType="INTEGER"/> ... ... </meta>
You may consider the report meta data as the schema of a table in database.
Each report has an attribute group and in QuickBuild, the following groups are used:
- BUILD
- STATISTICS
- HISTORY
- AGGREGATION
the group attribute tells QuickBuild where to find the report, for example, if a report belongs to BUILD group, then this report is stored in build related directory, otherwise, the report is stored in configuration related directory.
List all report sets / aggregations
In QuickBuild, the report data are stored by report sets or by aggregations. The report set is specified in the publish step, and the aggregation name is specified in the aggregation definition.
URI | Params | Response Format |
---|---|---|
/rest/junit/reportsets/{report_group}/{configuration_or_build_id} |
|
application/xml |
for example, when visit below URL:
http://quickbuild:8810/rest/junit/reportsets/BUILD/103
the response looks like:
<list> <string>DEFAULT</string> <string>On Linux</string> <string>On Windows</string> </list>
Get the build stats
URI | Params | Response Format |
---|---|---|
/rest/junit/buildstats/{build_id}/{reportset} |
|
application/xml |