> For the complete CircleCI developer hub index, see [llms.txt](https://circleci.com/developer/llms.txt)

# deepsource/test-coverage

Upload test coverage reports to DeepSource to track test coverage and see which lines are not covered by tests yet. DeepSource is an automated code review tool that helps developers find and fix bugs in their code.


## Commands

### report

Report the test coverage file generated after running the tests to DeepSource.


| Parameter | Type | Default | Description |
|---|---|---|---|
| `coverage-file` | string |  | Path to the coverage data file. e.g. ./coverage.xml |
| `dsn` | string | ${DEEPSOURCE_DSN} | DeepSource DSN of this repository. It is available under Settings → Reporting tab of the repository page on DeepSource.
 |
| `key` | string |  | Programming language shortcode for which coverage is reported. Supported languages are — go, javascript, python, ruby
 |

## Examples

### report_python_coverage

Example usage of DeepSource test-coverage orb

```yaml
version: '2.1'
orbs:
  deepsource: deepsource/test-coverage
jobs:
  run-test:
    docker:
      - image: cimg/python:3.8.5
    steps:
      - checkout
      - run: pytest --cov --cov-report=xml
      - deepsource/report:
          coverage-file: ./coverage.xml
          dsn: ${DEEPSOURCE_DSN}
          key: python
workflows: null
```