Skip to content
This repository has been archived by the owner on Jan 4, 2022. It is now read-only.

Run testing coverage on integration tests #61

Open
Halpph opened this issue Feb 8, 2021 · 3 comments
Open

Run testing coverage on integration tests #61

Halpph opened this issue Feb 8, 2021 · 3 comments
Labels
enhancement New feature or request

Comments

@Halpph
Copy link

Halpph commented Feb 8, 2021

Hello,
I'm trying to check my tests code coverage using coverage.py, it's easy to do it for the unit tests because they are launched using pytest: pytest --cov=standard_datatamers_lib tests/unit --cov-report=xml:cobertura.xml, but I'm struggling to find a way to do it with the integration tests, because they are launched using dbx: launch --job=standard_datatamers_lib-sample-integration-test-feature --trace.
Do you have a way to do that? If not, are you planning to create something in regard to it?
Thanks in advance :)

@renardeinside
Copy link
Contributor

Hi @Halpph . Thanks for raising an issue.

This issue is quite an interesting task tbh because it requires the following:

  1. Generation of the cov-report is done on the driver-side during an integration test run
  2. We need somehow to save the report to dbfs (?) or as an MLflow artifact (??)
  3. We need to export this artifact after the job run

Theoretically, it's possible but requires some fiddling around the launch mechanics. I'll try out and ping you in this thread as soon as I get some results.

@renardeinside renardeinside added the enhancement New feature or request label Feb 10, 2021
@dead
Copy link

dead commented Aug 1, 2021

Hi guys!
Not sure if @Halpph is still looking for a solution to this, but I was able to create a simple POC code to execute and get the coverage.xml from the integration test run.

@renardeinside
Copy link
Contributor

hi @dead ,
I must admit I was thinking that the solution was hardly achievable until some changes on the API side, but your solution works perfectly.

Could you please create a separate .md file with instructions and contribute it to the repository as a PR?

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
enhancement New feature or request
Projects
None yet
Development

No branches or pull requests

3 participants