简体   繁体   中英

Is it possible to create an automated 'automated UI test' for testing iOS apps?

I've heard a lot lately about the possibility of writing a script to perform an automated UI test for iOS apps, using the inbuilt functionality within xCode Instruments.

These tests seem to be written quite specifically for each application - and in my case, probably not worth the time when I'd have to write a different script for each app.


What I want to know is - is it possible to create one big generic UI test for all apps? Basically, it would figure out how to navigate it's way around the UI (ie traverse the UI tree). It could test for generic errors - eg crashes, inconsistencies, controllers that can't be navigated away from etc. At the very least, it could perform touches at rondom locations and test for crashes.

Is this possible - or even better, has anyone already done this?

According to this link, you can definitely write a script that will randomly touch.

http://vokalinteractive.com/2011/12/02/automated-testing-in-ios/

And with that being said, you could make it more specialized to touch in certain hotspots that contain usual places for UITabBars, UIBarButtonItems, UITableViewCells, etc…

Why not try to touch those common places and just run on loop within the javascript?

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM