[BioC] using RUnit inspect() feature in package testing

Dan Tenenbaum dtenenba at fhcrc.org
Mon Aug 13 18:23:55 CEST 2012


On Sat, Aug 11, 2012 at 2:58 PM, Levi Waldron
<lwaldron.research at gmail.com> wrote:
> Is there a recommended way to inspect coverage of your scripts by the
> package unit tests?

Not particularly.

> The Bioconductor HOWTO on unit testing for developers
> is very helpful for getting unit tests set up for a package:
>
> http://www.bioconductor.org/developers/unitTesting-guidelines/
>
> The guidelines don't mention the code inspection feature of RUnit, the
> inspect() function, which analyzes the coverage of each line of script (
> http://cran.r-project.org/web/packages/RUnit/vignettes/RUnit.pdf, section
> 2.2).  It would be great to have this html report just appear in
> packagename.Rcheck/tests after running R CMD check, but any solution would
> do.


If you call inspect() in your unit tests, the results (assuming you
print them out with printHTML.trackInfo(); see the example at
?inspect) will end up in packagename.Rcheck/tests/results/index.html
(unless you specify a different output directory with the baseDir
argument to printHTML.trackInfo().

Dan


>
> Thank you,
> Levi
>
>         [[alternative HTML version deleted]]
>
> _______________________________________________
> Bioconductor mailing list
> Bioconductor at r-project.org
> https://stat.ethz.ch/mailman/listinfo/bioconductor
> Search the archives: http://news.gmane.org/gmane.science.biology.informatics.conductor



More information about the Bioconductor mailing list