CumulusCI icon indicating copy to clipboard operation
CumulusCI copied to clipboard

Option in run_tests tasks to generate detailed reports for coverage and test execution

Open stuki opened this issue 4 years ago • 3 comments
trafficstars

Feature Type

I'm interested in extensions to existing CumulusCI functionality (e.g., broader applicability of an existing Task or Flow).

Does your feature request solve a current problem?

We run static analysis using SonarQube on our repo, and to get detailed reports on coverage and test execution we cannot use cci, instead we run the tests using sfdx force:apex:test:run --codecoverage --detailedcoverage --resultformat junit to get the reports. The current test reports do not give coverage reports for individual files which is what we would want.

The task run_tests should have the option to include detailed test reports in it so that we wouldn't need to use sfdx for this.

Describe the solution you'd like

I would like the option to enable detailed reporting on test execution to exist on the task run_tests. The detailed reporting should include test execution data and test coverage per each class

Describe alternatives you've considered

We are currently using sfdx force:apex:test:run --codecoverage --detailedcoverage --resultformat junit as a working alternative

Additional context

No response

stuki avatar Oct 08 '21 09:10 stuki

The run_tests task already has an option named junit_output to specify where to output test execution data in JUnit format.

davisagli avatar Oct 08 '21 13:10 davisagli

Sorry if I didn't explain myself clear enough, we need the code coverage report (test-result-codecoverage.json) that comes out of sfdx force:apex:test:run --codecoverage --detailedcoverage --resultformat junit. This is currently not given through any command.

stuki avatar Oct 28 '21 10:10 stuki

Is your objective to receive the same code coverage output format as provided by SFDX, or some other reporting format?

davidmreed avatar Jan 28 '22 22:01 davidmreed

I have the same requirement, specifically to generate test-result-codecoverage.json for use with a static code scanner (SonarQube) that is compatible specifically with the SFDX-generated file.

@davidmreed are there other ways to get generic code coverage data from CumulusCI?

zenibako avatar Nov 08 '22 10:11 zenibako

I'm afraid not. JUnit is the only supported output format at this time.

davidmreed avatar Nov 08 '22 20:11 davidmreed