tools
tools copied to clipboard
No Coverage Generated
I have a simple shelf server app. I have six tests. They run correctly, but the tool doesn't generate any code coverage.
[✓] Flutter (Channel stable, 3.10.1, on macOS 13.3.1 22E772610a darwin-arm64, locale en-AU) [✓] Android toolchain - develop for Android devices (Android SDK version 33.0.1) [✓] Xcode - develop for iOS and macOS (Xcode 14.3) [✓] Chrome - develop for the web [✓] Android Studio (version 2021.3) [✓] VS Code (version 1.78.2) [✓] Connected device (2 available) [✓] Network resources
Package version: 1.6.3
I installed with:
dart pub global activate coverage
I run this command:
dart pub global run coverage:test_with_coverage
This is the terminal output
coverage.json
{"type":"CodeCoverage","coverage":[]}
lcov.info is blank.
Hi @MelbourneDeveloper @mosuem
I tried reproducing the issue, but the coverage.lcov file on my machine contains valid content. This suggests that coverage generation is working correctly in my setup.
Could you provide more details to help diagnose the issue? Specifically:
- The exact command used to generate coverage
- Your Dart/Flutter version
- Whether the issue occurs for all tests or only specific ones
Any additional context would be helpful.
Thanks,