MicrosoftPremier / VstsExtensions

Documentation and issue tracking for Microsoft Premier Services Visual Studio Team Services Extensions
MIT License
57 stars 14 forks source link

Check Build Quality task cannot get past code coverage data to compare against #9

Closed btparker-work closed 6 years ago

btparker-work commented 6 years ago

Hello, We added the Check Build Quality extension to our on-prem TFS 15.117.26714.0 environment. Somehow the Check build quality task does not seem to see the coverage data from past runs...even though we can go view those past builds and see the coverage results. Our coverage results are captures in the cobertura format with the 'Publish Code Coverage Results' task.

2018-06-18T19:42:31.3056913Z ##[section]Starting: Publish Code Coverage Results 2018-06-18T19:42:31.3206123Z ============================================================================== 2018-06-18T19:42:31.3239917Z Task : Publish Code Coverage Results 2018-06-18T19:42:31.3272008Z Description : Publish Cobertura or JaCoCo code coverage results from a build 2018-06-18T19:42:31.3305763Z Version : 1.117.0 2018-06-18T19:42:31.3337673Z Author : Microsoft Corporation 2018-06-18T19:42:31.3370015Z Help : More Information 2018-06-18T19:42:31.3402741Z ============================================================================== 2018-06-18T19:42:32.8832883Z Reading code coverage summary from '/home/tfsagent/myagent/_work/1/s/coverage/cobertura-coverage.xml' 2018-06-18T19:42:33.0623762Z ##[section]Async Command Start: Publish code coverage 2018-06-18T19:42:33.0645392Z Publishing coverage summary data to TFS server. 2018-06-18T19:42:33.0666077Z Lines- 831 of 1928 covered. 2018-06-18T19:42:33.0687069Z Branches- 68 of 680 covered. 2018-06-18T19:42:33.5711171Z Modifying Cobertura Index file 2018-06-18T19:42:33.5743164Z Publishing code coverage files to TFS server. 2018-06-18T19:42:33.5777622Z Uploading 74 files 2018-06-18T19:42:35.5813585Z File upload succeed. 2018-06-18T19:42:35.6073179Z Published '/home/tfsagent/myagent/_work/1/s/coverage' as artifact 'Code Coverage Report_187200' 2018-06-18T19:42:35.6088423Z ##[section]Async Command End: Publish code coverage 2018-06-18T19:42:35.6126633Z ##[section]Finishing: Publish Code Coverage Results

2018-06-18T19:47:25.0352753Z ##[section]Starting: Check build quality 2018-06-18T19:47:25.0495827Z ============================================================================== 2018-06-18T19:47:25.0523507Z Task : Build Quality Checks 2018-06-18T19:47:25.0553144Z Description : Breaks a build based on quality metrics like number of warnings or code coverage. 2018-06-18T19:47:25.0580663Z Version : 4.0.4 2018-06-18T19:47:25.0607717Z Author : Microsoft Premier Services 2018-06-18T19:47:25.0634938Z Help : [Docs] 2018-06-18T19:47:25.0663436Z ============================================================================== 2018-06-18T19:47:26.3933386Z SystemVssConnection exists true 2018-06-18T19:47:26.7159590Z Validating code coverage policy... 2018-06-18T19:47:27.6969006Z ##[warning]Resource file haven\'t set, can\'t find loc string for key: WaitForCodeCoverageData 2018-06-18T19:47:27.7049951Z WaitForCodeCoverageData 2018-06-18T19:47:29.0113959Z ##[warning]Resource file haven\'t set, can\'t find loc string for key: WaitForCodeCoverageData 2018-06-18T19:47:29.0164179Z WaitForCodeCoverageData 2018-06-18T19:47:31.1056757Z ##[warning]Resource file haven\'t set, can\'t find loc string for key: WaitForCodeCoverageData 2018-06-18T19:47:31.1108650Z WaitForCodeCoverageData 2018-06-18T19:47:33.2021184Z ##[warning]Resource file haven\'t set, can\'t find loc string for key: WaitForCodeCoverageData 2018-06-18T19:47:33.2071296Z WaitForCodeCoverageData 2018-06-18T19:47:35.3105455Z ##[warning]Resource file haven\'t set, can\'t find loc string for key: CoverageDataFound 2018-06-18T19:47:35.3155646Z CoverageDataFound 2018-06-18T19:47:35.3279135Z Total lines: 1928 2018-06-18T19:47:35.3311210Z Covered lines: 831 2018-06-18T19:47:35.3342917Z Code Coverage (%): 43.1 2018-06-18T19:47:35.3699307Z ##[section]Finishing: Check build quality

ReneSchumacher commented 6 years ago

Hi!

I can only see one issue in your log file and that is related to a localization bug. This has been fixed in the latest version (5.0.0). Apart from that that log lists a code coverage of 43.1% (831 of 1928 lines).

What behavior did you expect? And how did you configure the task?

René

btparker-work commented 6 years ago

Actually I looked further and found that incorrect settings for Platform and Configuration. When I left them blank, the extension seems to work. We will upgrade to 5.0.0 to get rid of the localization warnings. Thanks!

ReneSchumacher commented 6 years ago

Thanks for the update. Configuration and platform are usually not supported by 3rd party code coverage tools. You can check on the build summary page if your code coverage values have a platform/configuration associated. If so, please use those values in the task configuration, otherwise leave the values empty.

I have closed the issue now. If you need any additional help, though, please feel free to open a new one or contact us via email (PSGerExtSupport@microsoft.com) or by using the rating/Q&A sections in the marketplace.

René