Last active
May 6, 2020 06:34
-
-
Save hugohernandezfcc/a8c6e765357ac2ca4be5c5907c0ab765 to your computer and use it in GitHub Desktop.
How create a project and make deploy changes, even run test methods from terminal.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
################################################################### | |
######## Project ready to work with any IDE ######## | |
################################################################### | |
# Create a SFDX project from terminal | |
sfdx force:project:create --projectname myproject --manifest | |
# Position yourself on the project folder | |
cd myprojectname | |
# Set an alias and login on your developer Org | |
sfdx force:auth:web:login --setalias userOrgNewFeatures --setdefaultusername | |
# Get all the metadata that was created on your org previously. | |
sfdx force:source:retrieve --manifest manifest/package.xml | |
##################################################################################### | |
######## Make a deploy from terminal with too many files or a specific file ######## | |
##################################################################################### | |
sfdx force:source:deploy --loglevel fatal --sourcepath force-app/main/default/METADATAFOLDER/ | |
OR | |
sfdx force:source:deploy --loglevel fatal --sourcepath force-app/main/default/METADATAFOLDER/FILE.APEX | |
##################################################################################### | |
######## Run test methods from terminal and select too many controllers ######## | |
##################################################################################### | |
sfdx force:apex:test:run --classnames TestA,TestB --resultformat tap --codecoverage |
To create a class sfdx force:apex:class:create -n NameController -d force-app/main/default/classes
sfdx force:apex:execute -u MyConnectedOrg
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
If you need run sfdx force:auth:web:login but on sandbox enviroment just add --instanceurl https://test.salesforce.com as parameter on the same command line.