Report Template for Code Health/Code Coverage not populated
![]()
I'd like to create a report which shows the number of JUnit test failures for a given component. There are OOTB Report Templates for this. The problem is that the Parameter values for Team Area, Build Definition, and Component are not showing up in the Report Template editor for Code Coverage or Code Health. These values populate correctly for Build Health reports. What might the problem be?
Thanks! |
3 answers
![]()
pravesh wrote:
I'd like to create a report which shows the number of JUnit test The difference seems to be that in the Code Health report, the parameters you mention are bound to the CMP_RESULTS table, and in the Build Health report they are bound to the BUILD_RESULTS table. That means in the case that you had build results, but these build results did not have a contribution for compilation results, they wouldn't show up in the parameter values. So first question: do you in fact have compilation contributions? (Note these are different than the JUnit contributions). If not, then you should be able to modify the Code Health report quite easily to do what you want. I'd do the following: 1. Delete the compiler warnings and static analysis sections (graphs and associated text) from the Code Health rptdesign, leaving just the JUnit test failures stuff. 2. You should then be able to delete the two unneeded data sets, just to tidy things up (Compilation Results and Analysis). 3. Go to the properties of the data source(s) and make sure the repository is set properly on the first page (this is a design-time-only setting but is needed for you to do the following steps). 4. In the Build Component Results Parameter Data Set, change the table name from CMP_RESULTS to BUILD_RESULTS, and make it look like the one in the Build Health report. (It would also work if you chose JUNT_RSULTS). Hope this helps. james |
![]()
James,
I was able to create a new report using the BUILD_RESULTS table and that seem to work, kind of... In my build script, I do 3 separate calls to <junitLogPublisher>, 1 for each of 3 different test buckets using a unique "componentname" for each bucket. This shows the JUnit results separated by test bucket on the JUnit tab and aggregates the results on the Summary page of the Build Report. That's exactly what I want to show on the Build Report. The question is, how do I query the BUILD_RESULTS table to get "per test bucket" results? Right now, all I can get in the report are the aggregate results. I'd like to be able to see a chart for each of my test buckets. Thanks! |
![]()
pravesh wrote:
James, Hi Pravesh, Sorry for the delay in responding. Are the unique component names for each bucket hardcoded? james |