node package manager
Painless code sharing. npm Orgs help your team discover, share, and reuse code. Create a free org ยป

projecteditor

The application customizes the ios&Android cordova project for automation testing.

Installation:

  1. Install projecteditor by running sudo npm -g install projecteditor

  2. Run projecteditor from console or terminal window projecteditor OPERATION PARAMETERS ...


Common commands for both ios and Android

  1. update config.xml content -updatecontent CONFIGURE_XML_FILE_PATH CONTENT_VALUE

sample: projecteditor -updatecontent /Users/i826633/Documents/SMP3/TestApps/Automation/platforms/ios/Automation/config.xml autotest/pages/all.html

  1. add config.xml access -addaccess CONFIGURE_XML_FILE_PATH URI

sample: projecteditor -addaccess /Users/i826633/Documents/SMP3/TestApps/Automation/platforms/ios/Automation/config.xml www.yahoo.com

  1. remove config.xml access -removeaccess CONFIGURE_XML_FILE_PATH URI

sample: projecteditor -removeaccess /Users/i826633/Documents/SMP3/TestApps/Automation/platforms/ios/Automation/config.xml www.yahoo.com projecteditor -removeaccess /Users/i826633/Documents/SMP3/TestApps/Automation/platforms/ios/Automation/config.xml "*"

  1. replace string in file -replacestring FILE_PATH EXISTING_STRING NEW_STRING

sample: projecteditor -replacestring /Users/i826633/Documents/SMP3/TestApps/Automation/platforms/ios/www/js/index.js "inblrlw207.blrl.sap.corp" "torn00461340a.dhcp.tor2.sap.corp"


iOS commands:

  1. add entitlement file into project -addentitlement XCODE_PROJECT_FOLDER ENTITLEMENT_FILE_PATH

sample: projecteditor -addentitlement /Users/i826633/Documents/SMP3/TestApps/Automation/platforms/ios /Users/i826633/Documents/SMP3/Resource/Common/platforms/ios/MCIM.entitlements

Description: The entitlement file must not existing in the project's resource folder. Otherwise, an exception will happen

  1. remove entitlement file from project -addentitlement XCODE_PROJECT_FOLDER ENTITLEMENT_FILE_NAME

sample: projecteditor -removeentitlement /Users/i826633/Documents/SMP3/TestApps/Automation/platforms/ios MCIM.entitlements

  1. add resource into project -addresource XCODE_PROJECT_FOLDER RESOURCE_FILE_PATH

sample: projecteditor -addresource /Users/i826633/Documents/SMP3/TestApps/Automation/platforms/ios /Users/i826633/Documents/SMP3/Resource/UniqueTest/MutualAuth/platforms/ios/Resources/clienthub.plist

Description: The resource file must not existing in the project's resource folder. Otherwise, an exception will happen

  1. remove resource from project -removeresource XCODE_PROJECT_FOLDER RESOURCE_FILE_NAME

sample: projecteditor -removeresource /Users/i826633/Documents/SMP3/TestApps/Automation/platforms/ios clienthub.plist

  1. update plist file -updateplist Plist_FILE_PATH NAME JsonValue

sample: projecteditor -updateplist /Users/i826633/Documents/SMP3/TestApps/Automation/platforms/ios/Automation/Resources/MAFLogonManagerNG.bundle/MAFLogonManagerOptions.plistMAFLogonManagerOptions.plist keyMAFUseAfaria false projecteditor -updateplist /Users/i826633/Documents/SMP3/TestApps/Automation/platforms/ios/Automation/Automation-info.plist TrustAllServer true projecteditor -updateplist /Users/i826633/Documents/SMP3/TestApps/Automation/platforms/ios/Automation/Automation-info.plist CFBundleURLTypes "[{"CFBundleURLName":"myidentity","CFBundleURLSchemes":["myschema"]}]"

Description: if jasnVAlue parameter is set to null, then the key will be deleted from plist file.


Android commands:

  1. add clienthub.properties into project -addClienthubProperties ANDROID_PROJECT_FOLDER CLIENTHUB_PROPERTIES_SRC_FOLDER

sample: projecteditor -addClienthubProperties /Users/i834381/DEV/kapsel/workspace/kapsel30231/platforms/android /Users/i834381/DEV/kapsel/workspace/kapselecc7/platforms/android/res/raw

  1. remove clienthub.properties into project -addClienthubProperties ANDROID_PROJECT_FOLDER projecteditor -removeClienthubProperties /Users/i834381/DEV/kapsel/workspace/kapsel30231/platforms/android

  2. add res folder file into project -addResFile ANDROID_PROJECT_FOLDER CLIENTHUB_PROPERTIES_SRC_FOLDER CLIENTHUB_PROPERTIES_FILE_NAME

sample: projecteditor -addResFile /Users/i834381/DEV/kapsel/workspace/kapsel30231/platforms/android /Users/i834381/DEV/kapsel/workspace/kapselecc7/platforms/android/res/raw clienthub.properties

  1. remove res folder file into project -removeResFile ANDROID_PROJECT_FOLDER SUB_FOLDER/CLIENTHUB_PROPERTIES_FILE_NAME

sample: projecteditor -removeResFile /Users/i834381/DEV/kapsel/workspace/kapsel30231/platforms/android raw/clienthub.properties

//END