Flutter Unit Test Results Missing in SonarQube UI After Upgrade to Version 10.7 (Enterprise )

Hi team,
After upgrading from SonarQube Enterprise Edition to v10.7 we noticed that unit test results are no longer displayed in the SonarQube UI for our Flutter application. Specifically:

  • The “Coverage” section correctly displays data from lcov.info.

  • However, the “Unit Tests” section (showing test count, passed status, execution time) is completely missing.

  • This was working as expected in previous version which has installed flutter plugin manually .We are generating test results using the

    - flutter analyze
    - flutter test --machine | tojunit -o report.xml
    - flutter test --machine --coverage > tests.output

previous versions, we were able to view test execution data, possibly with a plugin or indirect configuration. After the upgrade, only coverage is visible.

What we’ve tried

  • We ensured sonar.dart.lcov.reportPaths=coverage/lcov.info is correctly configured.
  • We tried adding
    FLUTTER_TEST_REPORT_PATH: "tests.output"
    FLUTTER_COVERAGE_REPORT_PATH: "coverage/lcov.info"
  • We found a workaround using the sonar_flutter_reporter Dart package to convert the to JUnit-compatible XML
flutter test --machine | tojunit -o report.xml

But still won’t see any unit tests section there

Sonar command that we have used here

sonar-scanner \
  -Dsonar.projectKey=<> \
  -Dsonar.projectName="<>" \
  -Dsonar.sources=lib \
  -Dsonar.tests=test \
  -Dsonar.dart.lcov.reportPaths=coverage/lcov.info \
  -Dsonar.qualitygate.wait=true \
  -Dsonar.qualitygate.timeout=60 \
  -Dsonar.junit.reportPaths=report.xml \
  -Dsonar.log.level=DEBUG \
  -Dsonar.dart.analyzer.mode=DART \
  -Dsonar.dart.analyzer.report.mode=DETECT \
  -Dsonar.dart.analyzer.report.path=tests.output

Hi @Danushka_Lakmina,

Thanks for joining our community and reporting your issue here.

SonarQube Server 10.7 is the first version of SonarQube Server to embed the Sonar Analyzer for Dart and Flutter. Previously there was no Sonar-provided solution to analyze Dart code, and the only alternative was to rely on community-provided plugins, which is probably what you were using prior to the upgrade.

Our Sonar Analyzer for Dart and Flutter doesn’t provide yet “Unit Tests” metrics: we decided to give priority to measures of coverage and complexity, such as cognitive and cyclomatic complexity, number of classes, functions, and executable lines of code, etc.

Unlike coverage and complexity, “Unit Tests” metrics are scalar values that don’t require advanced visualization (such as covered/uncovered lines and secondary locations), and can easily be checked in CI logs.

That is one of the reasons why we decided to prioritize coverage and complexity metrics over other metrics, including UT ones. However, it would definitely be interesting to hear from you how you leverage “Unit Tests” metrics in your workflow, as we may possibly reconsider their prioritization.

Best regards,
Antonio

Hi Antonio thank you for your prompt response. Could we please have access to the Flutter and Dart Unit Test analysis report available in the 2025.1 Enterprise version UI?

Hi @Danushka_Lakmina,
The Dart Unit Test analysis report is not available in any edition of SonarQube 10.7 or 2025.1, including Enterprise.

For such a feature to be available, we will need to implement it. The reason why you had such feature before 10.7 is likely because you were using the community plugin for Flutter/Dart, which is developed from the community, not by Sonar.
Starting SonarQube 10.7, Sonar has implemented a Dart/Flutter Analyzer, that is incompatible with the community plugin for Flutter/Dart.

I will transfer this community thread to our PM @Alexandre_Gigleux, so that the feature can be adequately prioritized.
In the meantime, feel free to share more details about how you use this feature: it will help us prioritizing against other features we want to bring to the Dart/Flutter analysis.

Best regards,
Antonio

Hi Antonio,
Thanks for your clarification

Thanks & Regards
Danushka

Hello,

Thank you for your request regarding UT Results support for Dart/Flutter. I would like to confirm that we have recorded your suggestion. At this time, you are the first to request this feature. We will monitor interest from other users and prioritize its implementation accordingly if we see increased demand.

Alex