microsoft / data-factory-testing-framework

A stand-alone test framework that allows to write unit tests for Data Factory pipelines on Microsoft Fabric, Azure Data Factory and Azure Synapse Analytics.
MIT License
92 stars 21 forks source link

test: add code coverage #133

Closed jayachithra closed 1 month ago

jayachithra commented 2 months ago
  1. Added extension to display coverage reports
  2. Updated docs with steps on how to generate and visualize code coverage
jayachithra commented 1 month ago

Awesome addition!

For the future, as we talked about, we can consider checking to automatically run the coverage as part of running tests and we could also look into generating a report with the pipeline so we can view the coverage as part of PR review.

Good idea to integrate coverage into VSCode test explorer, it's probably worth considering pytest-cov python 3.x - Running pytest-cov along with pytest in VS Code - Stack Overflow, but it causes some known issues with debugger - Debugger doesn't stop at breakpoints with pytest if pytest-cov is used · Issue #693 · microsoft/vscode-python (github.com) for which there might be a workaround - Testing Python in Visual Studio Code. Needs further testing. As agreed, I will close this PR as it is right now and we can have this as a possible improvement.