-
Notifications
You must be signed in to change notification settings - Fork 28
Debugging Tests
VI Tester is a tool to help you pinpoint problems with your code. As your application evolves, you will want to regularly run unit tests to validate that none of the tests fail. If a test fails, it generally means that there is a problem with the code that is being tested - but it can sometimes mean that there is a bug in the test itself. Either way, you'll want to fix the problem.
A test can fail in three places: in the actual test method (most likely), but also in "setUp.vi" (called once before each test method is executed) and "tearDown.vi" (called once after each test method is executed).
When a test fails, it will appear on the "Failures" tab (and will also show a red "X" as its glyph in the "Test Hierarchy" tree). Switch to the "Failures" tab and double click the test of interest to open it. The VI where the failure was detected will open (setUp, test method, or tearDown). Tests can fail due to a failure being raised or an error being raised. If an error is raised, the test will appear as Error.
One easy way to debug the test is to enable LabVIEW's Retain Wire Values tool and re-run the test. You can now trace the data that was passed into and out of your test VI.
VI Tester is an open source project maintained by the VIPM Community. To submit bugs, feature requests, or contributions, please submit an issue to the project tracker.