MORSE launched its first Free and Open Source Software (FOSS) project with the initial release of Snappiershot, a Python snapshot testing library. MORSE has always worked hard to develop lean and nimble software, which empowers us to deliver the most flexible and highest quality software possible to our customers, while still keeping costs to a minimum. FOSS products are an integral part of that strategy. MORSE would probably not exist without the incredible array of spectacularly powerful and reliable tools developed by the FOSS community, and we are excited to have the opportunity to give back to the community that has given so much to us.
At MORSE, we pride ourselves on how thoroughly we test our software. Every project, no matter how small, comes with an extensive suite of automated tests that give us and our customers confidence in the reliability of our code. Many of our applications deal with complex scientific and engineering domains in aerospace or machine learning, where automatically validating test results can be challenging because of the complexity of the expected outputs. Snapshot testing helps fill that gap in our test coverage, by allowing us to save expected results to file and to assert against them at a later date. Snapshots are a small but critical part of our larger testing infrastructure, and act as a canary in the coal mine for inadvertent changes to our applications' outputs.
When we first adopted snapshot testing, we began using an existing Python library called Snapshottest. However, we quickly found that it was missing several features critical to our testing needs and a lack of active maintainers made contributing to the source library impossible. So we started work on Snappiershot, our attempt to improve Snapshottest with a more robust architecture, more thorough testing, and a more extensive feature set. Among other features, we have added the following:
Ability to assert that an actual test result and an expected test result are almost equal, rather than exactly equal, which is essential for many of our cross-platform applications where insignificant floating point errors regularly occur.
Support for a broader set of types. Snappier even accepts Numpy types, which substantially increases the utility of snapshot tests for scientific computing.
Extended the supported snapshot file formats, enabling more flexible and human readable serialization of test results. The improved serialization makes it easier for developers to manually verify the contents of their test results and to review any differences when merging their updated code.
Although our primary goal with this release is to give back to the public at large, we are also excited to invite outside contributions to the project. We are passionate about building the best tools that we can, and we know that the feedback and contributions of the many talented developers participating in FOSS projects will help us do so. You can check out the code for Snappiershot, and can follow our GitHub account for further updates as the project continues.