What Bitbucket learned from migrating its unit testing tool

What Bitbucket learned from migrating its unit testing tool

  • September 8, 2019
Table of Contents

What Bitbucket learned from migrating its unit testing tool

More than four years ago, Stash Bitbucket transitioned from running Javascript unit tests by Java to Karma. Today, I can announce that we switched our test runner to a modern tool called Jest! How did we end up here?

Before Jest, our testing framework was a combination of different tools and helpers wired up together: Each of them serves a different purpose and is mandatory to write unit tests. The problem with that setup is that you need to maintain the custom integrations and this can cost you time and a lot of headaches. As you can guess, the complexity of this solution was evolving over time.

There is no one to blame for that. A few years ago there was no other way to even think about running unit tests inside NodeJS only. Karma and PhantomJS were the only solutions if you wanted to think about unit tests for your Javascript code.

Those days are gone. We have more mature tools and, most importantly, more flexibility in how we want to provide and to run our unit tests. Thanks to the jsdom project we can run the code that works in the browser without a browser.

Why did we have to migrate again? It wasn’t just hype over a new shiny Javascript tooling. We had requirements that our old setup was not meeting: As a developer, I want to test code that depends on the NPM module so that I can ensure my code works.

Source: atlassian.com

Share :
comments powered by Disqus

Related Posts

Fitness function-driven development

Fitness function-driven development

Test-driven development, or TDD, involves writing tests first then developing the minimal code needed to pass the tests. TDD is an established practice for feature development that can improve code quality and test coverage. What about other, non-functional requirements such as scalability, reliability, observability, and other architectural “-ilities”?

Read More
The lifecycle of Linux kernel testing

The lifecycle of Linux kernel testing

In Continuous integration testing for the Linux kernel,I wrote about the Continuous Kernel Integration (CKI) project and its mission to change how kernel developers and maintainers work. This article is a deep dive into some of the more technical aspects of the project and how all the pieces fit together. Every exciting feature, improvement, and bug in the kernel starts with a change proposed by a developer.

Read More
Netflix Play API: Building an Evolutionary Architecture

Netflix Play API: Building an Evolutionary Architecture

At QCon SF, Suudhan Rangarajan presented ‘Netflix Play API: Why We Built an Evolutionary Architecture’. Key takeaways from the talk included: services that have a single identity/responsibility are easier to maintain and upgrade; engineers should spend time identifying core decisions that need to be made when building a service, and determine whether these are ‘Type 1’ or ‘Type 2’ decisions which require thorough deliberation or rapid experimentation, respectively; and designing an ‘evolutionary architecture’, using tools like fitness functions, provides many benefits. Rangarajan, senior software engineer at Netflix, began the presentation by talking about two key business milestones within Netflix in 2016 that also had a large engineering impact.

Read More