iOS monkey测试/自动测试
App开发完毕,我们都希望找个不懂式样的人来做下乱序的测试,这里叫monkey测试(猴子测试?),这样可以保证在不懂式样的人胡乱玩过之后能保证app的品质,因此这里分享下iOS自动测试工具anteater,大部分照搬官方的文档,拍砖吧
anteater下载
访问http://www.redant.com/anteater/installation/,输入邮件地址点击下载即可开始下载,
由于不清楚我天朝是否能正常下载,故下载一份备份,也可以点此下载anteater (39)
配置手顺
同样照搬了一下官方的配置手顺,这样比较快捷,呵呵,好吧,直接往下看。
our quick setup guide
1.Extract anteater.zip to /Lib/anteater
2.Create a test target for your app, by duplicating your current target by right clicking and selecting “Duplicate” and renaming to something sensible like ‘AutoTest’.
3.Add all files to Xcode, de-select “copy items to destination group’s folder” and only add to the test target you just made.
4.For the library to work for your target select “Build Settings” and search for “Linker Flags”, ensure “Other Linker Flags” is set to “-all_load”
5.For the reports to have the correct name select “Build Settings” and search for “Product Name”, remove “copy” from “Product Name”
6.Create a Testing Scheme, by renaming the ‘app copy’ scheme automatically created earlier, by selecting the Scheme drop down and “Manage Schemes…” and rename to something sensible like ‘AutoTest’.
7.Extend your build phase, by selecting your Target then “Add Build Phase” then choose additional “Add Run Script” inserting as a shell script: “$PROJECT_DIR/Lib/anteater/bin/anteater.sh”
8.Hit “Build” (Anteater is launched by a build script. If you choose “Run” it will run twice.)
9.When setup correctly and the build is successful you should see the app start testing.
10.By default, reports are generated under “/AntEaterResults” and the results page is automatically opened when the tests have finished.
next steps
If you like what you see it’s time to move on to learn about configuring Anteater to suit your needs.