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

Confusing help doc for sf apex run test #2580

Closed
Kevmo92 opened this issue Nov 27, 2023 · 5 comments
Closed

Confusing help doc for sf apex run test #2580

Kevmo92 opened this issue Nov 27, 2023 · 5 comments
Labels
bug Issue or pull request that identifies or fixes a bug validated Version information for this issue has been validated

Comments

@Kevmo92
Copy link

Kevmo92 commented Nov 27, 2023

Summary

Running sf apex run test --help I see this comment:

-s, --suite-names=<value>...  Apex test suite names to run; default is all suites.
...
  -s, --suite-names=<value>...  Apex test suite names to run; default is all suites.

    If you select --suite-names, you can't specify --class-names or --tests.
    For multiple suites, repeat the flag for each.
    --suite-names Suite1 --suite-names Suite2

Notice that it mentions default is all suites. twice in the help doc.

When I run sf apex run test -s -c -r tap -w 20 I get the following error:

Error (1): Flag --suite-names expects a value

Why do I need to supply a value if there is a default to run all test suites?

Steps To Reproduce

Run sf apex run test -s -c -r tap -w 20 in an org with test suites deployed

Expected result

I expect all of the test suites to run.

Actual result

I get an error asking for test suite values.

System Information

Bash

{
  "architecture": "darwin-x64",
  "cliVersion": "@salesforce/cli/2.17.14",
  "nodeVersion": "node-v18.18.2",
  "osVersion": "Darwin 22.6.0",
  "rootPath": "/Users/kevinwatson/.fnm/node-versions/v18.18.2/installation/lib/node_modules/@salesforce/cli",
  "shell": "zsh",
  "pluginVersions": [
    "@oclif/plugin-autocomplete 3.0.1 (core)",
    "@oclif/plugin-commands 3.0.6 (core)",
    "@oclif/plugin-help 6.0.5 (core)",
    "@oclif/plugin-not-found 3.0.3 (core)",
    "@oclif/plugin-plugins 4.1.7 (core)",
    "@oclif/plugin-search 1.0.6 (core)",
    "@oclif/plugin-update 4.1.3 (core)",
    "@oclif/plugin-version 2.0.6 (core)",
    "@oclif/plugin-warn-if-update-available 3.0.2 (core)",
    "@oclif/plugin-which 3.0.8 (core)",
    "@salesforce/cli 2.17.14 (core)",
    "apex 2.3.20 (core)",
    "auth 2.8.26 (core)",
    "data 2.6.3 (core)",
    "deploy-retrieve 1.20.0 (core)",
    "info 3.0.1 (core)",
    "limits 3.0.1 (core)",
    "login 2.0.1 (core)",
    "marketplace 1.0.2 (core)",
    "org 2.11.8 (core)",
    "packaging 1.27.2 (user)",
    "schema 3.0.1 (core)",
    "settings 2.0.2 (core)",
    "signups 1.4.22 (user)",
    "sobject 0.2.15 (core)",
    "source 2.11.0 (core)",
    "telemetry 3.1.0 (core)",
    "templates 55.5.18 (core)",
    "trust 3.0.2 (core)",
    "user 2.3.42 (core)"
  ]
}
@Kevmo92 Kevmo92 added the investigating We're actively investigating this issue label Nov 27, 2023
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.

@github-actions github-actions bot added the validated Version information for this issue has been validated label Nov 27, 2023
@mshanemc mshanemc added bug Issue or pull request that identifies or fixes a bug and removed investigating We're actively investigating this issue labels Nov 27, 2023
Copy link

git2gus bot commented Nov 27, 2023

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

@mshanemc
Copy link
Contributor

yeah, that do is straight-up wrong. There is no default for it (otherwise, it would be impossible to run just a single test because it would be running all the suites!)

@Kevmo92
Copy link
Author

Kevmo92 commented Nov 27, 2023

@mshanemc Thank you kindly! Insanely quick turn around on this!

@jshackell-sfdc
Copy link
Collaborator

This issue is fixed in 2.20.7 (Dec 6, 2023).

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 validated Version information for this issue has been validated
Projects
None yet
Development

No branches or pull requests

3 participants