Reputation: 3254
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.
Upvotes: 3
Views: 402
Reputation: 13433
A few possible solutions:
This one allows you to connect your iPhone/Touch and send accelerometer events to the simulator.
If you prefer to use your Mac laptop as the accelerometer source here's another way to do it.
Similar in concept but slightly different implementation.
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.
Upvotes: 1