Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Can I disable animation for Xcode-UI-Tests?

Tags:

I am using Xcode7 to write UITest, the problem is I need to wait for all the steps to happen before I validate the actual result. This takes a lot of time with all with view controller pushing/presenting/dimissing.

Is there a way through which I can disable the animation while writing the test?

like image 974
Sandy Avatar asked Sep 25 '15 01:09

Sandy


People also ask

How do I test UI in XCode?

How to Run XCUI Tests on XCode. To run the XCUITests on XCode, you can click the highlighted icon below to see your newly created UI Test targets. You can hover on the “testExample()” test case and click the “Play” icon to run that specific test to see if everything was set up properly.


1 Answers

You can disable animations for the entire app with:

[UIView setAnimationsEnabled:NO]; 

This will carry over to running your UI Tests as well. Note that this must be called from the application code, not the tests.

like image 117
Joe Masilotti Avatar answered Sep 23 '22 10:09

Joe Masilotti