You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Currently, the overall test coverage of LeanStore is very low. Increasing unit test coverage is essential for detecting bugs early, improving code quality, and providing confidence when making changes. It also serves as documentation, showing how the code is intended to work, and makes the codebase easier to maintain and refactor. Overall, comprehensive unit tests ensure robust, reliable, and maintainable software.
How to generate coverage report in HTML
Mainly, you can follow the build and test steps in the CI workflow to install necessary tools
# generate compile database wich cmake preset
cmake --preset debug_tsan
# build
cmake --build build/debug_tsan -j `nproc`# run unit tests, generate coverage raw data
TSAN_OPTIONS="suppressions=$(pwd)/tests/tsan.supp" ctest --test-dir build/debug_tsan --output-on-failure -j 2
# generate coverage report in HTML format
gcovr -v -r . --html-details --output=coverage.html --exclude 'build/*' --exclude 'tests/*' --exclude 'benchmarks/*' --verbose
# start a simple HTTP server to view the HTML report.# then you can view the coverage report in your browser at# http://localhost:8000/coverage.xml
python3 -m http.server -d .
Methods to improve test coverage
add unit tests in the tests directory, there are lots of test examples
remove unused dead code
The text was updated successfully, but these errors were encountered:
Background
Currently, the overall test coverage of LeanStore is very low. Increasing unit test coverage is essential for detecting bugs early, improving code quality, and providing confidence when making changes. It also serves as documentation, showing how the code is intended to work, and makes the codebase easier to maintain and refactor. Overall, comprehensive unit tests ensure robust, reliable, and maintainable software.
How to generate coverage report in HTML
Mainly, you can follow the build and test steps in the CI workflow to install necessary tools
Methods to improve test coverage
tests
directory, there are lots of test examplesThe text was updated successfully, but these errors were encountered: