function readOnly(count){ }
Starting November 20, the site will be set to read-only. On December 4, 2023,
forum discussions will move to the Trailblazer Community.
+ Start a Discussion
DbjensenDbjensen 

Run Local Test only, do not deploy package using Microsoft Visual Studio

Hello - How can I run local tests in Microsoft Visual Studio without deploying a package? 

I use this command to deploy: sfdx force:source:deploy -x package -l RunLocalTests  but am looking for a way to run the local tests without deploying the package. 
 
Best Answer chosen by Dbjensen
VinayVinay (Salesforce Developers) 
You can use below command to validate.
 
sfdx force:source:deploy --checkonly -x ./manifest/package.xml -u myProdUserName --testlevel RunLocalTests

https://trailhead.salesforce.com/en/content/learn/modules/org-development-model/test-and-deploy-changes
https://developer.salesforce.com/docs/atlas.en-us.sfdx_cli_reference.meta/sfdx_cli_reference/cli_reference_force_source.htm

Hope above information was helpful.

Please mark as Best Answer so that it can help others in the future.

Thanks,

All Answers

VinayVinay (Salesforce Developers) 
You can use below command to validate.
 
sfdx force:source:deploy --checkonly -x ./manifest/package.xml -u myProdUserName --testlevel RunLocalTests

https://trailhead.salesforce.com/en/content/learn/modules/org-development-model/test-and-deploy-changes
https://developer.salesforce.com/docs/atlas.en-us.sfdx_cli_reference.meta/sfdx_cli_reference/cli_reference_force_source.htm

Hope above information was helpful.

Please mark as Best Answer so that it can help others in the future.

Thanks,
This was selected as the best answer
DbjensenDbjensen
Thanks so much! I appreaciate this.