Closed ayhncvdr2 closed 10 months ago
flutter test --coverage
lcov --remove coverage/lcov.info 'lib/network/*' -o coverage/lcov.info
genhtml coverage/new_lcov.info --output=coverage
sudo apt-get update -qqy
sudo apt-get install -qqy lcov > /dev/null
cd mobile
lcov \
--remove coverage/lcov.info \
-o coverage/lcov_group1.info \
'lib/network/*' \
'lib/routes/login/bloc/*_event.dart' \
'lib/routes/login/bloc/*_state.dart' \
'lib/routes/login/model/*' \
'lib/routes/register/bloc/*_event.dart' \
'lib/routes/register/bloc/*_state.dart' \
'lib/routes/register/model/*' \
'lib/util/*'
genhtml coverage/lcov_group1.info \
--output=coverage \
--legend \
--title "SWE574 - Fall2023 - Group1 - Mobile Test Coverage"
cd ..
In this issue, we aim to generate test coverage reports for our project. These reports are crucial for understanding the parts of our codebase that are well-tested and those that are not.
The task involves setting up a suitable test coverage tool that is compatible with our tech stack. The tool should be able to generate an output file LCOV report that provides detailed information about the line coverage, function coverage, and branch coverage of our tests.
Once the tool is set up, it should be integrated into our CI/CD pipeline to ensure that the test coverage report is updated and easily accessible after every code push.
Note: We need to apply test coverage outputs to $feature_bloc.dart files, find a way to do this in lcov file.