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

project deploy validate with NoTestRun #2102

Closed
jasonmatos opened this issue Apr 28, 2023 · 7 comments
Closed

project deploy validate with NoTestRun #2102

jasonmatos opened this issue Apr 28, 2023 · 7 comments
Labels
feature Issue or pull request for a new feature

Comments

@jasonmatos
Copy link

jasonmatos commented Apr 28, 2023

I need to be able to do a Deploy check without running any test classes in Developer Sandbox to be able to test if the package.xml is valid and not missing any dependencies.

When running the following command by default all the local test are triggered
sf project deploy validate -x manifest/package.xml

sf project deploy validate -x manifest/package.xml -l NoTestRun
Expected --test-level-NoTestRun to be one of : RunAllTestsInOrg, RunLocalTests, RunSpecifiedTests

I would like to have NoTestRun available for the validate command.

As a workaround, I would run RunSpecifiedTests with a single random testClass
sf project deploy validate -x manifest/package.xml -l RunSpecifiedTests -t RandomClassTest

sf version
@salesforce/cli/1.75.6 win32-x64 node-V17.2.0

@jasonmatos jasonmatos added the feature Issue or pull request for a new feature label Apr 28, 2023
@github-actions
Copy link

Thank you for filing this feature request. We appreciate your feedback and will review the feature at our next grooming or sprint planning session. We prioritize feature requests with more upvotes and comments.

@git2gus
Copy link

git2gus bot commented Apr 28, 2023

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

@shetzel
Copy link
Contributor

shetzel commented Apr 28, 2023

The force source deploy command works this way so this command should too. We'll add it.

@adityasfdev
Copy link

adityasfdev commented Apr 29, 2023

You can use this command "sfdx project deploy start -x manifest/package.xml -l NoTestRun --dry-run" with --dry-run parameter which will do the validation and the default test run level is no test run in this command

@shetzel
Copy link
Contributor

shetzel commented May 1, 2023

@adityasfdev is correct - thanks! This is supported with the project deploy start command now.

@shetzel shetzel closed this as completed May 1, 2023
@manwe651
Copy link

Are there any plans to update the validate command to respect NoTestRun. I understand there is a work around using the deploy start command, but it is not very intuitive.

@vt89
Copy link

vt89 commented Feb 27, 2024

Even if a workaround is available, I think the command should be updated allowing using NoTestRun as explained by the documentation.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
feature Issue or pull request for a new feature
Projects
None yet
Development

No branches or pull requests

5 participants