Golden Testing a CAD Library
2 days ago
- #Golden Testing
- #Haskell CAD
- #Visual Regression Testing
- Author maintains a Haskell CAD library called Waterfall-CAD and added SVG support in 2025, enabling more testable visual regression testing.
- Testing 3D CAD outputs is difficult; visual regression testing compares images to stored snapshots and highlights changes, akin to golden testing.
- Implemented tests by converting SVG diagrams to images with Rasterific-SVG, comparing pixels for differences, and generating diff images on failure.
- Considers developing an open-source library for visual regression testing but faces challenges like supporting more pixel formats and customization.