forcedotcom / cli

Salesforce CLI
https://developer.salesforce.com/docs/atlas.en-us.sfdx_cli_reference.meta/sfdx_cli_reference/
BSD 3-Clause "New" or "Revised" License
493 stars 78 forks source link

There is a difference on the code coverage result format #3077

Open fedegiust opened 3 hours ago

fedegiust commented 3 hours ago

Summary

There is an inconsistency for running tests between deployment and running them directly. When running a deployment there is an option for code coverage formatters which give a number of options, which is great! I like the html format.

image

But when running apex run test the options are limited

image

image

Steps To Reproduce

sf apex run test --test-level RunLocalTests --output-dir temp --synchronous --result-format html --code-coverage

github-actions[bot] commented 3 hours ago

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.

github-actions[bot] commented 3 hours ago

Hello @fedegiust :wave: It looks like you didn't include the full Salesforce CLI version information in your issue. Please provide the output of version --verbose --json for the CLI you're using (sf or sfdx).

A few more things to check:

Thank you!

fedegiust commented 3 hours ago

In this case it happens across all versions

{
  "architecture": "win32-x64",
  "cliVersion": "@salesforce/cli/2.59.6",
  "nodeVersion": "node-v20.17.0",
  "osVersion": "Windows_NT 10.0.19045",
  "rootPath": "C:\\Users\\Usuario\\AppData\\Local\\sf\\client\\2.59.6-767cea4",
  "shell": "C:\\Program Files\\Git\\usr\\bin\\bash.exe",
  "pluginVersions": [
    "@oclif/plugin-autocomplete 3.2.3 (core)",
    "@oclif/plugin-commands 4.0.14 (core)",
    "@oclif/plugin-help 6.2.11 (core)",
    "@oclif/plugin-not-found 3.2.20 (core)",
    "@oclif/plugin-plugins 5.4.7 (core)",
    "@oclif/plugin-search 1.2.8 (core)",
    "@oclif/plugin-update 4.5.6 (core)",
    "@oclif/plugin-version 2.2.12 (core)",
    "@oclif/plugin-warn-if-update-available 3.1.15 (core)",
    "@oclif/plugin-which 3.2.13 (core)",
    "@salesforce/cli 2.59.6 (core)",
    "apex 3.4.9 (core)",
    "api 1.2.1 (core)",
    "auth 3.6.56 (core)",
    "data 3.6.5 (core)",
    "deploy-retrieve 3.12.7 (core)",
    "info 3.4.6 (core)",
    "limits 3.3.30 (core)",
    "marketplace 1.2.25 (core)",
    "org 4.5.8 (core)",
    "packaging 2.8.4 (core)",
    "schema 3.3.29 (core)",
    "settings 2.3.19 (core)",
    "signups 2.5.14 (user) published 45 days ago (Sat Sep 07 2024) (latest is 2.5.23)",
    "sobject 1.4.35 (core)",
    "source 3.5.19 (core)",
    "telemetry 3.6.12 (core)",
    "templates 56.3.18 (core)",
    "trust 3.7.27 (core)",
    "user 3.5.29 (core)",
    "@salesforce/sfdx-scanner 4.6.0 (user) published 28 days ago (Tue Sep 24 2024)",
    "sfdmu 4.36.3 (user) published 32 days ago (Thu Sep 19 2024)",
    "sfdx-git-delta 5.45.0 (user) published 32 days ago (Fri Sep 20 2024) (latest is 5.49.0)",
    "sfdx-plugin-source-read 1.2.0 (user) published 364 days ago (Tue Oct 24 2023)"
  ]
}
github-actions[bot] commented 3 hours ago

Hello @fedegiust :wave: None of the versions of sf you shared match the latest release.

Shared: 2.59.6 Latest: 2.62.6

Update to the latest version of Salesforce CLI (docs) and confirm that you're still seeing your issue. You can also try the rc and nightly releases! (docs)

After updating, share the full output of sf version --verbose --json