I'm looking to deploy my code using sfdx, these are the steps I'm going to take:
Retrieve code from sandbox:
sfdx force:source:retrieve -m MetadataType:ClassName,MetadataType:ClassName_Test -u YourSandboxOrgAlias
Deploy code to production:
sfdx force:source:deploy -m MetadataType:ClassName,MetadataType:ClassName_Test -l RunAllTests -r ClassName_Test -u YourProdOrgAlias
So I tried typing in the first command and pressed enter:
sfdx force:source:retrieve -m MetadataType:OnSiteActivityControllerTest.cls,MetadataType:OnSiteActivityController.cls -u Staging
but got 'No results found'.
Please advise.
Also, can you please review the steps above and let me know if they are syntactically correct?
-l RunAllTests
will run all tests, and you don't need to specify the-r ClassName_Test
. If you only want to run specific tests, used-l RunSpecifiedTests
– Brian Miller Feb 25 '20 at 12:13