Is there a way to have confluence build a chart that shows the aggregate of junit test reports

mgreco February 11, 2021

Is there a way to have confluence build a chart that shows the aggregate of junit test reports ? I would basically like to send new junit test reports into confluence and have it show the aggregate of the junit test files I've given it in a confluence page.

I'm probably looking for the same thing with Cobertura (code coverage) reports.

Thank you !

1 answer

2 votes
Katerina Kovriga _Stiltsoft_
Rising Star
Rising Star
Rising Stars are recognized for providing high-quality answers to other users. Rising Stars receive a certificate of achievement and are on the path to becoming Community Leaders.
February 12, 2021

Hi @mgreco ,

I'm not sure if this is your case, but if your test reports return in CSV or JSON formats, then the Table Filter and Charts for Confluence app may come in handy.

Check if the app has been already installed for your instance - look for the filtering button near the Edit page button or search for the Table Filter macro in the macro browser.

The algorithm will be as following:

  1. Use the Table from CSV or Table from JSON macros to upload your test report as a table onto your Confluence page (you may output data from a URL or an attached file).
  2. Wrap your macro in the Table Toolbox macro and create a sequence of Table from CSV (JSON) <- Pivot Table <- Chart from Table macros.
  3. As you may guess, the Pivot Table macro will aggregate your data like in Excel and the Chart from Table macro will visualize your information. 

The Table Toolbox macro is required to nest several macros - Cloud Confluence doesn't support this feature. But for Server/DC you'll be able to wrap macros inside each other directly.

mgreco February 16, 2021

I'm trying to figure out how to get all the reports expressed as JSON which that's easy to do for junit (unit testing reports) and a little tricker for cobertura (code coverage reports). The second I figure that out then I can work on the rest of this which I think the 1st part of that is figuring out how to use the confluence api to post these JSON files up for consumption into confluence.

Suggest an answer

Log in or Sign up to answer
DEPLOYMENT TYPE
CLOUD
PRODUCT PLAN
STANDARD Trial
TAGS
AUG Leaders

Atlassian Community Events