Customers GoFundMe
GoFundMe's developers and QA engineers achieve 30x faster test runs with Cypress
GoFundMe provides a subscription-free platform for charities, offering a comprehensive suite of tools and services to facilitate fundraising efforts. Among its clientele are renowned organizations like the American Heart Association, the Boston and New York Marathons, the American Cancer Society, LLS, and the American Red Cross. From customizable donate buttons to data management, web building, ticketing, and branded campaigns, GoFundMe Charity delivers a world-class fundraising experience to its clients.
Challenge
Despite its robust feature set, GoFundMe’s QA team faced significant challenges in testing due to an inefficient Selenium setup. Utilizing Selenium, PHP Webdriver, and PHP Unit, the team struggled with a suite of approximately 1,000 tests that took five hours to run, necessitating overnight scheduling and impeding quick feedback on fixes or new features. Moreover, the tests exhibited high flakiness, with 10% failing randomly due to brittle code and poor coding practices. The complexity of the tools hindered test writing, debugging, and updating, exacerbating the issue for a QA team largely new to coding. To address these issues, the QA team established two primary goals: encouraging developers to write tests for the features they built to foster good coding practices and enhancing confidence in the test suite by reducing brittleness and flakiness.
Solution
Recognizing the need for a more user-friendly testing platform, the QA team evaluated several options, including Selenium with Mocha and Chai, Codeception, Selenide, Katalon, Nightwatch, and Cypress. After conducting multiple proofs of concept and weighing the pros and cons, Cypress emerged as the clear winner.
We realized pretty quickly that Cypress was the winner. It combines everything we need into a single tool that feels familiar, but is easy to teach and use. It was very well-documented, it had in-browser debugging and DOM snapshots, it was in Javascript, and it was super readable. Cypress Cloud also gave us access to parallel testing and a comprehensive analytics platform suite to give more light to our testing landscape. And best of all, the setup is dead simple.
Result
The adoption of Cypress yielded remarkable results for GoFundMe Charity’s testing efforts. Test runs became 30 times faster, decreasing from five hours to just 10 minutes, driven by smarter setups, improved waiting strategies, and reduced emphasis on cross-browser testing. Test flakiness plummeted, with only 1-2 flaky tests per run, down from 100, thanks to the implementation of code and testing best practices. The QA team gained significantly more confidence in the tests, transitioning away from the page object model, making tests deterministic with Cypress mocks and stubs, enhancing setups, adding custom data-qa selectors, and employing smarter waiting strategies using Cypress route aliases or assertions. By adhering to these best practices, GoFundMe Charity achieved greater test stability, readability, and debuggability, empowering the team to deliver high-quality features and updates with confidence.