There are some notice when playing with Appium. Take care of it:
- Appium:
- Newly automation testing open source, we don't have a lot of tutorials about it
- Using Virtual Machine:
- We should get a little unknown bugs and don't know how to fixed them:
- assert
- swipe
- module
- We should get a little unknown bugs and don't know how to fixed them:
- Install nopejs:
- Option 1:
- Simply go go: http://nodejs.org/
- Click install for download pkg package
- Install the file
- Option 2:
- Simply go go: http://nodejs.org/download/
- Download binaries file for your operation system:
- Unzip the file you will get:
- node-v0.10.3-darwin-x64/bin/node
- node-v0.10.3-darwin-x64//lib/node_modules/npm
- Create bin file:
- cd /usr/local/bin/
- ln -s /path/to/node
- ln -s /path/to/npm/bin/npm
- Option 1:
- Install appium server:
- Option 1:
- Git appium project: https://github.com/appium/appium
- ./reset.sh
- Create bin file:
- chmod +x /path/to/appium/app/bin.js
- cd /usr/local/bin/
- ln -s /path/to/appium/app/bin.js appium
- ln -s /path/to/appium/instruments/client_bin.js instruments_client
- Option 2:
- sudo npm install appium -g
- This command will download and added modules for nodejs at:
- /usr/local/lib/node_modules/appium
- /usr/local/lib/node_modules/instruments
- This command will download and added modules for nodejs at:
- Also create bin file at:
- /usr/local/bin/appium
- /usr/local/bin/instruments_client
- sudo npm install appium -g
- Option 2:
- npm install appium
- This command will download and create appium project folder
- Create bin file:
- chmod +x /path/to/appium/app/bin.js
- cd /usr/local/bin/
- ln -s /path/to/appium/app/bin.js appium
- ln -s /path/to/appium/instruments/client_bin.js instruments_client
- npm install appium
- Option 1:
- Install mocha & grunt modules:
- Option 1:
- sudo npm install mocha -g
- sudo npm install grunt-cli -g
- This command will download and added modules for nodejs at:
- /usr/local/lib/node_modules/_mocha
- /usr/local/lib/node_modules/mocha
- /usr/local/lib/node_modules/grunt-cli
- Also create bin file at:
- /usr/local/bin/_mocha
- /usr/local/bin/mocha
- /usr/local/bin/grunt
- Option 2:
- npm install mocha
- npm install grunt-cli
- This command will download and create mocha & grunt-cli modules folder
- Create bin file:
- cd /usr/local/bin/
- ln -s /path/to/mocha/bin/_mocha _mocha
- ln -s /path/to/mocha/bin/mocha mocha
- ln -s /path/to/grunt-cli/bin/grunt grunt
- Option 1:
- Small test for appium:
- mkdir appium-test && cd appium-test
- npm install wd
- curl -O https://raw.github.com/appium/appium/master/sample-code/examples/node/simplest.js
- appium &
- node simplest.js
- Go to for more information: http://appium.io/getting-started.html
- Build nodejs modules folder for Appium:
- Git project folder from GitHub: https://github.com/appium/appium
- Make sure you get all files and folders in there, because we have another 2 small projects in appium git:
- submodules:
- appium.io
- instruments-without-delay
- submodules:
- Make sure you get all files and folders in there, because we have another 2 small projects in appium git:
- Install nodejs modules:
- cd appium
- npm install mocha
- npm install grunt-cli
- npm install
- This command will using package.json file
- Git project folder from GitHub: https://github.com/appium/appium
- Create .app file for test:
- Using Xcode:
- Go to your iOS project folder
- xcodebuild -sdk iphonesimulator6.0
- Using grunt:
- Stay at root folder of appium source
- grunt buildApp:<AppName>:<SDK>
- grunt buildApp:TestApp:iphonesimulator6.0
- The .app file should in "build/Release-iphonesimulator" folder in iOS project
- Using Xcode:
- How to use grunt:
- Some popular issues:
- Fatal error: Could not find Android SDK, make sure to export ANDROID_HOME
- Download sdk for mac: http://developer.android.com/sdk/index.html
- Unzip package
- Move unzip folder to /usr/local/adt
- sudo vim ~/.bash_profile
- export ANDROID_HOME="/usr/local/adt/sdk"
- ReferenceError: describe is not defined
- We must using mocha function all times
Good luck!
No comments:
Post a Comment