forcedotcom / forcedotcom/cli

force:source:deploy --coverageformatters cobertura | Incorrect class filename in Cobertura XML reports

Open
#1,725 17 comments 5 reactions 0 assignees View on GitHub
investigating
Dominant language
No language data
Stars
571
Forks
80
Avg merge
2d 15h
Merged PRs (30d)
3

Description

### Summary

When running force:source:deploy with --coverageformatters cobertura, it generate a cobertura xml file with the coverage results. However the filename path is invalid which means ci/cd tooling can't associate the coverage with the actual file.

### Steps To Reproduce:
Just run a source:deploy with test level set as RunLocalTest or RunSpecifiedTests and make sure coverageformatters is set as cobertura.
```shell
sfdx force:source:deploy -g -w 999 --testlevel RunSpecifiedTests -p force-app/main/default/classes/SampleClass.cls -r "SampleClass_Test" --junit --resultsdir tests --coverageformatters cobertura --checkonly --verbose
```
### Expected result

Cobertura xml with valid filename should be generated.
```xml


.













```

### Actual result
Filename path is completely incorrect
```xml


.













```

### System Information

- Which shell/terminal are you using? bash

- If you are using `sfdx`
**sfdx-cli/7.168.0 darwin-x64 node-v14.15.4**

Contributor guide

Open the contributing guide

Assessment

This issue has not been assessed yet.

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.