Look at the crazy lengths Facebook goes to in testing its mobile app

Social media giant Facebook has one of the most popular mobile apps in the world, and today it's showing just what it takes to comprehensively test the changes it makes to that app. Constant testing is something Facebook needs to take seriously, as it frequently rolls out new updates for its mobile app. Should those updates break something – even if the problem is present on just a few of the many phones available today – the app's popularity could have pretty dire consequences for a sizable portion of its users.

In an new post on its Code blog, Facebook details the great lengths it's gone to in an effort to prevent problems for its mobile app users. The first step in that process was developing CT-Scan, a service that helps Facebook test its code changes to prevent software regressions. At first, Facebook developers were using CT-Scan to test changes with merely the mobile phones they had for personal use. Given the sheer number of Android devices out there (and the growing list of iOS devices too), Facebook decided that it needed to scale testing up to "more than 2,000 mobile devices to account for all the combinations of device hardware, operating systems, and network connections that people use to connect on Facebook."

Thus began the arduous process of figuring out how to actually do such a thing. Once Facebook decided it wanted to test the mobile app on actual devices instead of simulators, the company's Production Engineering division created a team to tackle the issue of scaling. The team went through a number of failed builds before finally moving its mobile data lab from Facebook's headquarters to its Prineville data center, where the lab is located now.

At the Prineville data center, Facebook's engineers have set up around 60 racks that hold 32 devices and up to eight Mac Minis or four OCP Leopard servers, depending on whether the devices in the rack are iOS or Android. Each rack also has its own wireless access point and is outfitted with cameras facing the devices so engineers can see them testing code changes remotely. It's really a sight to behold, and it shows just how seriously a big company like Facebook needs to take software testing if it's going to attract and retain as many users as possible.

From here, Facebook plans to scale its testing even further, as it's currently working on a way to get 64 devices in each rack instead of the current 32. The company would also like to expand beyond CT-Scan to turn the mobile data lab into a general testing platform that's accessible across all of its teams, and not just those who write tests using CT-Scan's framework. The post over at the Code blog has many more details on the challenges the team faced while setting up the mobile data lab and what it plans for the future, so pop over there and give it a read if you've got a few minutes on your hands.

SOURCE: Facebook Code