简体   繁体   中英

Test Automation Execution reports in SonarQube

I don't know much about Sonar Qube. This is regarding test automation reports using SonarQube. Basically we have Code Coverage and Quality gate reports for different languages in Sonar. But can be have a simple looking Pass/Fail report integrated into it also with input being an xml? We have a common dashboard of SonarQube for Coverage, Quality Code Gates etc and wanted to have the same for using as a test reporting dashboard. Currently we are using a UI Automation tool 'Froglogic Squish'(with Python scripting) for test automation which gives reports in html and also a well formatted xml is produced for the same.

My question is firstly, is it possible for Junit-format xmls pass/fail reports to appear on SonarQube, if yes, secondly we can transpose our Squish report xml to a Junit-format xml and can that be used directly by some plugin in Sonar Qube to show reports in the dashboard.

(Please find below the console output from Jenkins when i run Sonar with Sonar Java for Junit reports)

INFO: Sensor XmlFileSensor
INFO: 1 source files to be analyzed
INFO: Sensor XmlFileSensor (done) | time=154ms
INFO: Sensor Zero Coverage Sensor
INFO: 1/1 source files have been analyzed
INFO: Sensor Zero Coverage Sensor (done) | time=134ms
INFO: Sensor Code Colorizer Sensor
INFO: Sensor Code Colorizer Sensor (done) | time=50ms
INFO: Sensor CPD Block Indexer
INFO: Sensor CPD Block Indexer (done) | time=0ms
INFO: Calculating CPD for 0 files
INFO: CPD calculation finished
INFO: Analysis report generated in 5475ms, dir size=54 MB
INFO: Analysis reports compressed in 7911ms, zip size=39 MB
INFO: Analysis report uploaded in 6604ms
INFO: ANALYSIS SUCCESSFUL, you can browse http://localhost:9000/dashboard/index/SonarJunit

If you can get your data into aa JUnit format then you should be able to pull this data in to SonarQube. Take a look at the docs for what properties to set.

To see this data, you'll use the Measures page .

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM