appium 代码仓库里面已经只剩下 js 文件了. 原来的各种平台实现已经独立出来了.
"dependencies": {
"appium-android-driver": "^1.6.11",
"appium-base-driver": "^1.3.0",
"appium-express": "^1.2.0",
"appium-fake-driver": "^0.1.9",
"appium-ios-driver": "^1.8.7",
"appium-logger": "^2.1.0",
"appium-selendroid-driver": "^1.2.2",
"appium-support": "^2.0.9",
"argparse": "^1.0.2",
"asyncbox": "^2.3.1",
"authorize-ios": "^1.0.4",
"babel-runtime": "=5.8.24",
"bluebird": "^2.9.25",
"date-utils": "^1.2.18",
"lodash": "^3.9.1",
"mobile-json-wire-protocol": "^1.3.2",
"npmlog": "^2.0.1",
"request-promise": "^1.0.2",
"source-map-support": "^0.3.2",
"teen_process": "^1.5.1",
"winston": "^1.0.0"
},
再看 appium-android-driver 项目 也是 nodejs 项目. 他的依赖如下
"dependencies": {
"adm-zip": "^0.4.7",
"appium-adb": "^2.4.2",
"appium-android-bootstrap": "^2.5.0",
"appium-android-ime": "^2.0.0",
"appium-base-driver": "^1.3.0",
"appium-chromedriver": "^2.8.0",
"appium-express": "^1.2.0",
"appium-logger": "^2.1.0",
"appium-support": "^2.0.9",
"appium-unlock": "0.0.1",
"asyncbox": "^2.0.4",
"babel-runtime": "=5.8.24",
"bluebird": "^2.9.32",
"io.appium.settings": "^2.0.0",
"lodash": "^3.10.0",
"mobile-json-wire-protocol": "^1.2.0",
"source-map-support": "^0.3.1",
"teen_process": "^1.4.0",
"temp": "^0.8.3",
"yargs": "^3.10.0"
},
同样 appium-ios-driver 的项目依赖如下
"dependencies": {
"adm-zip": "^0.4.7",
"appium-base-driver": "^1.3.0",
"appium-cookies": "^1.1.0",
"appium-express": "^1.2.0",
"appium-instruments": "^3.6.0",
"appium-ios-log": "^1.2.0",
"appium-ios-simulator": "^1.5.1",
"appium-logger": "^2.1.0",
"appium-remote-debugger": "^2.0.0",
"appium-support": "^2.0.9",
"appium-uiauto": "^2.3.1",
"appium-xcode": "^3.1.0",
"asyncbox": "^2.2.0",
"babel-runtime": "=5.8.24",
"bluebird": "^2.9.32",
"ios-app-utils": "^1.1.0",
"js2xmlparser2": "^0.2.0",
"lodash": "^4.0.1",
"mobile-json-wire-protocol": "^1.3.0",
"node-idevice": "^0.1.5",
"path": "^0.12.7",
"safari-launcher": "^2.0.5",
"source-map-support": "^0.4.0",
"teen_process": "^1.3.0",
"url": "^0.11.0",
"uuid-js": "^0.7.5",
"xmldom": "^0.1.19",
"xpath": "0.0.21",
"yargs": "^3.29.0"
},
大概的架构是 android-bootstrap->appium-android-driver->appium-base-driver->appium
很多功能都进行了拆分, 这样架构更清晰了. 不过感觉还是不够理想.
appium 的这些子模块几乎是涵盖了移动测试的大部分基础知识. 刷一遍还是会很有收获的.