I would like to obtain the proportion of source code lines that are executed when running a given function with a given argument.
I have no unit tests written for my functions. But I do have several files containing arguments and corresponding expected outputs. One could interpret that as performing "data - coded" unit tests instead of "hard coded" unit tests.
I understand this is not the classical way of performing testing. But this is because the data I have is really representative of many production contexts. Writing unit tests to match these contexts would be really long, complex and so error prone. It may result in non meaningful coverage.
covr
does not seem to offer such feature. All the functions seems test based.
It seems to be the same for other R coverage tools :
https://github.com/MangoTheCat/testCoverage
https://web.archive.org/web/20160611114452/http://r2d2.quartzbio.com/posts/r-coverage-docker.html
Any idea will be appreciated ! :)
Aucun commentaire:
Enregistrer un commentaire