views:

47

answers:

1

Hello, world!

My iPhone application has several views and some viewControllers for that views.

I need to test how viewControllers react to device rotations (switch between Portrait and Landscape device orientations).

I found some info about OCMock and google-toolbox-for-mac frameworks but not found any answers on this topic.

Some views may have Landscape/Portrait feature enabled and some not. I need to test the state of view after number of random (or predefined) device' rotations.

I don't have any ideas about how to do that without real user actions.

Will may anybody help me in this situation? Thanks.

+1  A: 

A few possible solutions:

In all cases you can take the output coming out from these apps and save them to a data file then read them back during testing to simulate user motion.

Ramin
The 3-rd way allow to simulate acclerometer events without hardware accelerometer. I think it more flexible. I will try it today. Thank you, Ramin!
Pavel Yakimenko