I am very new to IOS programming. I have a task to find if I can automate my UI for testing. This is what I want to do:
Put some code in my application that randomly (sounds bad but may be pre-defined events)sends event messages to controls on the screen.
Since it is just code I should be able to take the app, deploy it in any iPhone or iPad and run the program.
Once the app is completely automated by my code I guess it will be easy to do the analytics on the obtained performance data.
I have seen FoneMonkey but looks like it needs user interaction recorded manually on each device.
Hello Lalith i have been creating some UI Automation tests for an application and its working very well. Although it has some tricks, I think you should take a look at these links:
http://answers.oreilly.com/topic/1646-how-to-use-uiautomation-to-create-iphone-ui-tests/
http://alexvollmer.com/posts/2010/07/03/working-with-uiautomation/
If you need more help, just let me know. :)
Edit1:
On your viewDidLoad of your viewController you can add something like this:
- (void)viewDidLoad {
[super viewDidLoad];
//(Your code...)
// I set it to start after 5 seconds...
[self performSelector:@selector(startTest) withObject:nil afterDelay:5];
}
-(void)startTest{
//took this from the link you posted
[myButton sendActionsForControlEvents:UIControlEventTouchUpInside];
}
Edit 2:
if([myTextField canBecomeFirstResponder]){
[myTextField becomeFirstResponder];
}