Focussed a week on iOS tests and reduced our average run time from 35 minutes to ~10 minutes for UI tests (model is at ~5 minutes)
How did we do this?
1: Analyzing EarlGrey and finding spots where things could be accelerated. In this case we increased animation speed, but didn’t calculate in that faster timing in the resource tracking, so animations were blocking for the original time.
2: Separate tests so that each machine only tests one test target; previously we ran two targets one one machine in parallel. (Parallel tests were flaky in the early days)
3: Enabling test parallelization. This took a lot of smaller test fixes - all our timeout:5 code broke because parallel tests have unpredictable performance. We use a larger default timeout now to deal with variable load.
4: We’ve replaced our Mac minis with 1TB models (MacStadium has a promo currently) so we now got better machines for cheaper. With 1TB we could increase ccache space to get far more cache hits across different branches.
5 (and lastly). Spotlight (aka md_worker) went brrr on test machines so I added a new step in our Chef automated setup to disable it, seems that gave another 5% boost on total test times.
I tried to further accelerate things, but it seems iOS gets REALLY confused if you inject touches faster than 60Hz. So typing still has a bit of a delay.
• • •
Missing some Tweet in this thread? You can try to
force a refresh
“Phil Schiller says the goal of the App Store was to treat everybody the same”
Riiiight. Some get these special entitlement exceptions, others don’t even get a reply when they ask. All animals are equal, but some animals are more equal than others. imore.com/phil-schiller-…