What are unit tests?
- Every VI in an OpenG library (e.g., oglib_array, oglib_time) should have one or more unit test VIs that validate the library VI's functionality. These unit test VIs are placed in the ./tests/ folder of a library's project and should be named "TEST - {Library VI Name}.vi" (e.g., "TEST - Filter 1D Array.vi").
Why do we need unit tests?
- These unit tests can be run by developers, at any time, to validate the functionality of the library.
- These tests are run automatically during the Package Build and Release Process to ensure the quality of the software before it is released to the public.
When unit tests are created
- When a new feature is added, unit tests should be added to validate that the new feature functions according to the feature's specifications.
- When bugs are discovered in a library, a unit test should be created that exposes the bug via a unit test failure. The test should be named something like "TEST - {Bug ID} - {Library VI Name}.vi"
See Also