How can I create automated user interface tests for a Titanium app? Does the framework include something for this? Are there any helpful third party tools?
1 Answers
Have you looked at titanium-jasmine?
I have never personally used it but ive heard its pretty useful for this type of thing. I'm not sure about its abilities to test actually visual elements.
EDIT:
For testing the user interface and simulating touch events on the simulator or device, just use UIAutomation with the native workflow! Since every Titanium project compiles to an XCode project (which can and should be at least profiled for memory leaks using the native workflow before release to the app store), you can just follow the steps here to write your own tests in Javascript.
As a first step, run your app in the simulator, then got to PROJECT_HOME/build/
and open up the xcodeproj
file. Once inside XCode, hold down the "Run" button, click "Profile", which will open up "Instruments" and add the "Automation" widget like in the link I provided!
This is not titanium specific, it can be used for any iOS app and seems like a great tool for every iOS developer, along with Allocators and Memory Leak widgets inside of instruments.
Possibly a better alternative is using Gorilla Logic's free MonkeyTalk. It is a bit more straightforward if your not very experienced with XCode, and it has the benefit of (theoretically) being able to test iOS and Android.

- 6,065
- 1
- 24
- 37
-
Seems it's not for user interface tests. Thanks anyway. – alf Sep 07 '12 at 22:15
-
Ok after more searching I edited my response, essentially you should use the native workflow (with Instruments, a WONDERFUL tool from Apple) – Josiah Hester Sep 08 '12 at 01:52
-
Alfonso's comment was probably about titanium-jasmine, not Xcode. Confused me for a bit. – Dawson Toth Sep 10 '12 at 00:01