Fast, Automated Browser Testing
How LearnZillion uses CircleCI to fully automate their QA process
LearnZillion is building the world's first free digital curriculum, developed by veteran teachers from K-12 schools. Their app consists of custom content management for their curriculum lessons, and, like any complex application, it has grown to require a number of data stores, queues and more.
In addition to Rails, LearnZillion uses Postgres, Redis, Memcached, and Resque on the backend, and RSpec for unit tests. They use Knockout for their frontend. Browser tests use Selenium, Capybara, and Cucumber.
“CircleCI makes our products better by allowing us to spend more energy testing them and less time managing a home-grown testing infrastructure.”
CTO at LearnZillion
The Challenge Prior to CircleCi
LearnZillion's CI process consisted of a laptop under a desk running TeamCity, and they were constantly dealing with environment and OS issues. Additionally, the functional QA test process was entirely manual and time consuming. Releases were done every 2-4 weeks by the engineer on-call. “At that interval, the engineer deploying code couldn’t have known all the intricacies of what was being deployed,” said Ian Lotinsky, CTO of Engineering at LearnZillion. “It was downright dangerous.” Deployments were often done late at night to reduce the impact of unexpected issues too. “We needed to move to continuous delivery.”
With CircleCI, LearnZillion now runs all of its tests rapidly on every branch and sees the results right in their GitHub Pull Requests before merging new features into master. In addition to thorough unit testing powered by CircleCI, LearnZillion’s QA lead, Manpreet Komal, has built a suite of browser tests that he calls AutoQA, which are maintained in its own repository by Manpreet and his team.
Using CircleCI's and GitHub's APIs, LearnZillion engineer Ron Warholic set up a second CircleCI process where any changes to either the Rails application code or the AutoQA browser test suite trigger a rerun of the AutoQA browser tests. The tests execute on CircleCI build containers and point to LearnZillion's staging environment. AutoQA deploys the appropriate application and AutoQA branches to a staging environment, prepares the database, and then runs the browser tests against that staging environment. Developers then see two status entries in GitHub Pull Requests, one for the Rails unit tests and another for the AutoQA functional test suite.
Now LearnZillion doesn't have to worry about maintaining their own CI infrastructure. They can deploy confidently several times a day, and they can get new features in the hands of their users in a fraction of the time.