Martijn Thé
Martijn Thé

Reputation: 4704

How to setup iOS UI tests as build dependency, like OCUnit?

I'd like to add UI tests to an iOS project, in the same manner as OCUnit tests. I know there is the Instruments + UIAutomation JavaScript approach, but I don't see how that fits into an automated build workflow. Can you setup Instruments + UIAutomation scripts as build dependency for example?

Secondly, I'd rather write the UI tests in the same language as the rest of the code... Are there any alternatives / things I'm missing?

Thanks.

Martijn

Upvotes: 4

Views: 678

Answers (2)

Vincent Tourraine
Vincent Tourraine

Reputation: 801

You can actually use OCUnit for UI testing.

If you're already familiar with OCUnit, this piece of code is a good start: How to do UI Testing of iOS Applications Using OCUnit

You can then run these tests automatically with xcodebuild. It's not straightforward, but worth the extra work. I recommend to take a look at this post: Xcode4: Running Application Tests From The Command Line in iOS

UIAutomation can also be automated now with instruments, but the fact that you can now run your UI tests with OCUnit makes it less interesting.

Upvotes: 1

Claus Broch
Claus Broch

Reputation: 9212

Have a look at FoneMonkey by Gorilla Logic. This might be what you are looking for.

Upvotes: 0

Related Questions