"vscode:/vscode.git/clone" did not exist on "32bd71e7e7072ac013e65cfc9339d0f17959a35a"
Unverified Commit 98e6f719 authored by James Lamb's avatar James Lamb Committed by GitHub
Browse files

[docs] [R-package] improve R-package docs on testing (#3724)

parent fc1b9300
......@@ -207,7 +207,7 @@ Please visit [demo](https://github.com/microsoft/LightGBM/tree/master/R-package/
Testing
-------
The R package's unit tests are run automatically on every commit, via integrations like [Travis CI](https://travis-ci.org/microsoft/LightGBM/) and [Azure DevOps](https://dev.azure.com/lightgbm-ci/lightgbm-ci/_build). Adding new tests in `R-package/tests/testthat` is a valuable way to improve the reliability of the R package.
The R package's unit tests are run automatically on every commit, via integrations like [GitHub Actions](https://github.com/microsoft/LightGBM/actions). Adding new tests in `R-package/tests/testthat` is a valuable way to improve the reliability of the R package.
When adding tests, you may want to use test coverage to identify untested areas and to check if the tests you've added are covering all branches of the intended code.
......@@ -215,13 +215,11 @@ The example below shows how to generate code coverage for the R package on a mac
```shell
# Install
export CXX=/usr/local/bin/g++-8
export CC=/usr/local/bin/gcc-8
Rscript build_r.R --skip-install
sh build-cran-package.sh
# Get coverage
Rscript -e " \
coverage <- covr::package_coverage('./lightgbm_r', quiet=FALSE);
coverage <- covr::package_coverage('./lightgbm_r', type = 'tests', quiet = FALSE);
print(coverage);
covr::report(coverage, file = file.path(getwd(), 'coverage.html'), browse = TRUE);
"
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment