Skip to content

JSON flag not being accepted as resultformat for code coverage #3583

Description

@randi274

Summary

Running this command featured in our documentation results in an error:
sfdx force:apex:test:run -n "MyTestName" -c --json

Steps To Reproduce:

  1. Run this command: sfdx force:apex:test:run -n "MyTestName" -c --json, where MyTestName is the name of a valid test class.
  2. Get this error: Select a result format when specifying code coverage

Expected result

--json is enough information for the code coverage result format.

Actual result

I need to add the resultformat to get it to work: sfdx force:apex:test:run -n "MyTestName" -c --resultformat=json

Additional information

We should either allow the --json flag to work without the --resultformat=json, or remove that example.

Apex library Version:
0.7.0

Metadata

Metadata

Assignees

Labels

bugIssue or pull request that identifies or fixes a bug

Type

No type
No fields configured for issues without a type.

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions