我简单的对第一篇文章中的内容做一下总结。一个高质量的App不仅仅需要代码规范和逻辑严谨,还需要通过测试去对App的质量进行考核。从分层测试的角度来说,我们的测试你首先是单元测试,然后是接口级测试,最后是UI的测试。文章中列举了安卓和iOS一些常用的测试框架,iOS端常用的XCTest(系统自带用于单元测试的框架)、KIF(Keep It Functional,一款iOS app功能性测试框架)、Kiwi(BDD框架,是对XCTest的一个完整替代)都进行了简单的介绍。
解释一下BDD和TDD:
info AppiumDoctor Appium Doctor v.1.12.1
info AppiumDoctor ### Diagnostic for necessary dependencies starting ###
info AppiumDoctor ✔ The Node.js binary was found at: /usr/local/bin/node
info AppiumDoctor ✔ Node version is 12.13.0
info AppiumDoctor ✔ Xcode is installed at: /Applications/Xcode.app/Contents/Developer
info AppiumDoctor ✔ Xcode Command Line Tools are installed in:
/Applications/Xcode.app/Contents/Developer
info AppiumDoctor ✔ DevToolsSecurity is enabled.
info AppiumDoctor ✔ The Authorization DB is set up properly.
info AppiumDoctor ✔ Carthage was found at: /usr/local/bin/carthage. Installed version is:
0.34.0
info AppiumDoctor ✔ HOME is set to: /Users/jackie-pc
info AppiumDoctor ### Diagnostic for necessary dependencies completed, no fix needed. ###
info AppiumDoctor
info AppiumDoctor ### Diagnostic for optional dependencies starting ###
WARN AppiumDoctor ✖ opencv4nodejs cannot be found.
WARN AppiumDoctor ✖ ffmpeg cannot be found
WARN AppiumDoctor ✖ mjpeg-consumer cannot be found.
WARN AppiumDoctor ✖ idb is not installed
info AppiumDoctor ✔ applesimutils is installed at: /usr/local/bin/applesimutils. Installed
versions are: applesimutils 0.7.6
info AppiumDoctor ### Diagnostic for optional dependencies completed, 4 fixes possible. ###
info AppiumDoctor
info AppiumDoctor ### Optional Manual Fixes ###
info AppiumDoctor The configuration can install optionally. Please do the following
manually:
WARN AppiumDoctor ➜ Why opencv4nodejs is needed and how to install it:
https://github.com/appium/appium/blob/master/docs/en/writing-running-appium/image-
comparison.md
WARN AppiumDoctor ➜ ffmpeg is needed to record screen features. Please read
https://www.ffmpeg.org/ to install it
WARN AppiumDoctor ➜ mjpeg-consumer module is required to use MJPEG-over-HTTP
features. Please install it with 'npm i -g mjpeg-consumer'.
WARN AppiumDoctor ➜ Why idb is needed and how to install it:
https://github.com/appium/appium-idb
其中的警告不用管,我这里配置了Xcode Command,如果你需要配置的话,则需要打开你的Xcode,来到偏好设置->location的位置设置command line tools
Homebrew是一款Mac OS平台下的软件包管理工具,拥有安装、卸载、更新、查看、搜索等很多实用的功能。简单的一条指令,就可以实现包管理,而不用你关心各种依赖和文件路径的情况,十分方便快捷。
援引官方的一句话:又提示缺少套件啦?别担心,Homebrew 随时守候。Homebrew —— OS X 不可或缺的套件管理器。
什么是Carthage
Carthage与CocoaPods类似,都是用于在iOS/OS X环境下管理第三方的工具。Carthage 使用于 Swift 语言编写,只支持动态框架,只支持 iOS8+的Cocoa依赖管理工具。