The application customizes the ios&Android cordova project for automation testing.
Installation:
-
Install projecteditor by running sudo npm -g install projecteditor
-
Run projecteditor from console or terminal window projecteditor OPERATION PARAMETERS ...
Common commands for both ios and Android
- 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
- 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
- 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 "*"
- 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:
- 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
- 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
- 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
- remove resource from project -removeresource XCODE_PROJECT_FOLDER RESOURCE_FILE_NAME
sample: projecteditor -removeresource /Users/i826633/Documents/SMP3/TestApps/Automation/platforms/ios clienthub.plist
- 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:
- 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
-
remove clienthub.properties into project -addClienthubProperties ANDROID_PROJECT_FOLDER projecteditor -removeClienthubProperties /Users/i834381/DEV/kapsel/workspace/kapsel30231/platforms/android
-
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
- 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