Julia v1.5 Testing: Best Practices

Do you think running tests are too slow? Cannot figure out how to do Test Driven Development (TDD) in Julia? Here is a guide.

Erik Engheim
6 min readJan 23, 2021

A lot of programming provide you with ready made solutions where there is one particular way of doing things. In the Julia community the approach is more around supply flexible building blocks from which you can construct whatever solution you want.

Read more: Julia v1.5 Testing: How to Organize Tests.

The advantage of this approach is that you can easily tailor a solution to your particular needs. The downside is that to someone fresh to Julia, it may not be immediately obvious what blocks to combine. One example of this is the Julia testing framework. It is flexible and can easily be tailored to your needs. But that also means it is not immediately obvious how you do many common workflows.

In this story I aim to show you patterns to follow for different use cases such as:

  • A thorough, correct and complete test run of a package. What you may want to do after downloading a new package you are uncertain about, or the kind of test you run at the end of day of coding.
  • Regular testing that you do with some frequency while developing.

--

--

Erik Engheim

Geek dad, living in Oslo, Norway with passion for UX, Julia programming, science, teaching, reading and writing.