Home / Companies / GitLab / Blog / Post Details
Content Deep Dive

How GitLab switched to Headless Chrome for testing

Blog post from GitLab

Post Details
Company
Date Published
Author
Mike Greiling
Word Count
3,024
Company Posts That Month
8
Language
English
Hacker News Points
-
Summary

GitLab transitioned from PhantomJS to headless Chrome for frontend and RSpec feature tests to improve test accuracy, debug capability, and alignment with modern web standards. PhantomJS, although useful for initial test framework needs, had limitations due to its outdated QtWebKit version and lack of support for newer browser features. The migration involved replacing PhantomJS-specific configurations with Selenium and ChromeDriver, which presented challenges like handling JavaScript modals, visible elements, and keyboard shortcuts differently. The transition improved the testing environment by eliminating workarounds and hacks, and although it did not significantly speed up test execution, it enhanced the ability to write and debug tests interactively. Headless Chrome also enabled GitLab to implement Browser Performance Testing, aiding in detecting frontend performance regressions before merging code changes. The move was necessitated by the end of PhantomJS maintenance and was supported by comprehensive documentation and community experiences, contributing to a smoother transition for GitLab and potentially other Rails applications.

Trends Found in this Post

No tracked trend matches for this post yet.