microsoft / nutter

Testing framework for Databricks notebooks
MIT License
289 stars 43 forks source link

is it possible to generate code coverage with nutter ? #55

Open vinura opened 3 years ago

vinura commented 3 years ago

I am trying integrated UnitTests + Codecoverage and Sonar Cloud. I am looking at a way to generate code coverage reports.

When I tried to run code coverage. Using Code Coverage API like this

` def run_tests():

cov = coverage.Coverage()
cov.start(source=)

TESTS!

cov.stop()
cov.save()
cov.html_report(directory='/dbfs/Users/Vinura/coverage_report')

`

The following happens. It runs the code coverage on cluster root. So is it possible to use nutter to generate code coverage reports?

MicrosoftTeams-image (5)

giventocode commented 3 years ago

Can you please clarify a bit further, what are the files you want to generate the coverage for? We have considered to provide limited coverage information for notebooks: whether a notebook in a folder has been called by a nutter test.

vinura commented 3 years ago

In a nutshell, is it possible to get the code coverage metric for the entire project?

Ex - Lines Covered by Tests / Lines in entire project . Is it possible to get the code coverage metric?

This is to set a gate for the pull request.

renepajta commented 3 years ago

Any update on this feature? Are we able to get code coverage for nutter tests?

KishanChoudhury commented 1 year ago

Any update on this feature? a code coverage metric would be really helpful in order to report on the quality of the code

jugani commented 1 year ago

Is there any updates on this issue ?

arturo-opsetmoen-amador commented 1 year ago

Are there any updates whatsoever or is the project not maintained any more?

sergiopolimante commented 7 months ago

Any updates here?

mishranaman commented 2 months ago

Do we any update regarding the coverage?