Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

The --junit and --coverage-formatters flags do not work with the --json flag for the sf project deploy start command. #2172

Closed
dpr-nh opened this issue May 30, 2023 · 5 comments
Labels
bug Issue or pull request that identifies or fixes a bug investigating We're actively investigating this issue

Comments

@dpr-nh
Copy link

dpr-nh commented May 30, 2023

Summary

The --junit and --coverage-formatters flags do not work with the --json flag for the sf project deploy start command.

Steps To Reproduce:

  1. Run the following command in a Salesforce project:
sf project deploy start --test-level RunSpecifiedTests --tests FileUtilitiesTest --source-dir force-app --results-dir ./tests/apex --junit --coverage-formatters text-summary --coverage-formatters text --coverage-formatters json-summary --coverage-formatters cobertura --dry-run --json

Expected result

The command should have created the ./tests/apex directory with the following architecture:

.
└── tests
    └── apex
        ├── coverage
        │   ├── cobertura.xml
        │   ├── coverage-summary.json
        │   ├── text-summary.txt
        │   └── text.txt
        └── junit
            └── junit.xml

5 directories, 5 files

Actual result

The directory ./tests/apex is not created. Running the same command without the --json flag does create the coverage and junit reports as intended.

System Information

  • Which shell/terminal are you using?
    zsh

  • sf version:

{
  "cliVersion": "@salesforce/cli/1.79.5",
  "architecture": "linux-x64",
  "nodeVersion": "node-v18.14.2",
  "osVersion": "Linux 6.2.15-300.fc38.x86_64",
  "shell": "zsh",
  "rootPath": "/home/dprnh/.nvm/versions/node/v18.14.2/lib/node_modules/@salesforce/cli",
  "pluginVersions": [
    "@oclif/plugin-autocomplete 2.2.0 (core)",
    "@oclif/plugin-commands 2.2.15 (core)",
    "@oclif/plugin-help 5.2.9 (core)",
    "@oclif/plugin-not-found 2.3.23 (core)",
    "@oclif/plugin-plugins 3.0.1 (core)",
    "@oclif/plugin-search 0.0.17 (core)",
    "@oclif/plugin-update 3.1.15 (core)",
    "@oclif/plugin-version 1.3.4 (core)",
    "@oclif/plugin-warn-if-update-available 2.0.37 (core)",
    "@oclif/plugin-which 2.2.20 (core)",
    "@salesforce/cli 1.79.5 (core)",
    "apex 2.2.19 (core)",
    "auth 2.7.15 (core)",
    "data 2.3.18 (core)",
    "deploy-retrieve 1.9.1 (core)",
    "info 2.6.13 (core)",
    "limits 2.3.15 (core)",
    "login 1.2.9 (core)",
    "org 2.9.0 (core)",
    "schema 2.3.10 (core)",
    "settings 1.4.8 (core)",
    "sobject 0.1.19 (core)",
    "source 2.10.9 (core)",
    "telemetry 2.2.0 (core)",
    "templates 55.4.15 (core)",
    "trust 2.4.18 (core)",
    "user 2.3.13 (core)"
  ]
}

Additional information

This bug was found while migrating CI/CD from the sfdx to sf command. The flags work as intended with the equivalent sfdx command.

@dpr-nh dpr-nh added the investigating We're actively investigating this issue label May 30, 2023
@github-actions
Copy link

Thank you for filing this issue. We appreciate your feedback and will review the issue as soon as possible. Remember, however, that GitHub isn't a mechanism for receiving support under any agreement or SLA. If you require immediate assistance, contact Salesforce Customer Support.

@dpr-nh dpr-nh changed the title The --junit and --coverage-formatters flags do not work with the --json flag. The --junit and --coverage-formatters flags do not work with the --json flag for the sf project deploy start command. May 30, 2023
@iowillhoit iowillhoit added the bug Issue or pull request that identifies or fixes a bug label May 30, 2023
@iowillhoit
Copy link
Contributor

Confirmed using Dreamhouse.

Thanks for the issue @dpr-nh, we'll look into it.

@git2gus
Copy link

git2gus bot commented May 30, 2023

This issue has been linked to a new work item: W-13505809

@OlegBogdanovych
Copy link

Hello. What is approx ETA when this fix will be delivered? Thank you in advance

@cristiand391
Copy link
Member

Hi @OlegBogdanovych , this is fixed in the latest release.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Issue or pull request that identifies or fixes a bug investigating We're actively investigating this issue
Projects
None yet
Development

No branches or pull requests

4 participants