How To Test Your Software In Julia

An overview of the Test library, and setting up your package to use it.

Emma Boudreau
chifi
Published in
17 min readFeb 11, 2024

--

After getting a package to a basic production state, one problem that the programmer is going to run into is keeping that software working in production. Though the code is production ready, it is likely there will still be changes made to it. One of the great challenges to this is the many unintended consequences that might come more broadly from changing some functionality. It is also always great to simply know everything is working correctly — especially when you might want to try functions with a various arguments, rather than just sticking to the simple REPL test that is typically done during development. One prominent way to mitigate this problem is to utilize tests.

Tests play in important role in keeping software stable; new changes to the code cannot break the existing code, as then the existing tests would fail and that code would need to be changed before it would ever reach main . Modern repository distributors, such as Github, even offer the option to automatically test to protect a main branch. Needless to say, this is the way software has gone for a long time and providing tests for your software is going to help protect that software in the long-run, especially when that project expands to multiple developers or development…

--

--

Emma Boudreau
Emma Boudreau

Written by Emma Boudreau

i am a computer nerd. I love art, programming, and hiking. https://github.com/emmaccode

Responses (1)