Customers Pacific Northwest National Laboratory

Pacific Northwest National Laboratory achieves a new level of productivity with Cypress

Pacific Northwest National Laboratory is a U.S. Department of Energy national laboratory and a leading center for scientific discovery in chemistry, data analytics, and Earth science, as well as technological innovation in sustainable energy and national security.

Challenges

Before implementing Cypress as their modern testing solution, Pacific Northwest National Laboratory’s (PNNL) engineering team relied heavily on a commonly used, open-source testing framework. Testing proved to be inherently slow, flaky, and difficult for experienced engineers to configure and debug. This resulted in excessive inefficiencies for the engineering team and, even worse, an unnecessary number of bugs shipped to production applications.

When asked about PNNL’s experience with the other testing tool, PNNL’s software engineers shared that they were writing tests in Java and had to install many page objects and many other elements manually. It was also harder to teach new team members how to test under such circumstances. There were things they simply couldn’t do with that tool that they could do with Cypress.

When a government cybersecurity agency approached PNNL to develop a data visualization application for Red and Blue Team operations, they knew they needed to deliver a trustworthy user experience to a critical and detailoriented audience. They also knew that reliably testing and eliminating bugs from the new application, named RedEye, was of paramount importance. RedEye aims to build teams’ confidence by automatically reporting and visualizing the outcomes from weeks-long Red Team vulnerability campaigns. A confidence-inspiring and bug-free user experience was a must.

Solutions

After facing recurring challenges with their incumbent testing framework, the team working on RedEye was given full autonomy to seek and implement a better testing solution for their project. Preliminary experimentation with Cypress yielded positive experiences and the PNNL engineers chose to implement Cypress as their end-to-end testing solution for RedEye.

Cypress fundamentally solves the architectural problems that cause tests on other frameworks to chronically timeout and flake. Unlike those, Cypress does not control the browser via API. Instead, Cypress tests run directly in the browser, allowing for a deterministic outcome every time. For PNNL, this means engineers spend less time chasing falsely flaking tests and more time delivering innovation to their end users.

Because Cypress tests and RedEye are both written in Javascript, bringing engineers up to speed on how to write Cypress tests is straightforward. This learning curve is further reduced by Cypress’s exceptional developer experience, including world-class docs, community forums, and popular Cypress Learn courses. Between reduced developer ramp-up times and tests that are faster to write, debug, and maintain, the PNNL team found Cypress’s total cost of ownership to be far less.

PNNL maximizes the value of Cypress as a testing solution by using Cypress Cloud to run Cypress tests in their GitHub Actions pipeline. With Cypress Cloud, PNNL reduces their test durations via parallelization, protecting and unblocking valuable CI resources. Cypress Cloud also records visual artifacts from each test, accelerating the debugging process for failing and flaky tests in an otherwise headless CI environment.

Results

With a confidence-inspiring user experience being one of the key objectives for RedEye, test code coverage is important. Cypress makes writing end-to-end tests simple for engineers and non-engineers of all experience levels. Cypress’s friendly developer experience means that engineering organizations adopt testing earlier in the development lifecycle, often testing application code while it’s being written. Add in a rich plugin library of functionality complementary to Cypress – including code coverage – and PNNL is well-armed to deliver RedEye users the experience they expect.

PNNL’s software engineers shared that they have high confidence in RedEye’s stability in every release because they have 85%+ of crucial user stories covered by automated tests.

The team’s confidence in RedEye was affirmed shortly after its initial release when RedEye quickly jumped to GitHub’s Trending list. Even after reaching GitHub Trending, only one trivial bug was reported with RedEye – a testament to the team’s comprehensive suite of Cypress tests.

Additionally, Cypress Cloud ensures that PNNL engineers have clear visibility and confidence in how RedEye is building in their CI pipeline. Instant feedback is provided in Cypress Cloud, with exact screenshots and logs of where the test failure occurred, thereby allowing engineers to quickly identify, debug, and fix flaky and failing tests.

Not only does Cypress Cloud accelerate debugging efforts, but it also optimizes PNNL’s CI resources by parallelizing test specs and reducing overall test run durations by 75%. By automating Cypress testing in CI and condensing critical feedback loops, developers deliver a higher-quality application to end users faster. Another benefit is that CI resources are freed up sooner, allowing other teams to build their projects with less waiting.

What’s next

After only one month, RedEye has achieved more than 2k GitHub stars and the project has already been forked nearly 200 times. Today, Cypress continues to play an integral role in the project’s success and its end users’ confidence.

And, with the success of RedEye top-of-mind, an increasing number of engineers and teams are adopting Cypress as their automated testing solution.

Find out how to get started with Cypress today.

Pacific Northwest National Laboratory logo

Products used

USA

Enterprise

Download case study